Hi,
I was making a game for the NXT (in nxc) and encountered a problem.
When I try to add sound effects in the game, the NXT gets stuck and plays a very soft clicking sound, like when it is in firmware mode.
Why is it doing this?
Thanks,
nxtboy III
[NXC] Program crashing. Help!
[NXC] Program crashing. Help!
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
-
- Posts: 220
- Joined: 23 Jan 2012, 17:07
- Location: Round Rock, TX
Re: [NXC] Program crashing. Help!
Standard response #1: Please post your code.
McSummation aka James
http://www.mcsummation.com/Mindstorms/
http://www.mcsummation.com/Mindstorms/
Re: [NXC] Program crashing. Help!
It is possible to crash the VM and if your code does that somehow then your brick will click until you pull a battery and put it back in. You may be running out of RAM and the VM is not handling that well. It is hard to be certain without more information but just posting a really large program may not help (too much information). It would be best if you could compare a "works perfectly" version with a "crashes the brick" version and tell us about the changes you made.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: [NXC] Program crashing. Help!
Well, actually, i used the GetMemoryInfo function and saw that the pool size was only around 4500.
So either the function is not working properly or I am doing something wrong with that function, or it is not a RAM problem.
So either the function is not working properly or I am doing something wrong with that function, or it is not a RAM problem.
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: [NXC] Program crashing. Help!
Another way of restarting the NXT, that is often easier that pulling a battery, is to press the reset button for a very short time. Holding it for a few seconds will actually reset the NXT, and not just restart it.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: [NXC] Program crashing. Help!
So, what is the problem if the pool size is only about 4,500?
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
Re: [NXC] Program crashing. Help!
There are a lot of ways you can crash the VM. It may not be that you are running out of memory. Go back to the version that worked without crashing and then figure out what changes you made that led to the crashing behavior.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Who is online
Users browsing this forum: No registered users and 0 guests