Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion property mutex deadlocked on MacOs X Lion
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
YaGeek  
View profile  
 More options Mar 15 2012, 5:39 pm
From: YaGeek <yannick.heinr...@gmail.com>
Date: Thu, 15 Mar 2012 14:39:28 -0700 (PDT)
Local: Thurs, Mar 15 2012 5:39 pm
Subject: Re: [toped-devel] Re: property mutex deadlocked on MacOs X Lion

Hi Svilen,

I had some doubt on my current version on wxWidgets. I check out the last
development version of wxwidget and the mutex problem doset not occur any
more by loading the tcase file. Moreover the multiple display when
refreshing is solved too. But I always has only a small part of the canvas
which is displayed. A small part stay black.... I don't know if the problem
come from wxWidget.

I have a problem which stayed. As I load tcas.tll, i have an alert :
/src/generic/listctrl.cpp(3375): assert "item.m_itemId >= 0 &&
(size_t)item.m_itemId < GetItemCount()" failed in GetItem(): invalid item
index in GetItem
The call seems to come from outbox.cpp:833 :
console::FT_FUNCTION_SORT:SortItems(wxListCompareFunction,0)

Regards
Yannick
Le jeudi 15 mars 2012 22:12:56 UTC+1, YaGeek a écrit :

> Hi Svilen,

> I update my repository and compile it. I have one "<= DB busy. Viewport
> redraw skipped"  each time I zoom or the canvas is updated and redrawn :(

> Regards
> Yannick

> Le jeudi 15 mars 2012 01:47:27 UTC+1, s1s0 a écrit :

>>  Hi Yannick,

>> I found some troubles in the recent updates related to the property mutex.
>> Would you get the latest from the repository and try it?

>> Regards
>> Svilen
>> On 11/03/2012 15:51, Svilen wrote:

>> Hi Yannick,
>> Sorry for the delay. It has been a crazy week for me, now I'm back...
>> OK, this is the main thread obviously. Two things to check:
>> 1. It looks like the same (main) thread is already locked and most likely
>> a not unlocked. Are there any changes you did in the code which are not
>> committed? You did some experiments in layout canvas - could it be that
>> there is something remaining which you (possibly) don't consider important?
>> 2. What is the state of the other thread at this moment

>> Regards
>> Svilen

>> On 03/11/2012 10:17 AM, YaGeek wrote:

