dispose() throwing exception? - Websphere

This is a discussion on dispose() throwing exception? - Websphere ; Hi, I have an application that runs on several handhelds. We are using the J9 runtime and the personal profile, and developing with eclipse. Some of our devices are running Pocket PC 4.2. No problem there - the problems I ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: dispose() throwing exception?

  1. dispose() throwing exception?


    Hi,
    I have an application that runs on several handhelds. We are using the J9 runtime and the personal profile, and developing with eclipse.

    Some of our devices are running Pocket PC 4.2. No problem there - the problems I describe below don't occur. However, one of our devices is running Windows CE 5. On this device, when I call dispose() on our frame, I'm getting the following exception stack trace:

    Exception caught in event loop: java.lang.NullPointerException; event loop continuing ... java.lang.NullPointerException at org.eclipse.swt.widgets.Menu.releaseWidget(Unknown Source) at org.eclipse.swt.widgets.Widget.dispose(Unknown Source) at java.awt.MenuComponent._removeNotify(Unknown Source) at java.awt.MenuBar._removeNotify(Unknown Source) at java.awt.Frame._cleanUpShell(Unknown Source) at java.awt.Frame._removeNotify(Unknown Source) at java.awt.Component$RemoveNotifyRunnable.run(Unknow n Source) at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessa ges(Unknown Source) at org.eclipse.swt.widgets.Display.runAsyncMessages(U nknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Un known Source) at java.awt.BBToolkit.start(Unknown Source) at java.awt.BBToolkit$4.run(Unknown Source)

    This is causing a problem, because when our application starts, we have native code that looks for an application window that already exists, and displays it (so we only get one instance running). But since dispose() is bugging out, the native code actually finds the leftovers of the previous window, but then can't display it - so the user can't open the app, and they have to soft-reset between runs of the app.

    Oddly, using j9.exe throws the above exception, but must do some extra cleanup, because I can run the app again w/o a soft reset. But, I'd rather use j9w so my users don't have to see the java console.

    Has anyone seen anything like this? Not exactly sure what I can do to prevent this from happening....maybe a native call to DestroyWindow would work...

    Thanks,
    Matt

  2. Re: dispose() throwing exception?

    You seem to be using an old version of Personal Profile. The old
    version of Personal Profile did not officially support WinCE 5.0, but
    the new 6.1 version does. Could you try the new version to see if the
    problem still exists?

    mjacyno@logikos.com wrote:
    >
    > Hi,
    > I have an application that runs on several handhelds. We are using the J9 runtime and the personal profile, and developing with eclipse.
    >
    > Some of our devices are running Pocket PC 4.2. No problem there - the problems I describe below don't occur. However, one of our devices is running Windows CE 5. On this device, when I call dispose() on our frame, I'm getting the following exception stack trace:
    >
    > Exception caught in event loop: java.lang.NullPointerException; event loop continuing ... java.lang.NullPointerException at org.eclipse.swt.widgets.Menu.releaseWidget(Unknown Source) at org.eclipse.swt.widgets.Widget.dispose(Unknown Source) at java.awt.MenuComponent._removeNotify(Unknown Source) at java.awt.MenuBar._removeNotify(Unknown Source) at java.awt.Frame._cleanUpShell(Unknown Source) at java.awt.Frame._removeNotify(Unknown Source) at java.awt.Component$RemoveNotifyRunnable.run(Unknow n Source) at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessa ges(Unknown Source) at org.eclipse.swt.widgets.Display.runAsyncMessages(U nknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Un known Source) at java.awt.BBToolkit.start(Unknown Source) at java.awt.BBToolkit$4.run(Unknown Source)
    >
    > This is causing a problem, because when our application starts, we have native code that looks for an application window that already exists, and displays it (so we only get one instance running). But since dispose() is bugging out, the native code actually finds the leftovers of the previous window, but then can't display it - so the user can't open the app, and they have to soft-reset between runs of the app.
    >
    > Oddly, using j9.exe throws the above exception, but must do some extra cleanup, because I can run the app again w/o a soft reset. But, I'd rather use j9w so my users don't have to see the java console.
    >
    > Has anyone seen anything like this? Not exactly sure what I can do to prevent this from happening....maybe a native call to DestroyWindow would work...
    >
    > Thanks,
    > Matt


  3. Re: dispose() throwing exception?

    Thanks for the response. I'm about 1 hour from a (well-deserved, I might add) vacation, so I won't be able to actually try it until I get back.

    It might take a bit of work to build with the 6.1 version, as I'm not well versed in Ant and doing builds etc (I'm maintaining someone else's code) but hopefully I'll be able to figure out how to do it.

    And you're right, the current codebase was built with WSDD 5.7.1, and uses Personal Profile 1.0.

+ Reply to Thread