Linux & threads

Linux specific forum
clouds
New User
New User
Posts: 6
Joined: Tue Oct 04, 2011 8:06 pm

Linux & threads

Post 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!
Ramihyn_
Enthusiast
Enthusiast
Posts: 314
Joined: Fri Feb 24, 2006 9:40 am

Re: Linux & threads

Post 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".
auser
Enthusiast
Enthusiast
Posts: 195
Joined: Wed Sep 06, 2006 6:59 am

Re: Linux & threads

Post 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
Post Reply