View unanswered posts | View active topics It is currently Fri Sep 21, 2018 9:05 pm






Reply to topic  [ 4 posts ] 
NXT, RobotC v4.30, Windows 7 Bug Report 
Author Message
Rookie

Joined: Sat Mar 07, 2015 7:32 pm
Posts: 3
Post NXT, RobotC v4.30, Windows 7 Bug Report
When connected to the NXT through USB, running the following code will freeze the NXT and RobotC:

Code:
task main()
{
   clearDebugStream();
   while(true) {
      writeDebugStreamLine("Test");
   }
}


The only way to recover is to disconnect the NXT and power cycle it.

Adding a
Code:
wait1Msec(1000);

inside the while loop seems to fix the issue, but smaller values such as
Code:
wait1Msec(50);

will continue to crash occasionally.

We switched to a Bluetooth connection and that resulted in no problems, but we thought you guys would want to know about this issue :)

_________________
FTC 5421 - RM'd and Dangerous


Sat Mar 07, 2015 7:52 pm
Profile
Rookie

Joined: Sat Mar 07, 2015 7:32 pm
Posts: 3
Post Re: NXT, RobotC v4.30, Windows 7 Bug Report
I'm not quite sure how it worked over bluetooth yesterday, but the same code now crashes over the bluetooth connection as well when we ran it today.

We tried checking against getAvailSpaceInDebugStream() like so, which works fine:
Code:
while(true) {
  if (getAvailSpaceInDebugStream() > 8) {
    writeDebugStream("Test\n");
  } else if (getAvailSpaceInDebugStream() > 1) {
    writeDebugStream("s");
  }
}


Interestingly enough, RobotC v3.65 does not crash when the original code without the space check was run, which was why this issue popped up when we migrated our code base over to version 4.30. I'm not sure if that is intentional or not.

_________________
FTC 5421 - RM'd and Dangerous


Sun Mar 08, 2015 2:25 pm
Profile
Rookie

Joined: Sat Mar 07, 2015 7:32 pm
Posts: 3
Post Re: NXT, RobotC v4.30, Windows 7 Bug Report
Checking against getAvailSpaceInDebugStream() does not work with stringFormat, apparently. The following code will also cause a crash.

Code:
while (true) {
   string msg;
   stringFormat(msg, "%d\n", 0);
   if (strlen(msg) < getAvailSpaceInDebugStream()) {
      writeDebugStream(msg);
   }
}

For us, this pretty much renders debugStream unusable so we will be switching back over to RobotC v3.65.

_________________
FTC 5421 - RM'd and Dangerous


Sun Mar 08, 2015 8:24 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 620
Post Re: NXT, RobotC v4.30, Windows 7 Bug Report
Thanks for the post + bug report. We just recently updated some of the debug stream functionality to add more flexibility and make it more reliable during high-speed writing to it.

I'm prioritizing the investigation into this and we'll definitely have it fixed for the next build.

Thanks!

_________________
Timothy Friez
ROBOTC Developer - SW Engineer
tfriez@robotc.net


Mon Mar 09, 2015 10:56 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 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

Search for:
Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.