>> I post here the stack when the test on Mutex say it's locked :
>> #0    0x0000000100545ca2 in
>> layprop::PropertyCenter::lockDrawProp(layprop::DrawProperties*&,
>> layprop::PropertyState) at
>> /Users/yaya/Documents/Dev/toped/tpd_DB/viewprop.cpp:428
>> #1    0x000000010004d5b7 in tui::LayoutCanvas::update_viewport() ()
>> #2    0x0000000100041bd6 in tui::LayoutCanvas::OnpaintGL(wxPaintEvent&) ()
>> #3    0x0000000100e78ab1 in
>> wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
>> wxEvtHandler*, wxEvent&) ()
>> #4    0x0000000100e7cb2a in wxEventHashTable::HandleEvent(wxEvent&,
>> wxEvtHandler*) ()
>> #5    0x0000000100e81142 in wxEvtHandler::TryBeforeAndHere(wxEvent&) ()
>> #6    0x0000000100e7cbac in wxEvtHandler::ProcessEventLocally(wxEvent&) ()
>> #7    0x0000000100e7bfce in wxEvtHandler::ProcessEvent(wxEvent&) ()
>> #8    0x0000000100e7a352 in wxEvtHandler::SafelyProcessEvent(wxEvent&) ()
>> #9    0x000000010104d8ea in wxWindowBase::HandleWindowEvent(wxEvent&)
>> const ()
>> #10    0x0000000100eafbf2 in wxWindow::MacDoRedraw(long) ()
>> #11    0x0000000100f5dec7 in wxWidgetCocoaImpl::drawRect(void*, NSView*,
>> void*) ()
>> #12    0x0000000100f5ef0d in wxOSX_drawRect(NSView*, objc_selector*,
>> CGRect) ()
>> #13    0x00007fff89e5fabe in -[NSView _drawRect:clip:] ()
>> #14    0x00007fff89e8d1eb in -[NSView
>> _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
>> #15    0x00007fff89e5d099 in -[NSView
>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRec tForView:topView:]
>> ()
>> #16    0x00007fff89e5e34e in -[NSView
>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRec tForView:topView:]
>> ()
>> #17    0x00007fff89e5e34e in -[NSView
>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRec tForView:topView:]
>> ()
>> #18    0x00007fff89e5c593 in -[NSThemeFrame
>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRec tForView:topView:]
>> ()
>> #19    0x00007fff89e579af in -[NSView
>> _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] ()
>> #20    0x00007fff89e50429 in -[NSView displayIfNeeded] ()
>> #21    0x0000000100f020ea in wxStatusBar::DoUpdateStatusText(int) ()
>> #22    0x0000000100577d53 in console::TopedStatus::OnRenderON() ()
>> #23    0x0000000100577fde in TpdPost::render_status(bool) ()
>> #24    0x000000010027a7a4 in DataCenter::openGlRender(CTM const&) ()
>> #25    0x000000010027b58c in DataCenter::render(CTM const&) ()
>> #26    0x0000000100041dd6 in tui::LayoutCanvas::OnpaintGL(wxPaintEvent&)
>> ()
>> #27    0x0000000100e78ab1 in
>> wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
>> wxEvtHandler*, wxEvent&) ()
>> #28    0x0000000100e7cb2a in wxEventHashTable::HandleEvent(wxEvent&,
>> wxEvtHandler*) ()
>> #29    0x0000000100e81142 in wxEvtHandler::TryBeforeAndHere(wxEvent&) ()
>> #30    0x0000000100e7cbac in wxEvtHandler::ProcessEventLocally(wxEvent&)
>> ()
>> #31    0x0000000100e7bfce in wxEvtHandler::ProcessEvent(wxEvent&) ()
>> #32    0x0000000100e7a352 in wxEvtHandler::SafelyProcessEvent(wxEvent&) ()
>> #33    0x000000010104d8ea in wxWindowBase::HandleWindowEvent(wxEvent&)
>> const ()
>> #34    0x0000000100eafbf2 in wxWindow::MacDoRedraw(long) ()
>> #35    0x0000000100f5dec7 in wxWidgetCocoaImpl::drawRect(void*, NSView*,
>> void*) ()
>> #36    0x0000000100f5ef0d in wxOSX_drawRect(NSView*, objc_selector*,
>> CGRect) ()
>> #37    0x00007fff89e5fabe in -[NSView _drawRect:clip:] ()
>> #38    0x00007fff89e8d1eb in -[NSView
>> _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
>> #39    0x00007fff89e5d099 in -[NSView
>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRec tForView:topView:]
>> ()
>> #40    0x00007fff89e5e34e in -[NSView
>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRec tForView:topView:]
>> ()
>> #41    0x00007fff89e5e34e in -[NSView
>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRec tForView:topView:]
>> ()
>> #42    0x00007fff89e5c593 in -[NSThemeFrame
>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRec tForView:topView:]
>> ()
>> #43    0x00007fff89e579af in -[NSView
>> _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] ()
>> #44    0x00007fff89e50429 in -[NSView displayIfNeeded] ()
>> #45    0x00007fff89e4fb69 in
>> _handleWindowNeedsDisplayOrLayoutOrUpdateConstraints ()
>> #46    0x00007fff8b194bd7 in
>> __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ ()
>> #47    0x00007fff8b194b36 in __CFRunLoopDoObservers ()
>> #48    0x00007fff8b169ce9 in __CFRunLoopRun ()
>> #49    0x00007fff8b169676 in CFRunLoopRunSpecific ()
>> #50    0x00007fff8710031f in RunCurrentEventLoopInMode ()
>> #51    0x00007fff8710751b in ReceiveNextEventCommon ()
>> #52    0x00007fff87107456 in BlockUntilNextEventMatchingListInMode ()
>> #53    0x00007fff89e13f5d in _DPSNextEvent ()
>> #54    0x00007fff89e13861 in -[NSApplication
>> nextEventMatchingMask:untilDate:inMode:dequeue:] ()
>> #55    0x00007fff8a0ca39d in -[NSApplication _realDoModalLoop:peek:] ()
>> #56    0x00007fff8a0c9fd1 in -[NSApplication runModalForWindow:] ()
>> #57    0x00007fff8a0bd635 in -[NSAlert runModal] ()
>> #58    0x0000000100f4c120 in wxMessageDialog::ShowModal() ()
>> #59    0x0000000100e85260 in wxMessageBox(wxString const&, wxString
>> const&, long, wxWindow*, int, int) ()
>> #60    0x0000000100f63ad1 in
>> wxGUIAppTraitsBase::ShowAssertDialog(wxString const&) ()
>> #61    0x0000000100d61d81 in ShowAssertDialog(wxString const&, int,
>> wxString const&, wxString const&, wxString const&, wxAppTraits*) ()
>> #62    0x0000000100d61fbc in wxAppConsoleBase::OnAssertFailure(wchar_t
>> const*, int, wchar_t const*, wchar_t const*, wchar_t const*) ()
>> #63    0x0000000100d60991 in wxDefaultAssertHandler(wxString const&, int,
>> wxString const&, wxString const&, wxString const&) ()
>> #64    0x0000000100d60e2f in wxOnAssert(char const*, int, char const*,
>> char const*, wchar_t const*) ()
>> #65    0x0000000100f268ee in wxGenericListCtrl::GetItem(wxListItem&)
>> const ()
>> #66    0x0000000100572a45 in wxListCompareFunction(long, long, long) ()
>> #67    0x0000000100f234ca in list_ctrl_compare_func_1(wxListLineData**,
>> wxListLineData**) ()
>> #68    0x00007fff8e80bb11 in heapsort ()
>> #69    0x00007fff8e80b75e in _qsort ()
>> #70    0x00007fff8e80b75e in _qsort ()
>> #71    0x00007fff8e80b75e in _qsort ()
>> #72    0x0000000100f2842f in wxListMainWindow::SortItems(int (*)(long,
>> long, long), long) ()
>> #73    0x0000000100f28452 in wxGenericListCtrl::SortItems(int (*)(long,
>> long, long), long) ()
>> #74    0x000000010056d6fe in
>> console::TELLFuncList::OnCommand(wxCommandEvent&) ()
>> #75    0x0000000100e78ab1 in
>> wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
>> wxEvtHandler*, wxEvent&) ()
>> #76    0x0000000100e7cb2a in wxEventHashTable::HandleEvent(wxEvent&,
>> wxEvtHandler*) ()
>> #77    0x0000000100e81142 in wxEvtHandler::TryBeforeAndHere(wxEvent&) ()
>> #78    0x0000000100e7cbac in wxEvtHandler::ProcessEventLocally(wxEvent&)
>> ()
>> #79    0x0000000100e7bfce in wxEvtHandler::ProcessEvent(wxEvent&) ()
>> #80    0x0000000100e7b8a9 in wxEvtHandler::ProcessPendingEvents() ()
>> #81    0x0000000100d62f11 in wxAppConsoleBase::ProcessPendingEvents() ()
>> #82    0x0000000100e55591 in
>> wxCFEventLoop::CommonModeObserverCallBack(__CFRunLoopObserver*, int) ()
>> #83    0x00007fff8b194bd7 in
>> __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ ()
>> #84    0x00007fff8b194b36 in __CFRunLoopDoObservers ()
>> #85    0x00007fff8b169ce9 in __CFRunLoopRun ()
>> #86    0x00007fff8b169676 in CFRunLoopRunSpecific ()
>> #87    0x00007fff8710031f in RunCurrentEventLoopInMode ()
>> #88    0x00007fff8710751b in ReceiveNextEventCommon ()
>> #89    0x00007fff87107456 in BlockUntilNextEventMatchingListInMode ()
>> #90    0x00007fff89e13f5d in _DPSNextEvent ()
>> #91    0x00007fff89e13861 in -[NSApplication
>> nextEventMatchingMask:untilDate:inMode:dequeue:] ()
>> #92    0x00007fff89e1019d in -[NSApplication run] ()
>> #93    0x0000000100f445bc in wxGUIEventLoop::DoRun() ()
>> #94    0x0000000100e5597f in wxCFEventLoop::Run() ()
>> #95    0x0000000100d612ab in wxAppConsoleBase::MainLoop() ()
>> #96    0x0000000100ee7581 in wxApp::OnRun() ()
>> #97    0x0000000100057b7d in TopedApp::OnRun() ()
>> #98    0x0000000100dd7c46 in wxEntry(int&, wchar_t**) ()
>> #99    0x0000000100058414 in main ()

