Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 292
Registered: ‎07-25-2008
My Device: Passport

Eclipse 1.1 simulator hotswap shows IllegalArgumentException

So I'm getting moved up to the release version of the 1.1 Eclipse plug-in, and starting to experiment with simulator code hotswap.  (yes, I fixed the Installed JRE setting for 5.0.0 and created new Debug profiles)

 

Whenever I make a code change and click Debug again, my simulator shows a big white screen that says:

JVM Error 104

Uncaught:

IllegalArgumentException

 

If I click the touchpad button about 8 times or so, it eventually goes away, reattaches, and the new code is available for testing.

 

Has anyone else seen this error yet?  Its quite annoying and I'm not entirely sure how to debug it.

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Eclipse 1.1 simulator hotswap shows IllegalArgumentException

I get it every once in a while but I'm not sure how I repeat it. I believe if the application is not fully loaded, it'll have that effect.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Developer
Posts: 292
Registered: ‎07-25-2008
My Device: Passport

Re: Eclipse 1.1 simulator hotswap shows IllegalArgumentException

I did some further debugging, and I think I know what may be generating the exception now...

 

Its something that happens while my app's auto-start code is executed during the hotswap process.  I'm not sure whether my auto-start code is doing something unusual, or if the hotswap process causes it to execute before all my app's cod files are reloaded.  Regardless, it'll require further investigation.

 

Anyone else run into strange issues with hotswap on apps that have an alternate entry point that runs on device startup?

Developer
Posts: 292
Registered: ‎07-25-2008
My Device: Passport

Re: Eclipse 1.1 simulator hotswap shows IllegalArgumentException

Okay, hoping that someone else will notice this thread after another post, I'll add some more details...

 

When my auto-start code runs during device/simulator initialization, it works fine.

 

When my app is replaced during the new simulator hot-swap process, that auto-start code runs again.  That time, everything still works except two calls:

HomeScreen.updateIcon()

HomeScreen.setRolloverIcon()

 

Both of those calls throw multiple uncaught IllegalArgumentExceptions onto the simulator.  All the other calls I do at auto-start continue to work fine.

 

Now here's the fun part...  If I stick a Thread.sleep() at the top of my auto-start code (to hopefully make things settle first), it causes the whole routine to exit.  (So instead of pausing, the auto-start code ceases to execute at all.)