Some troubles and I don't know how to report

Just starting out? Need help? Post your questions and find answers here.
Cyllceaux
Enthusiast
Enthusiast
Posts: 514
Joined: Mon Jun 23, 2014 1:18 pm

Some troubles and I don't know how to report

Post by Cyllceaux »

Since Version 5.73 I wrote my own database.
I use the same tests every time.
  • create a database file, create a in-memory database, read the created database file.
  • create tables, selects, vies, triggers, indices
  • math calculations
  • Blobs, reading files and save them to the database.
    I use my image and pdf folder. So I can create a big DB over 500GB. *flex*
Everything works fine.

But since Version 6 I have a couple of problems and I can't break it down to a minimized code because I don't understand the problems.
  • The executable started with the debugger stopped unexpected.
    I find out that if a memory error accurses, the app died. The problem is, I can't figure out why and where. I use the purifier, but this does not work for C-Code and every PB Version brings Memory-Errors on various places. Sometimes in Maps, sometimes in Lists, sometimes in Files. It is super strange.
  • When I read a pdf file over 1 MB sometimes the LOF and FileSize gives a negative value. I don't mean a -1 or -2. I mean something like -93469023493
    This happens also when i use PeekQ. sometimes it gives me a negative number in a range from 100000000 - 900000000. But I can't make a minimalistic test to show.
  • I have a Structure:

    Code: Select all

    #STR_ALIGN = #PB_Structure_AlignC
    
    Structure strRoot Align #STR_ALIGN
          type.b
          status.b
          positionStart.q
          positionEnde.q
          
          id.q
          created.q
          modified.q
          version.q		
          
          
          seed.q
    EndStructure
    
    This structure is not special. But when I use writeData and readData, the data sometimes are different in the file or in the memory. It happens really often that the positionEnde is negative or much bigger or negative than, when I write them.
  • the FileSeek position sometimes changes without doing a read, write or seek. This happend often for files bigger than 200KB
  • I use a lot

    Code: Select all

        Global T_S_FLOAT=SizeOf(Float)
    
        Procedure _poke_float(*pos.Quad,value.f,*buffer)      
          PokeF(*buffer+*pos\q,value):*pos\q+T_S_FLOAT
        EndProcedure
    
        Procedure.f _peek_float(*pos.Quad,*buffer)
          Protected result.f=PeekF(*buffer+*pos\q)
          *pos\q+T_S_FLOAT
          ProcedureReturn Result
        EndProcedure
    
    And sometimes the *pos\q changed to negative.
  • I use the T_S_FLOAT because sometimes the SizeOf gives different values to. I don't know why. But it happens sometimes at structures.
  • I create a DLL with my DB. With PB 5.73 everything is cool. But since 6 something strange happend.

    Code: Select all

            file.s = "Testdb.dat"
    
    	Protected dbLeer=CallFunction(lib,"UltraDB_openDB",0)
    	Protected dbFile=CallFunction(lib,"UltraDB_openDB",@file)
    	Protected dbRead=CallFunction(lib,"UltraDB_readDB",@file)
    
    	CallFunction(lib,"UltraDB_closeDB",dbLeer)
    	CallFunction(lib,"UltraDB_closeDB",dbFile)
    	CallFunction(lib,"UltraDB_closeDB",dbRead) ; Error cause of dbRead = -1
    
    dbRead is -1 and so it raises an error, cause the handle does not exist.
    The different between readDB and openDB is, I set a readonly value to the structure type. And yes, it's the same methode.
    My Database is transactional and multi-threaded. In 5.73 it workes like a charm.
I don't know how to show this. I can give you all the sources to my DB but not to all my binaries (PDFs and Images)

My first guess was my AV, but this is fine. To be save, I tested it with Linux (xubuntu) and Windows 10/11. Everywhere the same "problems".
My second guess was, I use A LOT quads... I like them and Integer are to small for big DBs and sequences. Maybe there is a problem with that. I thought to change ever quad to a double but that sounds like a really bad Idea.
infratec
Always Here
Always Here
Posts: 7664
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Some troubles and I don't know how to report

Post by infratec »

This sounds like the memory is overwritten by someone.

Try to comment out some functionality to find the part of the code where it happens.
Since you use a library it can happen inside.

