Crashing Using Tutorial Code?

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: roger, 99jonathan, imaqine

Crashing Using Tutorial Code?

Postby spacewesterns » Fri Jan 18, 2013 2:55 pm

I was working my way through the lejos tutorial and got to the "Controlling the Motors". I used the code suggested for MotorTutor1 (http://lejos.sourceforge.net/nxt/nxj/tutorial/MotorTutorial/MotorTutor1.html. However I received a data abort error message after running on the brick. I would assume being a tutorial the code would be fine, so I'm quite perplexed about what the issue could be. I can use HelloWorld without any issue.

To compile and upload I did the following:

Code: Select all
nxjc MotorTutor1.java


Code: Select all
nxjlink -o MotorTutor1.nxj MotorTutor1


Code: Select all
nxjupload MotorTutor1.nxj


Help would be greatly appreciated!
spacewesterns
New User
 
Posts: 3
Joined: Fri Jan 18, 2013 2:47 pm

Re: Crashing Using Tutorial Code?

Postby skoehler » Fri Jan 18, 2013 3:27 pm

You're using leJOS 0.9.1-3?
Did you run any program successfully?
Have you upraded your leJOS recently, but forgot to flash the firmware of the brick?
skoehler
leJOS Team Member
 
Posts: 1108
Joined: Thu Oct 30, 2008 4:54 pm

Re: Crashing Using Tutorial Code?

Postby spacewesterns » Fri Jan 18, 2013 3:57 pm

Hi.

I have all the latest software/firmware (installed it all today). I have got two programs to work (HelloWorld and a bluetooth one I forget the name of) however I seem to get this issue with motor related programs (I've tried two so far).
spacewesterns
New User
 
Posts: 3
Joined: Fri Jan 18, 2013 2:47 pm

Re: Crashing Using Tutorial Code?

Postby skoehler » Fri Jan 18, 2013 4:28 pm

I just tried to reproduce the error. I copy/pasted the code of class MotorTutor1 from the link you provided. I then executed the commands that you mentioned. But the program worked as expected.
I assume, the Data Abort happens every time?

Can you, just to be sure, please run nxjflash again, preferably on the command line? Can you also make sure, that no other copy of leJOS is on your PC?
Data aborts are often caused by a version mismatch between the firmware on the NXT and leJOS on the PC.
skoehler
leJOS Team Member
 
Posts: 1108
Joined: Thu Oct 30, 2008 4:54 pm

Re: Crashing Using Tutorial Code?

Postby spacewesterns » Mon Jan 21, 2013 3:29 pm

In the end I got it working, but I had to install an older version of the firmware. Thanks for the advice.
spacewesterns
New User
 
Posts: 3
Joined: Fri Jan 18, 2013 2:47 pm

Re: Crashing Using Tutorial Code?

Postby skoehler » Mon Jan 21, 2013 3:57 pm

spacewesterns wrote:In the end I got it working, but I had to install an older version of the firmware. Thanks for the advice.

Wait what!? What firmware was on the NXT before you downgraded? Which version did you end up installing?
skoehler
leJOS Team Member
 
Posts: 1108
Joined: Thu Oct 30, 2008 4:54 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff