Menu

Invalid memory access of location 0x20 eip=0x

Help
2011-04-08
2012-09-23
  • steve labarbera

    steve labarbera - 2011-04-08

    I have an issue on a mac where the application crashes with the error "Invalid
    memory access of location 0x20 eip=0x95b3ced."

    I ran a search and found a few bugs in SWT a while back that caused this but
    appear to be fixed now. It said to fix by calling -XstartOnFirstThread

    I added the following to my command-line startup: -d32 -XstartOnFirstThread

    You think it might be due to me creating a thread in between those mandatory
    method calls?

    public static void main(String args)
    {
    UIUtils.setPreferredLookAndFeel();
    NativeInterface.open();
    Thread t = new Thread(){
    public void run()
    {
    StartBurp.main(new String{""});
    }
    };
    t.start();
    //44StartBurp.main(new String{""});

    NativeInterface.runEventPump();

    }

    This crashes pretty much every time I load JWebBrowser.

    I do get this error when I first click on the JWebBrowser tab:

    java.lang.NullPointerException
    at org.eclipse.swt.widgets.Shell.setEnabled(Unknown Source)
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeComponent$CMN_setShellEnabled.
    run(SWTNativeComponent.java:1144)
    at chrriis.dj.nativeswing.swtimpl.CommandMessage.runCommand(CommandMessage.jav
    a:61)
    at chrriis.dj.nativeswing.swtimpl.core.ControlCommandMessage.runCommand(Contro
    lCommandMessage.java:166)
    at chrriis.dj.nativeswing.swtimpl.NativeInterface.runMessageCommand(NativeInte
    rface.java:168)
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.runMessageCommand(SW
    TNativeInterface.java:1315)
    at chrriis.dj.nativeswing.swtimpl.core.MessagingInterface.runMessage(Messaging
    Interface.java:121)
    at chrriis.dj.nativeswing.swtimpl.core.MessagingInterface.processReceivedMessa
    ges(MessagingInterface.java:106)
    at chrriis.dj.nativeswing.swtimpl.core.MessagingInterface.access$2(MessagingIn
    terface.java:94)
    at chrriis.dj.nativeswing.swtimpl.core.MessagingInterface$2$2.run(MessagingInt
    erface.java:438)
    at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Unknown Source)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface$InProcess.runSWTEven
    tPump(SWTNativeInterface.java:667)
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface$InProcess.runEventPu
    mp(SWTNativeInterface.java:659)
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.runEventPump_(SWTNat
    iveInterface.java:475)
    at chrriis.dj.nativeswing.swtimpl.NativeInterface.runEventPump(NativeInterface
    .java:124)
    at penatrator.unittests.SiteMapsTester.main(SiteMapsTester.java:33)

     
  • Christopher Deckers

    Hi,

    Are you manipulating certain components outside the UI thread?

    Cheers,
    -Christopher

     
  • steve labarbera

    steve labarbera - 2011-04-13

    honestly not sure. Everything is being done within classes inside that one
    thread in main does everything need to be done inside a SwingWorker thread? Im
    going into work tomorrow i'll play around with it a bit. But yeah it was
    crashing a bunch. In windows using same code its running like a charm. just
    was not sure if i was doing something incorrectly. Can i assume since in
    windows it runs fine its not the manipulation of components outside the UI
    thread.

    What be easiest way to see if its the issue you think may be causing the
    issue?

     
  • Christopher Deckers

    Can i assume since in windows it runs fine its not the manipulation of
    components outside the UI thread.

    I would assume so, but there is no 100% guarantee: native components can
    behave differently on different platforms because of their native nature.

    What be easiest way to see if its the issue you think may be causing the
    issue?

    I am not sure, but if you happen to have a simple standalone test case, please
    e-mail it to me ( chrriis (at) nextencia (dot net ) so that I have a look and
    fix bugs if I find any.

    -Christopher

     
  • adrayb

    adrayb - 2011-12-27

    Hello TyWeed420,

    Did you ever get this issue resolved ? I am seeing the same problem.

     
  • Christopher Deckers

    java.lang.NullPointerException
    at org.eclipse.swt.widgets.Shell.setEnabled(Unknown Source)

    This error is caused by this SWT bug:
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=344401

    I strongly suggest anyone affected by this bug to vote on it. Also indicate
    that the fact you are using a library that is hitting this bug is a
    showstopper for you (no possibility to change the library code, etc.)

    Hope this helps,
    -Christopher

     

Log in to post a comment.