From: fv@nospam.tcenl.com   
      
   Jason Burgon schreef:   
   > "Wolfgang Ehrhardt"    
   > wrote in message news:458daf54.1530896@news.individual.net...   
   >   
   >> I sometimes get Error 216 usually related to corrupt bp.psm files   
   >> and/or to multiple instances of the IDE. For a protected mode project   
   >> the .psm saving can be turned off because the integrated debugger   
   >> is not usable.   
   >   
   > Thanks for the suggestion, but it doesn't work.   
   >   
   >> Do you really need all the symbols from all units? I would turn off   
   >> {$D-,$L-} in some of those units that have been debugged and work   
   >> reliable.   
   >   
   > Yes, I already do that to avoid the CTE 110 problem - Lots of:   
   >   
   > {$ifndef DebugXXX}   
   > {$D-,L-}   
   > {$endif DebugXXX}   
   >   
   > sections at the top of my units. I can switch off debug info for entire   
   > pre-compiled library suites, but compiling the application that uses them   
   > still makes BP crash.   
   >   
   >> Sorry that I could not give more or better help.   
   >   
   > Thanks for the feedback anyway, it's much appreciated.   
   >   
   > My best guess is that this is a compiler 110 error that's getting missed,   
   > causing a buffer overflow sometime down the line.   
   >   
   I have seen the 216 error lots of times. In my case often objects that   
   have not been constructed poperly or wrong pointers.   
      
   Since debugging does not always work e.g. in timed events, I use a lot   
   of logging commands.   
      
   Simply remarks in the code that are written to a text file using the   
   trace command. Functions like I2S are useful for adding numbered   
   information.   
      
      
   -- Femme   
      
      
      
      
      
   unit tracesrc;   
   Interface   
   Uses dos;   
   const logfilename:pathstr='debuginf.log';   
    enabletrace:boolean=true;   
   procedure trace(s:string);   
      
   Implementation   
   var logfile:text;   
   procedure trace(s:string);   
   begin   
    if enabletrace then   
    enabletrace:= admi(logfilename,s);   
   end;   
   function admi(filename:pathstr;s:string):boolean;   
   begin   
    assign(logfile,filename);   
    {$I-}   
    append(logfile);   
    if ioresult<>0 then rewrite(logfile);   
    if ioresult=0 then   
    begin   
    admi:=true;   
    writeln(logfile,s);   
    close(logfile);   
    end else admi:=false;   
    {$I+}   
   end;   
   begin   
    assign(logfile,logfilename);   
    {$I-} rewrite(logfile); {$I+}   
    if ioresult=0 then close(logfile) else enabletrace:=false;   
   end.   
      
      
      
   function i2s(i:longint):string; {integer to string conversion}   
   var s:string;   
   begin   
    str(i,s);   
    i2s:=s;   
   end;   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|