lejos.nxt.remote.LCPException: Insufficient memory available

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

Moderators: 99jonathan, roger, imaqine

lejos.nxt.remote.LCPException: Insufficient memory available

Postby bburd » Fri Jan 10, 2014 8:06 pm

I'm new to NXT and LeJOS. Some of my small programs get the error messages shown below. The size of my upload is less than 3KB (not large enough to run out of space on the NXJ). How can I diagnose the problem? Thanks.

Linking ...
Program has been linked successfully
Uploading ...
Found NXT: NXT 00165313A4A1
lejos.nxt.remote.LCPException: Insufficient memory available
at lejos.nxt.remote.NXTCommand.openWrite(NXTCommand.java:179)
at lejos.nxt.remote.NXTCommand.uploadFile(NXTCommand.java:398)
at lejos.pc.tools.Upload.upload(Upload.java:46)
at lejos.pc.tools.NXJUpload.run(NXJUpload.java:93)
at lejos.pc.tools.NXJUpload.start(NXJUpload.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at lejos.pc.tools.ToolStarter.startTool(ToolStarter.java:31)
at lejos.pc.tools.NXJUpload.main(NXJUpload.java:29)
uploading the program failed with exit status 1
bburd
New User
 
Posts: 3
Joined: Fri Jan 10, 2014 7:59 pm

Re: lejos.nxt.remote.LCPException: Insufficient memory avail

Postby bburd » Fri Jan 10, 2014 9:10 pm

I have a bit more info; namely, the code in NXTCommand.java where the crash occurs:

byte[] reply = nxtComm.sendRequest(request, 4);
if (reply == null || reply.length != 4) {
throw new IOException("Invalid return from OPEN WRITE");
} else if (reply[2] != ErrorMessages.SUCCESS) {
throw new LCPException(reply[2]); // Here's where my crash occurs
}
bburd
New User
 
Posts: 3
Joined: Fri Jan 10, 2014 7:59 pm

Re: lejos.nxt.remote.LCPException: Insufficient memory avail

Postby gloomyandy » Fri Jan 10, 2014 9:30 pm

The error means that there is not sufficient space in the NXT file system. Are you sure there is space to upload your program to the brick?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3881
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: lejos.nxt.remote.LCPException: Insufficient memory avail

Postby bburd » Tue Jan 14, 2014 6:15 am

Thank you. That fixed it. I forgot that programs downloaded onto the NXT stay there (and consume memory) until I delete them from the device.
bburd
New User
 
Posts: 3
Joined: Fri Jan 10, 2014 7:59 pm


Return to NXJ Software

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests

more stuff