Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Mobile Tools for Java (MTJ) » Debugging a Midlet [caution MTJ noob inside]
Debugging a Midlet [caution MTJ noob inside] [message #25382] Mon, 12 January 2009 15:54 Go to next message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
Hello,

my appologize in advance if I was to blind to find the right place ind
documenation... But I have no idea where else I could/should look.

I am more or less experince Java Developer for a couple of years and
developing various Applications (web & fat) over the last 10 years...

My problem is, that I can't get the Midlet-Debugger to work in my eclipse

Version: 3.3.2
Build id: M20080221-1800

I have installed Sun's wt2.5.2_01 - and running my Midlet is no problem at
all - everything works smooth like silk... but as soon as I wanted to
start my Midlet in debugging mode I see in the console:

Connecting to 127.0.0.1 on port 2800
Waiting for debugger on port 4105
Waiting for KVM...
Connection received.

Then the Phone-Emulater Window opens... and the console continue with this
lines:

Running with storage root c:\myDocs\noob24\j2mewtk\2.5.2\appdb\QwertyDevice
Running with locale: German_Germany.1252
Running in the manufacturer security domain
Connected to KVM

Then the only thing I can see, is that the lauhcn progress bar indicates
that he is arround 87% and then after some additional few moments the
Phone-Emulator-Window is closing again and the process is terminated.

Any ideas, what to check? - Again running my Midlet (or some I have
downloaded as examples) working fine... But I am not able to run any of
them in debug mode.

It would really kind, if somebody could guide me in the right direction.

TIA
Matthias Marquardt
Re: Debugging a Midlet [caution MTJ noob inside] [message #25423 is a reply to message #25382] Mon, 12 January 2009 16:29 Go to previous messageGo to next message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
just one last thing to add:

the Process terminate with:

<terminated>PDPMIDlet [Wireless Toolkit Emulator]
<disconnected>QwertyDevice at localhost 4308
<terminated, exit value: -1073741819>cmd (12.01.09 17:27)
Re: Debugging a Midlet [caution MTJ noob inside] [message #25502 is a reply to message #25382] Mon, 12 January 2009 17:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: news.s237965939.online.de

Matthias Marquardt wrote:

> I have installed Sun's wt2.5.2_01 - and running my Midlet is no problem
> at all - everything works smooth like silk... but as soon as I wanted to
> start my Midlet in debugging mode I see in the console:

I don't have a solution for your particular problem, but consider to
download and install the Motorola SDK too. I have both installed and
find the Moto better than Sun in many ways. Give it a try, perhaps it
provides you with more useful information about what's going on.

Hans
Re: Debugging a Midlet [caution MTJ noob inside] [message #25542 is a reply to message #25423] Mon, 12 January 2009 20:32 Go to previous messageGo to next message
Gustavo de Paula is currently offline Gustavo de PaulaFriend
Messages: 118
Registered: July 2009
Senior Member
try to add a breakpoint to the startApp method to see if it stops. besides
that, when you run the debug for the first time it will request to do some
changes on the debug settings? is this happening in your eclipse?

regards,
gustavo
Re: Debugging a Midlet [caution MTJ noob inside] [message #25582 is a reply to message #25542] Mon, 12 January 2009 21:58 Go to previous messageGo to next message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
First of all thanks for your reply...

Gustavo de Paula wrote:

> try to add a breakpoint to the startApp method to see if it stops.
unfortunatly it does not stop - it happens exactly the same as before...
When I look at the command line (that is used to launch the app) then I do
not see anything "unnormal"...

RUN:
cmd /c emulator.exe
-classpath C:\temp\_mtj.tmpmarq24\PDPMidlet6370.launch\PDPMIDlet.jar
-Xdevice:QwertyDevice
-Xdescriptor:C:\temp\_mtj.tmpmarq24\PDPMidlet6370.launch\PDP Midlet.jad
-Xdomain:manufacturer
de.xxx.yyy.midlet.PDPMIDlet

DEBUG:
cmd /c emulator.exe
-Xdebug
-Xrunjdwp:transport=dt_socket,suspend=y,server=y,address=182 8
-classpath C:\temp\_mtj.tmpmarq24\PDPMidlet6369.launch\PDPMIDlet.jar
-Xdevice:QwertyDevice
-Xdescriptor:C:\temp\_mtj.tmpmarq24\PDPMidlet6369.launch\PDP Midlet.jad
-Xdomain:manufacturer
de.xxx.yyy.midlet.PDPMIDlet

When I go to my 'jdk\wt2.5.2_01\bin' directory and launch there these
command lines (RUN/DEBUG) in both cases the Phone-Sim-Window shows up -
and they stayed up... Of course the DEBUG cmd line will cause to "hang"
since it looks like that the break point (I have set) is reached - but
since there is no connection to the IDE (obviously - since I have started
the app outside of eclipse) I could not step over this break point.


> besides that, when you run the debug for the first time
> it will request to do some changes on the debug settings?
> is this happening in your eclipse?
No - is does not - just allow me to repeat: You are saying, when I start
my Midlet in debug mode, the first thing that should happen is, that an
additional dialog should show up? - This does not happen for sure - even
when I start a complete new Midlet-Project. What kind of dialog should
that be? And what values I sould be able to adjust in there?

Matthias

> regards,
> gustavo
Re: Debugging a Midlet [caution MTJ noob inside] [message #25620 is a reply to message #25582] Mon, 12 January 2009 22:12 Go to previous messageGo to next message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
Matthias Marquardt wrote:
> ...Of course the DEBUG cmd line will cause to "hang"
> since it looks like that the break point (I have set) is reached - but
> since there is no connection to the IDE (obviously - since I have started
> the app outside of eclipse) I could not step over this break point.
this might be totally nonsense - sorry...

When I start the Midlet with the DEBUG cmd line options, then it's more
like, that my midlet does not start at all in the Phone-Sim-Window (the
window show up, but no matter what I do in the Midlet Constructor [like
System.out.println(...)] this output will not be shown
Re: Debugging a Midlet [caution MTJ noob inside] [message #25686 is a reply to message #25620] Tue, 13 January 2009 00:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: craigjunk.setera.org

If you have not already, verify that your debug settings look similar to
these: http://eclipseme.org/docs/configuring.html#step4

(NOTE: I'm not sure where we are keeping the MTJ docs, but the EclipseME
docs should be pretty close in this case)

Matthias Marquardt wrote:
> Matthias Marquardt wrote:
>> ...Of course the DEBUG cmd line will cause to "hang"
>> since it looks like that the break point (I have set) is reached - but
>> since there is no connection to the IDE (obviously - since I have
>> started the app outside of eclipse) I could not step over this break
>> point.
> this might be totally nonsense - sorry...
>
> When I start the Midlet with the DEBUG cmd line options, then it's more
> like, that my midlet does not start at all in the Phone-Sim-Window (the
> window show up, but no matter what I do in the Midlet Constructor [like
> System.out.println(...)] this output will not be shown
>
Re: Debugging a Midlet [caution MTJ noob inside] [message #25712 is a reply to message #25686] Tue, 13 January 2009 13:41 Go to previous messageGo to next message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
Thanks for your reply - yes indeed I have read & follow the prepare
Eclipse Section in the documentation.

I though the problem might had to do with the virus & firewall software
that is running here on my companys laptop, so I decided to install
everything frrom scratch on my private desktop.

The result is, that I can exactly launch any Midlet once per OS-Start. The
second time I launch the Midlet in Debug mode, the zayit.exe will crash
(In XP you get this: "zayit.exe caused a Problem - Do you want to send a
problem report")... (I can pos here the XML that is generated as well -
but I assume it will not help too much - since you are not developing the
WT) [I get this Dialog on my private Desktop only since the company
security policy is truncating this on my development Notebook]...

So when I reboot the system I can debug my Midlet once again for a single
time - the second time I get this "zayit.exe caused a Problem" thing
again. This is also reproducable on my Notebook [and I appologize for the
confusion I might have caused].

Actually it looks like the 'sun_java_wireless_toolkit-2.5.2_01-win.exe' is
the root ob the problem. Currently I am trying to get another version of
the sjwt (might be that the 2.5.2 or 2.5.1 will work for me)

Matthias
Re: Debugging a Midlet [caution MTJ noob inside] [message #25733 is a reply to message #25712] Tue, 13 January 2009 19:36 Go to previous messageGo to next message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
so it looks like that this is not a MTJ Problem at all - seams to me, that
this is a sun_java_wireless_toolkit problem - I have tried 2.5.1, 2.5.2 &
2.5.2_01 - with all of this versions I have the same problem:

Booting the PC, running the Debugger once - from there on I always
crashes...

Also got my hands on this sun_java_me_sdk-3_0-ea-win.exe - with that the
debugging seams to be working - but right now I am very confused about the
device definitions that comes with this ME SDK 3.0

So my final question: Is there another WTK, that's recomend to use (I plan
to develop phone vendor independant Midlet's...)
Re: Debugging a Midlet [caution MTJ noob inside] [message #25833 is a reply to message #25733] Tue, 13 January 2009 20:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: news.s237965939.online.de

Matthias Marquardt schrieb:
> So my final question: Is there another WTK, that's recomend to use (I
> plan to develop phone vendor independant Midlet's...)

as I wrote before: try the Motorola SDK, IIRC it's called Motodev Studio.

Take a look to
http://developer.motorola.com/docstools/motodevstudio/javame /

Hans
Re: Debugging a Midlet [caution MTJ noob inside] [message #26199 is a reply to message #25382] Mon, 19 January 2009 09:16 Go to previous message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
Finally I found a workarround - do not ask my, why this is working - but
actually it does:

Adding a Entry breakpoint of the Method 'initializeInternalSecurity' in
the class 'com.sun.midp.main.Main'

so now each time I fire up my Midlet in DEBUG Mod the debugger stops at
this method but do not cause the crash of the zayit.exe
Re: Debugging a Midlet [caution MTJ noob inside] [message #570214 is a reply to message #25382] Mon, 12 January 2009 16:29 Go to previous message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
just one last thing to add:

the Process terminate with:

<terminated>PDPMIDlet [Wireless Toolkit Emulator]
<disconnected>QwertyDevice at localhost 4308
<terminated, exit value: -1073741819>cmd (12.01.09 17:27)
Re: Debugging a Midlet [caution MTJ noob inside] [message #570362 is a reply to message #25382] Mon, 12 January 2009 17:35 Go to previous message
Eclipse UserFriend
Originally posted by: news.s237965939.online.de

Matthias Marquardt wrote:

> I have installed Sun's wt2.5.2_01 - and running my Midlet is no problem
> at all - everything works smooth like silk... but as soon as I wanted to
> start my Midlet in debugging mode I see in the console:

I don't have a solution for your particular problem, but consider to
download and install the Motorola SDK too. I have both installed and
find the Moto better than Sun in many ways. Give it a try, perhaps it
provides you with more useful information about what's going on.

Hans
Re: Debugging a Midlet [caution MTJ noob inside] [message #570376 is a reply to message #25423] Mon, 12 January 2009 20:32 Go to previous message
Gustavo de Paula is currently offline Gustavo de PaulaFriend
Messages: 118
Registered: July 2009
Senior Member
try to add a breakpoint to the startApp method to see if it stops. besides
that, when you run the debug for the first time it will request to do some
changes on the debug settings? is this happening in your eclipse?

regards,
gustavo
Re: Debugging a Midlet [caution MTJ noob inside] [message #570389 is a reply to message #25542] Mon, 12 January 2009 21:58 Go to previous message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
First of all thanks for your reply...

Gustavo de Paula wrote:

> try to add a breakpoint to the startApp method to see if it stops.
unfortunatly it does not stop - it happens exactly the same as before...
When I look at the command line (that is used to launch the app) then I do
not see anything "unnormal"...

RUN:
cmd /c emulator.exe
-classpath C:\temp\_mtj.tmpmarq24\PDPMidlet6370.launch\PDPMIDlet.jar
-Xdevice:QwertyDevice
-Xdescriptor:C:\temp\_mtj.tmpmarq24\PDPMidlet6370.launch\PDP Midlet.jad
-Xdomain:manufacturer
de.xxx.yyy.midlet.PDPMIDlet

DEBUG:
cmd /c emulator.exe
-Xdebug
-Xrunjdwp:transport=dt_socket,suspend=y,server=y,address=182 8
-classpath C:\temp\_mtj.tmpmarq24\PDPMidlet6369.launch\PDPMIDlet.jar
-Xdevice:QwertyDevice
-Xdescriptor:C:\temp\_mtj.tmpmarq24\PDPMidlet6369.launch\PDP Midlet.jad
-Xdomain:manufacturer
de.xxx.yyy.midlet.PDPMIDlet

When I go to my 'jdk\wt2.5.2_01\bin' directory and launch there these
command lines (RUN/DEBUG) in both cases the Phone-Sim-Window shows up -
and they stayed up... Of course the DEBUG cmd line will cause to "hang"
since it looks like that the break point (I have set) is reached - but
since there is no connection to the IDE (obviously - since I have started
the app outside of eclipse) I could not step over this break point.


> besides that, when you run the debug for the first time
> it will request to do some changes on the debug settings?
> is this happening in your eclipse?
No - is does not - just allow me to repeat: You are saying, when I start
my Midlet in debug mode, the first thing that should happen is, that an
additional dialog should show up? - This does not happen for sure - even
when I start a complete new Midlet-Project. What kind of dialog should
that be? And what values I sould be able to adjust in there?

Matthias

> regards,
> gustavo
Re: Debugging a Midlet [caution MTJ noob inside] [message #570407 is a reply to message #25582] Mon, 12 January 2009 22:12 Go to previous message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
Matthias Marquardt wrote:
> ...Of course the DEBUG cmd line will cause to "hang"
> since it looks like that the break point (I have set) is reached - but
> since there is no connection to the IDE (obviously - since I have started
> the app outside of eclipse) I could not step over this break point.
this might be totally nonsense - sorry...

When I start the Midlet with the DEBUG cmd line options, then it's more
like, that my midlet does not start at all in the Phone-Sim-Window (the
window show up, but no matter what I do in the Midlet Constructor [like
System.out.println(...)] this output will not be shown
Re: Debugging a Midlet [caution MTJ noob inside] [message #570532 is a reply to message #25620] Tue, 13 January 2009 00:33 Go to previous message
Craig Setera is currently offline Craig SeteraFriend
Messages: 54
Registered: July 2009
Member
If you have not already, verify that your debug settings look similar to
these: http://eclipseme.org/docs/configuring.html#step4

(NOTE: I'm not sure where we are keeping the MTJ docs, but the EclipseME
docs should be pretty close in this case)

Matthias Marquardt wrote:
> Matthias Marquardt wrote:
>> ...Of course the DEBUG cmd line will cause to "hang"
>> since it looks like that the break point (I have set) is reached - but
>> since there is no connection to the IDE (obviously - since I have
>> started the app outside of eclipse) I could not step over this break
>> point.
> this might be totally nonsense - sorry...
>
> When I start the Midlet with the DEBUG cmd line options, then it's more
> like, that my midlet does not start at all in the Phone-Sim-Window (the
> window show up, but no matter what I do in the Midlet Constructor [like
> System.out.println(...)] this output will not be shown
>
Re: Debugging a Midlet [caution MTJ noob inside] [message #570543 is a reply to message #25686] Tue, 13 January 2009 13:41 Go to previous message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
Thanks for your reply - yes indeed I have read & follow the prepare
Eclipse Section in the documentation.

I though the problem might had to do with the virus & firewall software
that is running here on my companys laptop, so I decided to install
everything frrom scratch on my private desktop.

The result is, that I can exactly launch any Midlet once per OS-Start. The
second time I launch the Midlet in Debug mode, the zayit.exe will crash
(In XP you get this: "zayit.exe caused a Problem - Do you want to send a
problem report")... (I can pos here the XML that is generated as well -
but I assume it will not help too much - since you are not developing the
WT) [I get this Dialog on my private Desktop only since the company
security policy is truncating this on my development Notebook]...

So when I reboot the system I can debug my Midlet once again for a single
time - the second time I get this "zayit.exe caused a Problem" thing
again. This is also reproducable on my Notebook [and I appologize for the
confusion I might have caused].

Actually it looks like the 'sun_java_wireless_toolkit-2.5.2_01-win.exe' is
the root ob the problem. Currently I am trying to get another version of
the sjwt (might be that the 2.5.2 or 2.5.1 will work for me)

Matthias
Re: Debugging a Midlet [caution MTJ noob inside] [message #570554 is a reply to message #25712] Tue, 13 January 2009 19:36 Go to previous message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
so it looks like that this is not a MTJ Problem at all - seams to me, that
this is a sun_java_wireless_toolkit problem - I have tried 2.5.1, 2.5.2 &
2.5.2_01 - with all of this versions I have the same problem:

Booting the PC, running the Debugger once - from there on I always
crashes...

Also got my hands on this sun_java_me_sdk-3_0-ea-win.exe - with that the
debugging seams to be working - but right now I am very confused about the
device definitions that comes with this ME SDK 3.0

So my final question: Is there another WTK, that's recomend to use (I plan
to develop phone vendor independant Midlet's...)
Re: Debugging a Midlet [caution MTJ noob inside] [message #570598 is a reply to message #25733] Tue, 13 January 2009 20:06 Go to previous message
Eclipse UserFriend
Originally posted by: news.s237965939.online.de

Matthias Marquardt schrieb:
> So my final question: Is there another WTK, that's recomend to use (I
> plan to develop phone vendor independant Midlet's...)

as I wrote before: try the Motorola SDK, IIRC it's called Motodev Studio.

Take a look to
http://developer.motorola.com/docstools/motodevstudio/javame /

Hans
Re: Debugging a Midlet [caution MTJ noob inside] [message #570913 is a reply to message #25382] Mon, 19 January 2009 09:16 Go to previous message
Matthias Marquardt is currently offline Matthias MarquardtFriend
Messages: 14
Registered: July 2009
Junior Member
Finally I found a workarround - do not ask my, why this is working - but
actually it does:

Adding a Entry breakpoint of the Method 'initializeInternalSecurity' in
the class 'com.sun.midp.main.Main'

so now each time I fire up my Midlet in DEBUG Mod the debugger stops at
this method but do not cause the crash of the zayit.exe
Previous Topic:[mtj 0.9.1+Eclipse 3.4.l+WTK 2.5.2]mtj console output garbage character
Next Topic:ClassLoader hook bug fix?
Goto Forum:
  


Current Time: Wed Nov 26 16:52:18 GMT 2014

Powered by FUDForum. Page generated in 0.04408 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software