View unanswered posts | View active topics It is currently Fri Apr 18, 2014 4:57 am






Reply to topic  [ 2 posts ] 
RobotC Crash Report when 
Author Message
Rookie

Joined: Sat Apr 23, 2011 12:29 am
Posts: 12
Post RobotC Crash Report when
Hi,
I know that this is not possible, but it crashes the program when i do this:

string Msg = "";
Msg = Msg + DataRec[k];

In my program:
Code:
task main(){

  ubyte DataRec[255];
  int msgSize = 0;
  string Msg = "";
  //setBluetoothVisibility(true);
  //setBluetoothOn();

  //setBluetoothRawDataMode();

  wait10Msec(200);
  //while(bBTRawMode == 0){PlayTone(1,300); wait10Msec(1);}
  writeDebugStreamLine("Conectado...%i",bBTRawMode);

  while(1){

    writeDebugStreamLine("---------- Messages\n");
    for(int i=0; i<=11; i++){
      msgSize = cCmdMessageGetSize(i);
      writeDebugStreamLine("(%i) Mailbox %i", msgSize, i+1);
        if(msgSize > 0){
          cCmdMessageRead(DataRec, msgSize, i);

          for(int k=0;k<msgSize; k++){
            Msg = Msg + DataRec[k];
            DataRec[k]=0;
          }

          writeDebugStream("%s", Msg);
        }
      }

      writeDebugStreamLine("---------------------\n");
      cCmdBTPurgeRcvBuffer();
      //nxtReadRawBluetooth(DataRec, 5);
      //cCmdMessageRead(DataRec,5,4);
      wait10Msec(100);
      //writeDebugStreamLine("%i-%i-%i-%i-%i", DataRec[0],DataRec[1],DataRec[2],DataRec[3],DataRec[4]);

   }
}


Just a report!
thanks,
Ivan


Sat Dec 31, 2011 5:41 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3105
Location: Rotterdam, The Netherlands
Post Re: RobotC Crash Report when
Would you mind sending this to support@robotc.net? Thanks!

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Dec 31, 2011 6:16 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 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:  



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