Topic : Typing error causes page fault in RIDE

Forum : 8051

Original Post
Post Information Post
July 8, 2008 - 12:31pm
Guest

Running Ride BN746 under Win98 or WinXP, 'translating' the following C program fragment caused Ride to crash with a page-fault.

A close-parenthesis mistyped as a close-brace proved to be the cause, although debugging was difficult as no listing file or error message is produced (and I have to squint to see the difference in the Ride window).

The fault only seems to occur when a conditional statement gets 'captured' by the unclosed parenthesis.

/*------------------------------------------------------------------------------
Compiler crash test
This program causes a page fault in RIDE with a misplaced right brace
------------------------------------------------------------------------------*/

#include "upsd3400.h"

bit PCPluggedIn, BrakeRelease;

void ErrorMessage( char*);

void Heartbeat( void){

   if( BrakeRelease != 0) {
// *********** ERROR ***** Brace instead of bracket at end of line. 
// Crashes compiler if a conditional statement follows
      ErrorMessage( "Needles not in up position"};
   }
   if( PCPluggedIn){
      return;
   } 
}

void main(void){
   while (1);
}
Replies
Post Information Post
+1
0
-1
July 8, 2008 - 7:32pm
Guest

The bug is fixed (several errors were generated and the crash occured when formatting the last one).

When such an situation appears:
1. In Options|Target, select 'use executable' (versus DLLs). At least RIDE does not crash in this case.
2. To locate the error, launch the compiler in a DOS session, and you will see the first error message that will help you to locate the error.
Sorry for the issue. The fix will be available in the next release.