BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-22-2008, 09:57 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Uncaught exception thrown...

Please Login to Remove!

Hey, i'm trying to develop a program and i'm using the JDE.
everything was going fine until i run my program and receive an Uncaught exception thrown.
all the errors before i execute are easy to understand and read
but once i'm executing the Debugger and i get an exception thrown, i can't read any of that
it shows me Method called and lines where it was called but all that lead me to "source code is not available".
On the botton i have the name of each method called....but what metters is where is my mistake? and i can't find it, and also the debugger is not helping me at all...
can someone help me to read all this messages comming from the debugger so that maybe i can find a hint of where is my error...?
Offline  
Old 07-22-2008, 10:09 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

First question, "what is the exception"?

Your best tool for this is the call stack - keep backing down the call stack until you get to the call in *your* code that started the problem. If the call stack is not displayed in your JDE, enable it in "View / Call Stack"
Offline  
Old 07-22-2008, 10:16 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

yea, but my call stack has 14 calls....

if you mean get the first one..it says: "RibbonLauncherApp.main(String[])" on line 82.

And yes, i would love to know what exception is it too...but i don't even know what RibbonLauncherApp means..
Offline  
Old 07-22-2008, 10:31 AM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

You should have an exception object pop up in your "variables" section of the JDE display. This tells you which exception was tossed (like NullPointerException,. something like that).

Then, you have to walk down your call stack (in the stack display window) until you find the last call made *from your code*.
Offline  
Old 07-22-2008, 10:42 AM   #5 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok... i got:

Runtime Exception
ApplicationManagerException

but then when i look to the stacks, there are lots of method calls, and they make no sense after a while...it is not connected anymore
and the lines increase, but then start from a low number again, and increase...


but i still can't find where the Exception is comming from...
Offline  
Old 07-22-2008, 10:50 AM   #6 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

The answer should be there in your call stack.

The only other suggestion would be to localize the issue by placing strategic breakpoints in the code, prior to the point where you think the exception is being thrown, and single-stepping the application until you trigger the exception.
Offline  
Old 07-22-2008, 10:53 AM   #7 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

yea i thought about that but what can i put in there to show me like "hey, i passed here..."?
cause when i use to do in other apps, i would simply do System.out.println();
i don't think a println would show anywhere..so what could i use instead?
Offline  
Old 07-22-2008, 11:40 AM   #8 (permalink)
New Member
 
Join Date: Jun 2008
Model: 7290
PIN: N/A
Carrier: Cingular
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

System.out.println shows up on the console...

http://i69.photobucket.com/albums/i5...us/console.jpg
Offline  
Old 07-22-2008, 11:50 AM   #9 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Uhm...That's weird
It doesn't show on mine...at all
is that any configuration for that?

here, look:

Offline  
Old 07-22-2008, 12:08 PM   #10 (permalink)
New Member
 
Join Date: Jun 2008
Model: 7290
PIN: N/A
Carrier: Cingular
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Put a breakpoint at the println and step over it once, does it not show up on the console? Otherwise, I think your println is just getting buried by the initialization information...

http://i69.photobucket.com/albums/i5...us/consol2.jpg
Offline  
Old 07-22-2008, 12:10 PM   #11 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

i used Alt+F to look for a String called "Debug" and i received String not found.



i put many SOP on the whole program, like Debug 1, Debug 2, Debug 3...i didn't see any on the console, and Alt+F doesn't find "Debug" either... O_O
Offline  
Old 07-22-2008, 12:12 PM   #12 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

and the SOP("Debug") is right under the public static main(String[]args);



it should show at least the first one. :S
Offline  
Old 07-22-2008, 12:22 PM   #13 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey
when i go to my breakpoint options, here is how it looks...
see if i'm doing anything wrong

Offline  
Old 07-22-2008, 12:24 PM   #14 (permalink)
Thumbs Must Hurt
 
Join Date: Dec 2005
Model: 8310
Carrier: Rogers
Posts: 138
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well it looks like you have errors with modules being loaded into the device more than once. To be more specific, you're trying to execute the ContactModel demo, and the class com.rim.samples.device.contactsdemo.ContactModel has more than one definition in the simulator. The exception is occurring on app launcher by the looks of it so it's reasonable that your app isn't even being executed, and therefore no code in your main function is being run. I would clean your simulator files and try launching it again.
Offline  
Old 07-22-2008, 12:43 PM   #15 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

but on the Project i activated only one project...
Offline  
Old 07-22-2008, 12:50 PM   #16 (permalink)
Thumbs Must Hurt
 
Join Date: Dec 2005
Model: 8310
Carrier: Rogers
Posts: 138
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well breaking on startup is probably something you don't want to do... but that doesn't solve your module problems.

Uncheck that option and see what happens.
Offline  
Old 07-22-2008, 01:30 PM   #17 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

now not even my simulator is working anymore

i tried cleaning the folder with the Clean.bat file, like 5 times and it doesnt work


errrrrrr
Offline  
Old 07-22-2008, 01:37 PM   #18 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok...i fixed it but still not receiving the printlns



Offline  
Old 07-22-2008, 01:57 PM   #19 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

I see that you have breakpoints on these two println statements - are you hitting the breakpoints?
Offline  
Old 07-22-2008, 02:14 PM   #20 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

it does break...
but the printlines do not show on the console

if i take out the breakline it's going to run all the way, show the errors and not show any Printlns :(
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.