Page 1 of 1

Linux & threads

Posted: Fri Oct 14, 2011 8:52 pm
by clouds
Sorry for my bad english.
The problem with the program. Ported from a Windows, everything worked fine, the linearized commented out\changed all that swearing compiler. As a result, very often flies out error:
The debugged executable quit unexpectedly.
So please test the code, archive within the source file (0.7), icons, sound (you need to run code .) Ideally, it should work like this (filmed under Windows), but now I have it only takes a few windows.
Just really do not want to translate everything into one thread, if indeed trably linearized with threads.
When you turn purifier, swears on line 322 in the code, namely

Code: Select all

 EndProcedure 
, 0_0
He says, Invalid Memory access.
Please help!

Re: Linux & threads

Posted: Fri Oct 14, 2011 9:24 pm
by Ramihyn_
In general a crash on "procedurereturn" points to a stack corruption. Assuming that you use PureBasic 4.51 on linux, there where bugs with CallFunctionFast() which where fixed for 4.60RC1.

Stack corruption can have many causes, some which "should" be found by the purifier. Check if you trash the stack or a memory buffer inside the procedure where the error occurs at "endprocedure".

Re: Linux & threads

Posted: Wed Oct 19, 2011 2:15 pm
by auser
Have you tried "ProcedureC" already? I remember similar behaviour where I created a PB verify callback function that I've forwarded via @Functionname() to an external GnuTLS function. I think with normal "Procedure" I've got some IMA alyways when I've used "ProcedureReturn" (or the Procedure ended). After playing a little around I've found out that it could be fixed in my case via changing from "Procedure" to "ProcedureC".

Greetings,
auser