|
Page 1 of 1
|
[ 5 posts ] |
|
RobotC 3.51 Bug #2 - Brick crashing
Author |
Message |
nateww
Rookie
Joined: Fri Apr 15, 2011 10:29 am Posts: 37
|
 RobotC 3.51 Bug #2 - Brick crashing
This should read a single character 'a' and print it out to the screen. However, it crashes my brick. The following program works fine. A more realistic example
|
Sat Sep 29, 2012 1:08 pm |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: RobotC 3.51 Bug #2 - Brick crashing
buffer is declared as a char pointer and the code above is not really printing the first char on the screen. It should have printed the first byte of the pointer value as a character. So the code is incorrect but Brick should not crash though. If you change your code to the following, it should work.
|
Sat Sep 29, 2012 2:16 pm |
|
 |
nateww
Rookie
Joined: Fri Apr 15, 2011 10:29 am Posts: 37
|
 Re: RobotC 3.51 Bug #2 - Brick crashing
*Erk* Boy, is my C rusty. Too many years of Java and other interpreted languages and I lose all my pointer knowledge. Thanks MHTS! Nate
|
Sat Sep 29, 2012 9:42 pm |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: RobotC 3.51 Bug #2 - Brick crashing
Even the code was wrong, RobotC should not generate code that cause the brick to crash though. I would expect it to display some random value corresponding to the value of the pointer.
|
Sun Sep 30, 2012 1:10 am |
|
 |
Dick Swan
Creator
Joined: Fri Feb 09, 2007 9:21 am Posts: 616
|
 Re: RobotC 3.51 Bug #2 - Brick crashing
Yes. Even the wrong code should not crash the brick. I tried to reproduce the crash and couldn't. I suspect this is one that has already been fixed and either has not yet been released or was not released at the time the original bug was reported. If the problem still persists with the next release, please repost again as I couldn't reproduce the crash using the latest unreleased version of ROBOTC.
|
Tue Oct 02, 2012 12:12 am |
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|