>> The call is from onPaintGL.

>> I try to go further

>> Regards
>> Yannick

>> Le mercredi 29 février 2012 11:14:03 UTC+1, s1s0 a écrit :

>>> Hi Yannick,
>>> (Sorry I've changed the e-mail thread, but that one was already a bit
>>> overloaded)
>>> From your last post there:

>>> => #include "/Users/yaya/Documents/Dev/toped/tll/tcase.tll";
>>>  * <= DrawProperties Mutex deadlocked!*
>>> <= DB busy. Viewport redraw skipped
>>> <= DrawProperties Mutex deadlocked!
>>> <= DB busy. Viewport redraw skipped

>>> Those Mutex deadlock massages shall not be there. They indicate that one
>>> way or another the renderer won't have an access to the layer properties -
>>> so the drawing will be skipped in the best case.
>>> I'm afraid this might need an exciting debugging session :)

>>>  The messages are coming from tpd_DB/viewprop.cpp:428. You can put a
>>> breakpoint there and to track where the call is from. What is more
>>> important though is where the previous call (which wasn't unlocked come
>>> from)
>>> In a nutshell, before accessing the properties DB, the code shall call
>>> the layprop::PropertyCenter::lockDrawProp(...) method to obtain a DB
>>> handler and when done - it shall call
>>> layprop::PropertyCenter::unlockDrawProp(...) returning the handler.
>>> Normally you  should not be able to call the locker twice in sequence
>>> from the same thread. This triggers a deadlock condition. Of course with wx
>>> and its messaging system the things are getting a bit more complicated.
>>> And the last piece of info for the time being - toped runs on two
>>> threads
>>> - All non tell tasks run in the main thread. This includes wx and all
>>> window management tasks. Also the renderers (openGL has troubles running in
>>> non-main threads on some platforms).
>>> - Tell parser and all tasks launched from it are running in a separate
>>> thread. In other words all layout/property/ etc. DB  manipulation.

>>> Regards
>>> Svilen

>>> P.S. I think wx has an option to compile thread support? Would you
>>> please check that?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.