Blog
Scribe ala Mac
Date: 7/1/2008
If you have been poking around in the release notes you'd have noticed that I've done a heap of work on the Mac port of Scribe. So far the one outstanding thing I must fix before I ship it is a thread lock that gets stuck in the locked state and kills the app after some hours of running.

Other than that it's fairly useful as a daily email client as it stands right now. Most of the really annoying quirks (for me) are now fixed.

So it's running now and I'm waiting for the locking bug to show up. I've added file/line parameters to the semaphores lock method which tells me where the lock/unlock pair failed. And so far its failed once in a peice of code that can't possibly not unlock the semaphore... there is no return statement between the lock and unlock (which is the usual cause for lock/unlock pairing pain). Which leads me to think that the semaphore code itself can fail. Looking at the unlock code is uses pthread_mutex_trylock to lock the semaphore object first before touching it's internal parameters. And in the lock method it retries pthread_mutex_trylock if it fails... but in the unlock it doesn't... just a one off attempt. So my current theory is that occasionally pthread_mutex_trylock fails temporarily and you can re-attempt it. Thus if unlock fails because pthread_mutex_trylock fails... you'd see this crazy sort of deadlocking stuff where something random locks the object and just hangs on to it's lock forever.

Interestingly the original problem with the messages being dropped between the worker and GUI thread seems to not be happening any more. Possibly because the real issue is in the semaphore code.

Fingers crossed I'll have it sorted in the next few days and I'll be cleaning up for release this week.

Update: So far it's been running for 12 hours or so without lock up. Things are looking very positive right now. :)
Comments:
Bardo
07/01/2008 9:15am
Great news! I was wondering where that Mac-port had gone...
FYI: I recently 'upgraded' my G4 MiniMac to an Intel-Mini. I copied my InScribe folder to my new Mini and Scribe still works. I can still use it as my everyday e-mail client. No major problems, as far as I have noticed.
 
Reply
From:
Email (optional): (Will be HTML encoded to evade harvesting)
Message:
 
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.
BBcode:
[q]text[/q]
[url=link]description[/url]
[img]url_to_image[/img]
[pre]some_code[/pre]
[b]bold_text[/b]