BMX 1.39 on Mac hangs!

Archives Forums/BlitzMax Bug Reports/BMX 1.39 on Mac hangs!

Rozek(Posted 2010) [#1]
Hello!

Just a first note: after installing BMX 1.39 (on a MacBook Pro running Mac OS X 10.5.8) and modifying a previously (i.e. under BMX 1.38) running MT application (by updating trylockmutex and removing my own workaround for the "glDeleteTextures" bug) this application simply "hangs" occuping both cores of the internal CPU.

I have not yet tried to isolate the problem (because I urgently need to finish my program) and went back to 1.38 - thus, it might even be my own problem!


ima747(Posted 2010) [#2]
I think it's likely to be a hold over from your workarounds, and probably specifically a result of trylockmutex working instead of just passing through like it used to. I've had no problems with MT since switching on 10.6.3 on my mini, haven't done any extensive testing but my workarounds were also fairly minor and my MT support fairly limited so there wasn't much that I needed to correct in my project.

Check that your locks are going in the right order... I had a similar problem previously where I was locking 2 mutexes out of order and it would cause a hang. I would lock mutex 1 then 2 on main thread, and a child would lock 2 then 1, so if they fired at a bad time main would block child (child waiting for 1) and child would block main (main waiting for 2).


Rozek(Posted 2010) [#3]
Hello!

I guess the major problem (perhaps the only one?) was that BMX 1.39 still does not contain the fix from http://www.blitzmax.com/Community/posts.php?topic=88462#1006351 which allows to use the debugger from within MT programs - after applying that fix again, the program did not hang any longer!

Mark: is it possible to include the fix mentioned above? I guess, that other people would also like to use debuglog et al. from within MT programs!


Who was John Galt?(Posted 2010) [#4]
+1 for this fix!