How do I even start to diagnose this? I'm so lost and it's depressing as hell as these are paid customers. I thought switching from 6.04 to 6.10 would help but it hasn't. I feel like giving up coding.

The classic way is to insert debug output around the code sections where you suspect the crash/exit happens. Try to pin the action that happens shortly before the crash/exit and insert debug output and keep doing that till you know exactly which line is the last executed line.
Code: Select all
Procedure _AllocateMemory(size,from.i)
Protected *mem = AllocateMemory(size)
If *mem
ProcedureReturn *mem
Else
MessageRequester("error","allocate failed line " +Str(from))
EndIf
EndProcedure
Macro AllocateMemory(size)
_AllocateMemory(size,#PB_Compiler_Line)
EndMacro
Exactly the problem!
Code: Select all
Prototype.l ProtoAccessibleObjectFromPoint(pt.q,*ia,*var)
Openlibray will be an integer and return an integer, in the case you use #PB_ANYBarryG wrote: Tue Mar 05, 2024 1:41 amExactly the problem!That's what I can't work out.
I did notice that I had this line of code:
Where the prototype is of long type. I changed it to ".i" (integer) and it still works. So maybe that's the cause?Code: Select all
Prototype.l ProtoAccessibleObjectFromPoint(pt.q,*ia,*var)
Also, when using OpenLibrary(), should the variable that opens it be of integer type, too? Most of mine have no type set.
I don't have GDI handles, and all AllocateMemory() use is checked for non-zero before trying to use them.
Code: Select all
GetCursorPos_(@CursorPos)
x=CursorPos\x
y=CursorPos\y
If AccessibleObjectFromPoint(y<<32|x,@*pIAcc,@vt)=#S_OK
; ...
EndIf
Code: Select all
If AccessibleObjectFromPoint(PeekQ(@CursorPos),@*pIAcc,@vt)=#S_OK
Code: Select all
Error Desc : Breakpoint
Error Code : 0x2147483651
I strongly suggest you edit your codebase to compile with the C backend. The process will undoubtedly expose a problem in your code.BarryG wrote: Tue Mar 05, 2024 12:15 am I don't use the C compiler. If I compile ASM with "/commented", how will that show me where the problem is?
No threads reading and writing to the same memory at the same time?