|
From: Allin C. <cot...@wf...> - 2017-07-06 20:20:45
|
On Thu, 6 Jul 2017, Ethan A Merritt wrote:
> On Thursday, 06 July, 2017 15:13:44 Allin Cottrell wrote:
>> On Thu, 6 Jul 2017, Daniel J Sebald wrote:
>>
>>> It isn't the wxgtk library that wants X11, it's gnuplot's use of
>>> XInitThreads() that requires X11. wxgtk configure can't
>>> anticipate our use of an X function. wx_gui shouldn't be using
>>> XInitThreads().
>>
>> I'd just like to underscore Daniel's last point here. Surely it's a
>> dangerous hack for the gnuplot code to call XInitThreads() "on
>> behalf of" wxWidgets (in wxt_gui.h). I suspect this may be related
>> to the segfault I reported earlier today.
>>
>> <danger-will-robinson>
>> #if defined(WXT_MULTITHREADED) && defined(WX_NEEDS_XINITTHREADS) &&
>> defined(X11)
>> /* Magic fix needed by wxgtk3.0 */
>> wxtApp() : wxApp() { XInitThreads(); }
>> #endif
>> </danger-will-robinson>
>
> [shrug]
> I agree it is stupid that wxgtk does not perform its own initialization.
> But it doesn't.
>
> I refer you to the output from wxgtk if this call is omitted:
>
> Call stack:
> [00] wxOnAssert(char const*, int, char const*, char const*, wchar_t const*)
> [01] wxClientDCImpl::DoGetSize(int*, int*) const
> [02] wxBufferedDC::UnMask()
> [03] ~wxDC /usr/include/wx-3.0/wx/dc.h:789
> [04] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
> [05] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
> [06] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
> [07] wxEvtHandler::TryHereOnly(wxEvent&)
> [08] wxEvtHandler::ProcessEventLocally(wxEvent&)
> [09] wxEvtHandler::ProcessEvent(wxEvent&)
> [10] wxEvtHandler::SafelyProcessEvent(wxEvent&)
> [11] 0x7f22e8025ee1
> [12] g_closure_invoke
> [13] 0x7f22e6af0aad
> [14] g_signal_emit_valist
> [15] g_signal_emit
> [16] gtk_widget_size_allocate
> [17] 0x7f22e8024ff3
> [18] g_closure_invoke
> [19] 0x7f22e6af02c7
> [20] g_signal_emit_valist
> [xcb] Unknown request in queue while dequeuing
> [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
> [xcb] Aborting, sorry about that.
>
> I can suggest only 3 other options:
>
> 1) Link against wxgtk 2.8 rather than anything newer.
> These problems only began after libgtk was substantially revised
> in version 2.9
>
> 2) Try ./configure --with-wx-single-threaded
> This never did much for me, but other people have reported better luck
>
> 3) Give up on the wxt terminal and use qt instead
Fair enough. I'll try building against wxgtk 2.8.
Allin Cottrell
|