JVM Fatal Error in native code, Not sure what to do

僤鯓⒐⒋嵵緔 提交于 2019-12-04 12:30:27

I often have problems with java 6 and Swing on my Windows Vista 64 box (but only when I launch my app from eclipse).

The way to fix it for me was to disable Direct3D:

java -Dsun.java2d.d3d=false ...

See also http://download.oracle.com/javase/6/docs/technotes/guides/2d/flags.html#d3d for further information.

Well, the error is from a dll trying to write to memory where it shouldn't. If it happens just sometimes, it may be from not building components on the event dispatch thread. It can't hurt to check.

This bug report at oracle may be related: http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=e5f1f1011daf96ffffffffdd154dd2e731150?bug_id=6967456

It may be related to swing's drag & drop functionality - see if disabling drag and drop on your form components supresses the error.

@CodeBunny, that would be comment:

1) is there Trindent.jar

2) how do you apply Substance Look and Feel to the JFrame,

SwingUtilities.invokeLater(new Runnable() {

    @Override
    public void run() {
        try {
            UIManager.setLookAndFeel(new SubstanceOfficeSilver2007LookAndFeel());
            SwingUtilities.updateComponentTreeUI(frame);
        } catch (UnsupportedLookAndFeelException e) {
            throw new RuntimeException(e);
        }
    }
});

in most cases (if there some BackGround task) required usage of invokeAndWait

EDIT

depends

1) if you are load empty container, then add data (invokeLater)

2) or load everything and wait for that (invokeAndWait),

3) are your contructor for Container in last line contains setVisible(true), last from possible lines,

4) maybe you are outside EDT, something you must loading so heavy, isn't there RepaintManager Error???

5) disable Substance, if you get this error, then came from mistake in codeing or some your code returns error, otherwise is there something rellated with RepaintManager (overload Native OS Latency) or with Concurency, simple your code is out of EDT,

6) Substance is so sensitive, very sensitive for done code out of EDT issues, remove all Thread.sleep(int) from GUI rellated code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!