← Back to team overview

kicad-developers team mailing list archive

Re: Problem with the new quasimodal

 

On 05/04/2014 02:43 PM, Dick Hollenbeck wrote:
> On 05/04/2014 02:24 PM, Lorenzo Marcantonio wrote:
>> Testing the latest 4845, got curious with the new quasimodal loop.
>>
>> By the way, at the bottom there is probably a typo
>> (findWindowReursively), don't know if that section is live (it's ifdeffed)
>>
>> On the stock build requesting the edit component dialog (AFAIK the only
>> one requesting the loop) makes the dialog appear and immediately close
>> (a flash).
>>
>> On a debug instrumented build (my fork, but that part *shouldn't* have
>> been changed) I see an assert in between:
>>
>> ASSERT INFO:
>> ./src/gtk/evtloop.cpp(56): assert "!IsRunning()" failed in Run(): can't reenter a message loop
>>
>> BACKTRACE:
>> [1] wxOnAssert(char const*, int, char const*, char const*, char const*)
>> [2] wxGUIEventLoop::Run()
>> [3] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
>> [4] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
>> [5] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
>> [6] wxEvtHandler::DoTryChain(wxEvent&)
>> [7] wxEvtHandler::ProcessEvent(wxEvent&)
>> [8] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
>> [9] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
>> ... cut usual gtk/glib junk
>> [32] gtk_main
>> [33] wxGUIEventLoop::Run()
>>
>> The gdb frame dump seems more interesting:
>> #6  0x00007ffff6c8eb5e in wxOnAssert
>> #7  0x00007ffff6e25878 in wxGUIEventLoop::Run
>> #8  0x00007fffeeeabefb in DIALOG_SHIM::ShowQuasiModal
>> #9  0x00007fffeed1d4e2 in SCH_EDIT_FRAME::EditComponent
>> #10 0x00007fffeee3c274 in SCH_EDIT_FRAME::OnEditItem
>>
>> On the terminal I see this (maybe is useful):
>>
>> 21:21:37: Debug: Load schematic cache library file </home/lomarcan/cvswork/rpm-spx/Schemi/lgs-rpmspark-cache.lib>
>> OnListItemSelected()
>> wxFrame 14SCH_EDIT_FRAME: disabled
>> ./src/gtk/evtloop.cpp(56): assert "!IsRunning()" failed in Run(): can't reenter a message loop
> 
> 
> So this is wx source, line 56?
> 
> I don't see that in the newer wx source, they re-arranged the source.
> 
> src/common/evtloopcmn.cpp, line 59 has this:
> 
>     // event loops are not recursive, you need to create another loop!
>     wxCHECK_MSG( !IsInsideRun(), -1, wxT("can't reenter a message loop") );
> 
> But its not firing

with newer wx source than yours, and this works fine.  No problems with quasi-modal.

I also have 2.8.12, and currently this is not a debug build, but the event loop is never
nesting and the dialog terminates quickly, like you describe but without the assert.
I've yet to run it under a debugger, but I don't currently have a debug build of wx for
this version, it will take awhile.




Follow ups

References