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
nedumaran
Posts: 8
Registered: ‎11-09-2008
My Device: Not Specified
Accepted Solution

Where do I find the dump of logged stack traces?

Hi,  I am using the NetBeans plugin and am able to compile into the .cod file.  A simple Hello World works fine. 

 

I have a rather large Java ME project that I'm trying to test on the BlackBerry.  While the MIDlet works fine on other emulators and real devices, it's trowing an exception somewhere in the code.

 

The BlackBerry 8130 emulator show that there is an uncaught null pointer exception and gives me a list of commands in a scroll list.  One of them is to "Dump Logged Stack Traces".  When I select this command, it says "Logged stacks dumped".

 

I'm not sure if this is dumped into a file or dumped away from memory.  There's nothing in the event log window either.

 

Is there anyway of seeing this trace?

 

I'm trying not to use the JDE as I am able to build the project in NetBeans entirely.  

 

MN. 

 

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Where do I find the dump of logged stack traces?

I think you will find it if you go to the Home/Ribbon Screen, hold the ALT key (Cntrl on your PC Keyboard) and type LGLG.  This will display the Eventlog and I suspect you will find you stack trace in there.

 

You might find it worthwhile to 'connect' to the simulator and debug directly with breakpoints etc.  But I have no idea how you do this from NetBeans sorry.  If you do a search round, you will probably find someone who has done this.

New Developer
nedumaran
Posts: 8
Registered: ‎11-09-2008
My Device: Not Specified

Re: Where do I find the dump of logged stack traces?

Thank you.  This is so helpful.  I am able to see the stack trace now.  I did not have a clue that the event log is on the simulator screen.  I was looking for a 'windows window' instead.  

 

Likewise, if there is a way to trap System.out.println messages somewhere, that'll be good. Like some of the Samsung and Motorola emulators that dump these messages in a command-window.

 

I've tried 'attaching' the debugger.  It does not always work.  I had to reset the simulator several times.

 

In any case, seeing the stack trace is already a big help.

 

MN. 

 

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Where do I find the dump of logged stack traces?

you can dl the eventlog from the device using javaloader
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
nedumaran
Posts: 8
Registered: ‎11-09-2008
My Device: Not Specified

Re: Where do I find the dump of logged stack traces?

So I do this by starting the emulator from command line with the bat file?  like 8130-Verizon.bat ?

 

MN 

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Where do I find the dump of logged stack traces?

nope. when debugging on the simulator you can easily use sysout. same with a device running while connected to your computer (remote-debugging).

if you want to download the eventlog to your computer do the following:
- attach the BB to your computer (with usb)
call 'javaloader -usb eventlog > eventlog.txt' from the commandline to load the eventlog into a txt file.
call 'javaloader -usb cleareventlog' if you want to clear the eventlog prior to testing.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
nedumaran
Posts: 8
Registered: ‎11-09-2008
My Device: Not Specified

Re: Where do I find the dump of logged stack traces?

I can get the System.out.println statements when I attach the debugger to the simulator.  This means, I have to have the JDE running.  I'm just wondering if this can be done without the JDE.

 

In other environments, I can start their emulator from the command line and all the System.out.println statements will go to the console I started the emulator from.

 

Is there an equivalent in the BB command-line tools?

  

Apologies for the newbie questions.  I am completely new to the BB toolset. 

 

MN 

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Where do I find the dump of logged stack traces?

see the developer guide, Appendix: The Eclipse development environment
JDWP is the remote debugging tool, you can connect your eclipse (or netbeans or whatever) to it
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter