|
|
|
07-22-2008, 09:57 AM
|
#1
|
Thumbs Must Hurt
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
|
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
|
|
07-22-2008, 10:09 AM
|
#2
|
BlackBerry Extraordinaire
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
|
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
|
|
07-22-2008, 10:16 AM
|
#3
|
Thumbs Must Hurt
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
|
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
|
|
07-22-2008, 10:31 AM
|
#4
|
BlackBerry Extraordinaire
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
|
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
|
|
07-22-2008, 10:42 AM
|
#5
|
Thumbs Must Hurt
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
|
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
|
|
07-22-2008, 10:50 AM
|
#6
|
BlackBerry Extraordinaire
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
|
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
|
|
07-22-2008, 10:53 AM
|
#7
|
Thumbs Must Hurt
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
|
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
|
|
07-22-2008, 11:40 AM
|
#8
|
New Member
Join Date: Jun 2008
Model: 7290
PIN: N/A
Carrier: Cingular
Posts: 14
|
|
Offline
|
|
07-22-2008, 11:50 AM
|
#9
|
Thumbs Must Hurt
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
|
Uhm...That's weird
It doesn't show on mine...at all
is that any configuration for that?
here, look:
|
Offline
|
|
07-22-2008, 12:08 PM
|
#10
|
New Member
Join Date: Jun 2008
Model: 7290
PIN: N/A
Carrier: Cingular
Posts: 14
|
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
|
|
07-22-2008, 12:10 PM
|
#11
|
Thumbs Must Hurt
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
|
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
|
|
07-22-2008, 12:12 PM
|
#12
|
Thumbs Must Hurt
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
|
and the SOP("Debug") is right under the public static main(String[]args);
it should show at least the first one. :S
|
Offline
|
|
07-22-2008, 12:22 PM
|
#13
|
Thumbs Must Hurt
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
|
hey
when i go to my breakpoint options, here is how it looks...
see if i'm doing anything wrong
|
Offline
|
|
07-22-2008, 12:24 PM
|
#14
|
Thumbs Must Hurt
Join Date: Dec 2005
Model: 8310
Carrier: Rogers
Posts: 138
|
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
|
|
07-22-2008, 12:43 PM
|
#15
|
Thumbs Must Hurt
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
|
but on the Project i activated only one project...
|
Offline
|
|
07-22-2008, 12:50 PM
|
#16
|
Thumbs Must Hurt
Join Date: Dec 2005
Model: 8310
Carrier: Rogers
Posts: 138
|
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
|
|
07-22-2008, 01:30 PM
|
#17
|
Thumbs Must Hurt
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
|
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
|
|
07-22-2008, 01:37 PM
|
#18
|
Thumbs Must Hurt
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
|
ok...i fixed it but still not receiving the printlns
|
Offline
|
|
07-22-2008, 01:57 PM
|
#19
|
BlackBerry Extraordinaire
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
|
I see that you have breakpoints on these two println statements - are you hitting the breakpoints?
|
Offline
|
|
07-22-2008, 02:14 PM
|
#20
|
Thumbs Must Hurt
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
|
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
|
|
|
|