Quantcast
Channel: wxWidgets: Ticket Query
Viewing all articles
Browse latest Browse all 66

#12172: wxConditionInternal::WaitTimeout() Mac/Carbon broken like in many other ports

$
0
0

Hi,

reporting this in a hurry, just to make sure it won't get lost.

Perhaps I'm the only guy to evaluate return values _and_ then be bold enough to pass them to an ASSERT to swallow ;)

trunk src/osx/carbon/thread.cpp still has the following code:

return err == wxSEMA_NO_ERROR ? wxCOND_NO_ERROR : wxCOND_MISC_ERROR;

This is wrong since the second semaphore WaitTimeout() in that function _also_ returns wxSEMA_TIMEOUT, thus it will be stuck at that error, causing the last line to go fubar.

An almost identical issue has been dealt with by http://trac.wxwidgets.org/changeset/36540 already, but one should also have verified whether this applies to any other ports...

This is far from the only wxCondition / wxSemaphore return value confusion in various wx ports, as can be seen from additional http://trac.wxwidgets.org/changeset/36977http://trac.wxwidgets.org/changeset/42206http://trac.wxwidgets.org/ticket/8383http://trac.wxwidgets.org/changeset/44713http://trac.wxwidgets.org/changeset/56526http://trac.wxwidgets.org/ticket/10111

Perhaps something should be reworked to possibly achieve more systematic handling of error codes in wx.

Given this issue I'm wondering whether it was a bad idea to try to start that Mac port odyssee ;) (just kidding - current results are beyond _AWESOME_ - shocking success within few hours)

Thanks,

Andreas Mohr


Viewing all articles
Browse latest Browse all 66

Trending Articles