Java中对位置的内存访问无效 [英] Invalid memory access of location in Java

查看:93
本文介绍了Java中对位置的内存访问无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一年来一直致力于Java项目。我的代码已经好几个月了。几天前,我将Java SDK升级到Mac上的最新版本1.6.0_26(Snow Leopard 10.6.8)。升级后,发生了一些非常奇怪的事情。当我运行一些类时,我收到此错误:

I've been working on a Java project for year. My code had been working fine for months. A few days ago I upgraded the Java SDK to the newest version 1.6.0_26 on my Mac (Snow Leopard 10.6.8). After the upgrade, something very weird happens. When I run some of the classes, I get this error:

位置0x202的内存访问无效rip = 0x202

但是,如果我用-Xint(解释)运行它们,它们可以工作,但速度慢但工作正常。我在使用按位运算符(用于游戏奥赛罗的位板)的类中遇到了这个问题。我不能在这里放任何代码因为我没有得到错误,异常或类似的东西。我只是得到那个烦人的消息。

But, if I run them with -Xint (interpreted) they work, slow but work fine. I get that problem in classes where I use bitwise operators (bitboards for the game Othello). I can't put any code here because I don't get an error, exception or something similar. I just get that annoying message.

代码在没有-Xint的情况下运行是否正常但是它可以使用吗?我该怎么办?

Is it normal that the code doesn't run without -Xint but it works with it? What should I do?

提前致谢

推荐答案

当一个JVM像这样开始崩溃,这表明某些东西破坏了JVM的执行模型。

When a JVM starts crashing like that, it is a sign that something has broken the JVM's execution model.

你的应用程序是否包含任何本机代码?它是否使用具有本机代码组件的任何第三方库?如果两者都不成立,则可能是这是JVM的Apple端口中的错误。它可能是JIT编译器错误,也可能是某些JVM本机代码库中的错误。

Does your application include any native code? Does it use any 3rd-party libraries with native code components? If neither is true, then the chances are that this is a bug in the Apple port of the JVM. It could be a JIT compiler bug, or a bug in some JVM native code library.

你可以对这样的bug做些什么?

What can you do about a bug like that?

不是很多。


  • 通过逐步砍掉比特来减少你的应用程序,直到你有一个小的测试用例展示问题。

  • 根据测试用例,看看是否有一些经验方法可以避免这个问题。

  • 使用测试用例向Apple提交错误报告。

这篇关于Java中对位置的内存访问无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