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
New Developer
rzuasti
Posts: 2
Registered: ‎02-05-2009
My Device: Not Specified

Insane 104 error

Hi, we are porting a JME application to the Blackberry using JDE 4.2.1. The convertion process works fine, either converting the JAD/JAR to .COD, or re-building the application entirely from sources to .COD.

 

But when the application is executed the blackberry exits with a 104 error (which according to documentation is an uncaught exception), but the application code is completely sorrounded with a catch (Exception) so it really doesn't make any sense.

 

What possible actions can be taken to determine the source of the error?

 

Thanks!

Ricardo

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Insane 104 error

A couple of problem determination avenues:

 

If you are using javaloader to put your COD files on the device for testing, you can also use this tool to retireve the event log. Search the log for any exceptions that pertain to you app.

 

If not, you can access the event log on the device as follows:

 

For trackball devices: go to the home screen and type <alt> LGLG

 

For Touch devices:

go to the home screen, press MENU

select "show keyboard"

hold the <?123> key for a few seconds (you'll see the "?123" icon appear in the upper-right corner of the display)

now press , 5 , 5  (comma 5 comma 5)

 

Good luck!

 

 

 

Please use plain text.
Administrator
MSohm
Posts: 14,418
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Insane 104 error

Are you seeing this on a real BlackBerry handheld or just the BlackBerry Simulator?  To aid in debugging, the BlackBerry Simulator is configured to display the JVM 104 error screen whenever an uncaught exception is thrown.  Note that this means the exception could be occuring outside of your application (within a RIM API).  In most of these cases the error may not be shown to the user and an application can work fine.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
atleta
Posts: 71
Registered: ‎03-10-2009
My Device: Not Specified

Re: Insane 104 error


MSohm wrote:

BlackBerry Simulator is configured to display the JVM 104 error screen whenever an uncaught exception is thrown


But he said that his code is surrounded with a try catch. Didn't you mean unchecked (i.e.RuntimeException and possibly Error) descendant instead of uncaought? My experience is the same: it doesn't matter that I have a catch( Throwable ) at toplevel to handle the bugs somewhat gracefully, the emulator will popup this unusable nonsense.

 

What can we do with this error screen BTW? It offers logging the stacktrace, but it's not visible anywhere. Maybe in the LGLG secret hidden log, but it shows up anyway, and if you can't force your app to continue (e.g. in the case of a ClassCastException) then you're at a dead end. Then there is the catfail thing, that dumps a zip file with a binary dump that nobody understands. Standard out would be simple and nice just as with the WTK emulator (given that there was a window to see it...), and if the simplething worked, you could do all kinds of tricks. (Note that I'm talking amout the 4.5.0 and the 4.2.1 emulator as I have to use those know.)

Please use plain text.
Administrator
MSohm
Posts: 14,418
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Insane 104 error

The exception could be occurring under the covers from another application running in the BlackBerry Simulator (the preloaded applications).  The exception may not be originating from your application, but it may be the trigger.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
atleta
Posts: 71
Registered: ‎03-10-2009
My Device: Not Specified

Re: Insane 104 error

Mark,

 

Thanks for the reply, but I was talking about the general problem of a missing (misbehaving?) tool, not an exception in my code.

 


MSohm wrote:
The exception could be occurring under the covers from another application running in the BlackBerry Simulator (the preloaded applications).  The exception may not be originating from your application, but it may be the trigger.

 

Actually that's what the stack trace is for, so that we can find where the excetpion comes from. One problem is that it's really hard and inconvenient to access.We have to manually start the log viewer (that I didn't actually know about until very recently), butyou won't be able to do this if you have a real showstopping exception, say a ClassCast one as I said above. In this case your app won't go on and thus you wont be able to launchthe log viewer. There should be a tool and/or a menu action to get the stack trace for the current exception. The funny thing is that you can do it on the device using javaloader, so there are cases when it's easier to debug using the a real device. I can't see why the same couldn't be done for the emulator.

 

The other problem is that this screen pops up even if an exception is properly handled. Based on your previous comment I think it only happens for unchecked exceptions, i.e. ones that you don't have to catch (* extends RuntimeExcepion and maybe Errors as well). Though you said uncaught exceptions, but I do have some code that properly handles the exsceptions still it invokes the error screen. The exception is thrown from my code (actually an external library called momelog) and it is handled there as well.

 

A simple example:

 

try {
throw new RuntimeException( "Whatever" );
} catch ( Throwable e ) {
// Exception is handled here
}

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Insane 104 error

I've not reviewed this in depth, so perhaps this is tosh, but if the java loader determines that there is a cod missing to run an application (which is the gist of a 104 I think), it can't actually validly start the application can it?  So any try catches in the application can't be invoked since the application is not even started.
Please use plain text.