And ... I have also some trouble with 6.xx :cry:
Especially with 6.10, but I can not bring it to a point.
But this happens also with an included library. In 5.73 it was also working.
But unfortunately in 6.xx are some fixes that I need.
juergenkulow
Enthusiast
Enthusiast
Posts: 581
Joined: Wed Sep 25, 2019 10:18 am

Re: Some troubles and I don't know how to report

Post by juergenkulow »

Where are the errors in multithreaded procedures?

Code: Select all

; MultiThread - Error in Threadprocedure do not trigger OnErrorGoto/OnErrorGosub ErrorHandler.
CompilerIf #PB_Compiler_Version=610 And ((#PB_Compiler_Processor=#PB_Processor_x64 And
           #PB_Compiler_Backend=#PB_Backend_C) Or #PB_Compiler_OS=#PB_OS_Linux)
  CompilerWarning "6.10 Beta 1-6 ErrorHandler problem exist."
CompilerEndIf

OnErrorGoto(?ErrorHandler)
#Test=5
CompilerIf #Test<>4 And #PB_Compiler_ExecutableFormat= #PB_Compiler_Executable
  OpenWindow(0, 0,0, 800,600, "Test",#PB_Window_ScreenCentered)
CompilerEndIf  

CompilerSelect #Test
  CompilerCase 1
    CompilerIf #PB_Backend_C=#PB_Compiler_Backend
      ! asm("int3");
    CompilerElse  
      ! int3
    CompilerEndIf 
  CompilerCase 2
    PokeS(42,"Hello")
  CompilerCase 3
    zero=0 : a=Random(42) : a=a/zero
  CompilerCase 4
    If 0=InitEngine3D(0,"TEST.dll") ; Error Compile Executable 
      MessageRequester("FATAL ERROR"," Can not InitEngine3D."+GetCurrentDirectory()+" "+#PB_Compiler_Home+"Compilers")
    EndIf 
    ; If InitEngine3D(#PB_Engine3D_DebugLog,"D:\PB610B5x86\Compilers\Engine3d.dll") ; no Error - please adapt path. 
    ;   MessageRequester("FATAL ERROR"," Can not InitEngine3D.")
    ; EndIf 
    InitSprite():InitKeyboard():InitMouse()
    
    ExamineDesktops()
    OpenWindow(0, 0,0, DesktopWidth(0)*0.8,DesktopHeight(0)*0.8, "test - [Esc] quit",#PB_Window_ScreenCentered)
    OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0), WindowHeight(0), 0, 0, 0)
    CreateCamera(0, 0, 0, 100, 100) 
  CompilerCase 5
    Declare ErrThread(i)
    For i=1 To 10
      CreateThread(@ErrThread(),i)
    Next 
    Delay(10000) 
    CompilerIf #PB_Compiler_Thread=0
      CompilerError "Please switch Compiler Option Thread save on."
    CompilerEndIf 
    Procedure ErrThread(i)
       Delay(Random(8000,1000))
       CompilerIf #PB_Backend_C=#PB_Compiler_Backend
         ! asm("int3");
       CompilerElse  
         ! int3
       CompilerEndIf
     EndProcedure
  CompilerCase 6
    Declare ErrThread(i)
    For i=1 To 10
      CreateThread(@ErrThread(),i)
    Next 
    Delay(1000) 
    CompilerIf #PB_Backend_C=#PB_Compiler_Backend
      ! asm("int3");
    CompilerElse  
      ! int3
    CompilerEndIf
    CompilerIf #PB_Compiler_Thread=0
      CompilerError "Please switch Compiler Option Thread save on."
    CompilerEndIf 
    Procedure ErrThread(i)
       Delay(Random(10000,3000))
       CompilerIf #PB_Backend_C=#PB_Compiler_Backend
         ! asm("int3");
       CompilerElse  
         ! int3
       CompilerEndIf
     EndProcedure     
CompilerEndSelect      
End 

ErrorHandler:
CompilerIf #PB_Compiler_Processor=#PB_Processor_x86
  *eip.Quad=ErrorAddress()
  *esp.Long=ErrorRegister(#PB_OnError_ESP)
  s.s="eip:"+Hex(*eip)+" "+Hex(*eip\q,#PB_Quad)+#CRLF$
  If ExamineAssembly(*eip, *eip+8)
    If NextInstruction()
      s+InstructionString() + #CRLF$
    EndIf 
  EndIf
  s+"eax:"+Hex(ErrorRegister(#PB_OnError_EAX),#PB_Long)+
    " ebx:"+Hex(ErrorRegister(#PB_OnError_EBX),#PB_Long)+
    " ecx:"+Hex(ErrorRegister(#PB_OnError_ECX),#PB_Long)+
    " edx:"+Hex(ErrorRegister(#PB_OnError_EDX),#PB_Long)+
    " ebp:"+Hex(ErrorRegister(#PB_OnError_EBP),#PB_Long)+
    " esi:"+Hex(ErrorRegister(#PB_OnError_ESI),#PB_Long)+
    " edi:"+Hex(ErrorRegister(#PB_OnError_EDI),#PB_Long)+#CRLF$
  *esp.Long=ErrorRegister(#PB_OnError_ESP)
  i=0 
  j=0 
  s+"Stack:"+Hex(*esp,#PB_Long)+#CRLF$
  Repeat
    t.s=Hex(*esp\l,#PB_Long)+" "
    j+Len(t)
    s+t
    If j>70 
      s+#CRLF$ ; +Hex(*esp,#PB_Long)+" "
      j=0 
    EndIf 
    If *esp\l=0
      i+1
    Else 
      i=0 
    EndIf 
    *esp+4
  Until i>=5
  s.s+#CRLF$+ErrorFile()+" "+ErrorLine()+" "+ErrorMessage(ErrorCode())+#CRLF$
CompilerElseIf #PB_Compiler_Processor=#PB_Processor_x64
  *rip.Quad=ErrorAddress()
  *rsp.Quad=ErrorRegister(#PB_OnError_RSP)
  s.s="rip:"+Hex(*rip)+" "+Hex(*rip\q,#PB_Quad)+#CRLF$
  If ExamineAssembly(*rip, *rip+8)
    If NextInstruction()
      s+InstructionString() + #CRLF$
    EndIf 
  EndIf
  s+  "rax:"+Hex(ErrorRegister(#PB_OnError_RAX),#PB_Quad)+" rbx:"+Hex(ErrorRegister(#PB_OnError_RBX),#PB_Quad)+
      " rcx:"+Hex(ErrorRegister(#PB_OnError_RCX),#PB_Quad)+" rbx:"+Hex(ErrorRegister(#PB_OnError_RDX),#PB_Quad)+
      " rbp:"+Hex(ErrorRegister(#PB_OnError_RBP),#PB_Quad)+" rsi:"+Hex(ErrorRegister(#PB_OnError_RSI),#PB_Quad)+ 
      " rdi:"+Hex(ErrorRegister(#PB_OnError_RDI),#PB_Quad)+" r8:" +Hex(ErrorRegister(#PB_OnError_R8 ),#PB_Quad)+
      " r9:" +Hex(ErrorRegister(#PB_OnError_R9 ),#PB_Quad)+" r10:"+Hex(ErrorRegister(#PB_OnError_R10),#PB_Quad)+
      " r11:"+Hex(ErrorRegister(#PB_OnError_R11),#PB_Quad)+" r12:"+Hex(ErrorRegister(#PB_OnError_R12),#PB_Quad)+
      " r13:"+Hex(ErrorRegister(#PB_OnError_R13),#PB_Quad)+" r14:"+Hex(ErrorRegister(#PB_OnError_R14),#PB_Quad)+
      " r15:"+Hex(ErrorRegister(#PB_OnError_R15),#PB_Quad)+#CRLF$
  i=0 
  j=0
  s+"Stack:"+Hex(*rsp,#PB_Quad)+#CRLF$
  Repeat
    t.s=Hex(*rsp\q,#PB_Quad)
    j+Len(t)
    s+t+" "
    If j>64 
      s+#CRLF$ ; +Hex(*rsp,#PB_Quad)+" "
      j=0 
    EndIf 
    If *rsp\q=0
      i+1
    Else 
      i=0 
    EndIf 
    *rsp+8
  Until i>=5
  s.s+#CRLF$+ErrorFile()+" "+ErrorLine()+" "+ErrorMessage(ErrorCode())+#CRLF$
CompilerEndIf

SetClipboardText(s)
CompilerIf #PB_Compiler_ExecutableFormat= #PB_Compiler_Console 
  OpenConsole()
  Print(s)
  Input()
CompilerElse
  OpenWindow(42,0,0,800,600,"Error",#PB_Window_SystemMenu )
  EditorGadget(0,0,0,WindowWidth(0),WindowHeight(0))
  SetGadgetText(0,s)
  Repeat
  Until WaitWindowEvent(16)=#PB_Event_CloseWindow
CompilerEndIf   
End  

CompilerIf #PB_Compiler_LineNumbering=0
  CompilerError "Please switch Compiler Option OnError on."
CompilerEndIf
CompilerIf #PB_Compiler_Debugger=1
  CompilerError "Please switch Compiler Option Start Debugger off."
CompilerEndIf

User avatar
skywalk
Addict
Addict
Posts: 4242
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Some troubles and I don't know how to report

Post by skywalk »

When I have weird behavior, I'm forced to simplify the code and/or write info to log files before crash.

I use prototypes instead of CallFunction.
Then inspect each prototype for valid address.

I use threads and semaphores, but never threaded variables.

My databases are under 1GB.

So far, v6.10b6 is working very well. I could not compile with v6.0 for almost a year.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
idle
Always Here
Always Here
Posts: 6035
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Some troubles and I don't know how to report

Post by idle »

It's symptomatic of clobbering some memory and it's often hard to track. sanity check your bounds and ensure your not overflowing a buffer. I expect the memory management has undergone a couple of changes since 5.73 so that's where I'd start looking.
juergenkulow
Enthusiast
Enthusiast
Posts: 581
Joined: Wed Sep 25, 2019 10:18 am

Re: Some troubles and I don't know how to report

Post by juergenkulow »

skywalk wrote: Sat Feb 17, 2024 8:22 pmWrite info to log files.

Code: Select all

; MultiThread - OnErrorGoto can use CreateFile and WriteQuad for Error Protokoll. ASM Backend Windows 
CompilerIf #PB_Compiler_Version=610 And ((#PB_Compiler_Processor=#PB_Processor_x64 And
                                          #PB_Compiler_Backend=#PB_Backend_C) Or #PB_Compiler_OS=#PB_OS_Linux)
  CompilerWarning "6.10 Beta 1-6 ErrorHandler problem exist."
CompilerEndIf

#Errlog="D:\Err.dat" ; Please adapt. 
Macro ErrL
*t\Line=#PB_Compiler_Line : *t\ErrMark=?ErrLabel#MacroExpandedCount :   ErrLabel#MacroExpandedCount:
EndMacro
Global Mutex = CreateMutex()
Structure threadtype
  ErrMark.i
  Stackpointer.i 
  Line.l
EndStructure
Global NewList tt.threadtype()
OnErrorGoto(?ErrorHandler)
#Test=5

CompilerSelect #Test
  CompilerCase 5
    Declare ErrThread(*t.threadtype)
    For i=1 To 10
      AddElement(tt())
      CreateThread(@ErrThread(),@tt())
    Next 
    Delay(10000) 
    CompilerIf #PB_Compiler_Thread=0
      CompilerError "Please switch Compiler Option Thread save on."
    CompilerEndIf 
    
    Procedure ErrThread(*t.threadtype)
    CompilerIf #PB_Compiler_Processor=#PB_Processor_x86
      Protected espreg
      EnableASM : MOV espreg,esp : DisableASM
      *t\Stackpointer=espreg
    CompilerElseIf #PB_Compiler_Processor=#PB_Processor_x64
      Protected rspreg
      EnableASM : Mov rspreg,rsp : DisableASM
      *t\Stackpointer=rspreg  
    CompilerEndIf 
      ErrL : Delay(Random(8000,1000))
      ErrL : ! int3
    EndProcedure
CompilerEndSelect      
End 

ErrorHandler:
CompilerIf #PB_Compiler_Processor=#PB_Processor_x86
  LockMutex(Mutex) 
  Define esp_reg
  EnableASM : MOV esp_reg,esp : DisableASM
  
  errfile=CreateFile(#PB_Any,#Errlog,#PB_File_NoBuffering)
  ResetList(tt())
  Repeat
    NextElement(tt()) 
  Until  tt()\Stackpointer-esp_reg>=0 And tt()\Stackpointer-esp_reg<$100000 
  WriteLong(errfile,tt()\Line)
  WriteLong(errfile,tt()\ErrMark)
  *eip.Quad=tt()\ErrMark
  WriteQuad(errfile,*eip\q)
  i=0
  *esp.Long=esp_reg
  WriteLong(errfile,*esp)
  Repeat 
    WriteLong(errfile,*esp\l)
    If *esp\l=0
      i+1
    Else 
      i=0 
    EndIf 
    *esp+4
  Until i>=5   
  CloseFile(errfile)
  UnlockMutex(Mutex)   
CompilerElseIf #PB_Compiler_Processor=#PB_Processor_x64
  LockMutex(Mutex) 
  Define rsp_reg
  EnableASM : MOV rsp_reg,rsp : DisableASM
  
  errfile=CreateFile(#PB_Any,#Errlog,#PB_File_NoBuffering)
  ResetList(tt())
  Repeat
    NextElement(tt()) 
  Until  tt()\Stackpointer-rsp_reg>=0 And tt()\Stackpointer-rsp_reg<$100000 
  WriteLong(errfile,tt()\Line)
  WriteQuad(errfile,tt()\ErrMark)
  *rip.Quad=tt()\ErrMark
  WriteQuad(errfile,*rip\q)
  i=0
  *rsp.Quad=rsp_reg
  WriteQuad(errfile,*rsp)
  Repeat 
    WriteQuad(errfile,*rsp\q)
    If *rsp\q=0
      i+1
    Else 
      i=0 
    EndIf 
    *rsp+8
  Until i>=5   
  CloseFile(errfile)
  UnlockMutex(Mutex) 
CompilerEndIf
End  

CompilerIf #PB_Compiler_LineNumbering=0
  CompilerError "Please switch Compiler Option OnError on."
CompilerEndIf
CompilerIf #PB_Compiler_Debugger=1
  CompilerError "Please switch Compiler Option Start Debugger off."
CompilerEndIf

Code: Select all

; Read Multithread x64 Err.dat 
#Errlog="D:\Err.dat" ; Please adapt. 
errfile=OpenFile(#PB_Any,#Errlog)
s.s="Line:"+Str(ReadLong(errfile))+" rip:"+Hex(ReadQuad(errfile),#PB_Quad)+" "
ripinstr.q=ReadQuad(errfile)
s+Hex(ripinstr,#PB_Quad)+#CRLF$
*rip=@ripinstr
If ExamineAssembly(*rip, *rip+8)
  If NextInstruction()
    s+InstructionString() + #CRLF$
  EndIf 
EndIf
s+"Stack:"+Hex(ReadQuad(errfile),#PB_Quad)+#CRLF$
j=0
While 0=Eof(errfile)
  s+Hex(ReadQuad(errfile),#PB_Quad)+" "
  If j>64
    j=0
    s+#CRLF$
  Else
    j+16
  EndIf 
Wend 
Debug s 
; Line:44 rip:13FEA151D 2D00024AD805C7CC
; int3 
; Stack:1E5FC00
; 0 0 8 0 0 1E5FC00 
; 0 772B5A4D 1C015E0 0 0 0 
; 0 773EB831 0 0 0 0 
; 0 

Code: Select all

; Read Multithread x86 Err.dat 
#Errlog="D:\Err.dat" ; Please adapt. 
errfile=OpenFile(#PB_Any,#Errlog)
s.s="Line:"+Str(ReadLong(errfile))+" eip:"+Hex(ReadLong(errfile),#PB_Long)+" "
eipinstr.q=ReadQuad(errfile)
s+Hex(eipinstr,#PB_Quad)+#CRLF$
*eip=@eipinstr
If ExamineAssembly(*eip, *eip+8)
  If NextInstruction()
    s+InstructionString() + #CRLF$
  EndIf 
EndIf
s+"Stack:"+Hex(ReadLong(errfile),#PB_Long)+#CRLF$
j=0
While 0=Eof(errfile)
  s+Hex(ReadLong(errfile),#PB_Long)+" "
  If j>72
    j=0
    s+#CRLF$
  Else
    j+8
  EndIf 
Wend 
Debug s 
; Line:44 eip:11B1489 2D011D000005C7CC
; int3 
; Stack:E4FAA0
; E4FAA0 E4FAB0 759D337A A50944 E4FAF0 775D9882 A50944 7689EE77 0 0 A50944 
; 80000003 759F76F7 759F76F7 E4FABC E4F668 FFFFFFFF 77613145 131D1C7 0 E4FB08 775D9855 
; 11B13E0 A50944 0 0 0 0 11B13E0 A50944 0 0 0 
; 0 0 
Cyllceaux
Enthusiast
Enthusiast
Posts: 514
Joined: Mon Jun 23, 2014 1:18 pm

Re: Some troubles and I don't know how to report

Post by Cyllceaux »

Hello @all,

Thx for the tips. But I use the "onerror" functions from PB but they never are called. I use this code:

Code: Select all

CompilerIf Not #PB_Compiler_Debugger
	Procedure ErrorHandler()
		
		Protected ErrorMessage$ = "A program error was detected:" + #CR$
		ErrorMessage$ + #CR$
		ErrorMessage$ + "Error Message:   " + ErrorMessage()      + #CR$
		ErrorMessage$ + "Error Code:      " + Str(ErrorCode())    + #CR$ 
		ErrorMessage$ + "Code Address:    " + Str(ErrorAddress()) + #CR$
		
		If ErrorCode() = #PB_OnError_InvalidMemory   
			ErrorMessage$ + "Target Address:  " + Str(ErrorTargetAddress()) + #CR$
		EndIf
		
		If ErrorLine() = -1
			ErrorMessage$ + "Sourcecode line: Enable OnError lines support to get code line information." + #CR$
		Else
			ErrorMessage$ + "Sourcecode line: " + Str(ErrorLine()) + #CR$
			ErrorMessage$ + "Sourcecode file: " + ErrorFile() + #CR$
		EndIf
		
		ErrorMessage$ + #CR$
		ErrorMessage$ + "Register content:" + #CR$
		
		CompilerSelect #PB_Compiler_Processor 
			CompilerCase #PB_Processor_x86
				ErrorMessage$ + "EAX = " + Str(ErrorRegister(#PB_OnError_EAX)) + #CR$
				ErrorMessage$ + "EBX = " + Str(ErrorRegister(#PB_OnError_EBX)) + #CR$
				ErrorMessage$ + "ECX = " + Str(ErrorRegister(#PB_OnError_ECX)) + #CR$
				ErrorMessage$ + "EDX = " + Str(ErrorRegister(#PB_OnError_EDX)) + #CR$
				ErrorMessage$ + "EBP = " + Str(ErrorRegister(#PB_OnError_EBP)) + #CR$
				ErrorMessage$ + "ESI = " + Str(ErrorRegister(#PB_OnError_ESI)) + #CR$
				ErrorMessage$ + "EDI = " + Str(ErrorRegister(#PB_OnError_EDI)) + #CR$
				ErrorMessage$ + "ESP = " + Str(ErrorRegister(#PB_OnError_ESP)) + #CR$
				ErrorMessage$ + "Flags = " + Str(ErrorRegister(#PB_OnError_Flags)) + #CR$
								
			CompilerCase #PB_Processor_x64
				ErrorMessage$ + "RAX = " + Str(ErrorRegister(#PB_OnError_RAX)) + #CR$
				ErrorMessage$ + "RBX = " + Str(ErrorRegister(#PB_OnError_RBX)) + #CR$
				ErrorMessage$ + "RCX = " + Str(ErrorRegister(#PB_OnError_RCX)) + #CR$
				ErrorMessage$ + "RDX = " + Str(ErrorRegister(#PB_OnError_RDX)) + #CR$
				ErrorMessage$ + "RBP = " + Str(ErrorRegister(#PB_OnError_RBP)) + #CR$
				ErrorMessage$ + "RSI = " + Str(ErrorRegister(#PB_OnError_RSI)) + #CR$
				ErrorMessage$ + "RDI = " + Str(ErrorRegister(#PB_OnError_RDI)) + #CR$
				ErrorMessage$ + "RSP = " + Str(ErrorRegister(#PB_OnError_RSP)) + #CR$
				ErrorMessage$ + "Display of registers R8-R15 skipped."         + #CR$
				ErrorMessage$ + "Flags = " + Str(ErrorRegister(#PB_OnError_Flags)) + #CR$
				
		CompilerEndSelect
		
		
		
		MessageRequester("Fatal",ErrorMessage$,#PB_MessageRequester_Error)
		
	EndProcedure
	
	
	OnErrorCall(@ErrorHandler())
CompilerEndIf
I use this code in other projects, too. So I know it worked very well. But the errors must be something which is not catched by "onError". It is also not catched by purifier. I installed a complete new PB and deleted all old ones.

I tried to break down the code in smaller things, but then it is not reproduceable.
Post Reply