|
From: Daniel J S. <dan...@ie...> - 2017-07-06 22:20:09
|
On 07/06/2017 05:03 PM, Ethan A Merritt wrote: > On Thursday, 06 July, 2017 16:27:00 Daniel J Sebald wrote: > >> So, what I'm going on at this point is: >> >> 1) It looks like the graphics may be running in a secondary thread. >> >> 2) wxWidgets documentation states "GUI calls are explicitly not safe at >> all in secondary threads and could end your application prematurely." >> >> The contra-positive logic doesn't necessarily conclude that the source >> of the problem therefore lies in gnuplot. Plus it is a lot of work to >> test the theory that rearranging wx_gui so that GUI manipulation is only >> done in the main thread. So, for me it's inconclusive from my >> understanding just who's responsible for the need for XInitThreads(). >> >> Dan > > > So do all the errors go away if you do > > ./configure --with-wx-single-threaded > > (still omitting the call to XInitThreads and not linking to -lX11). Yes, on the crash (plot is successful): gnuplot> set term wxt Terminal type is now 'wxt' Options are '0 enhanced' gnuplot> plot sin(x) Init First Init OnInit OnInit finished First Init2 opening a new plot window wxtApp::OnCreateWindow wxtFrame constructor wxtFrame constructor 2 frame OnSize panel constructor panel constructor4 wxt_cairo_create_context panel constructor5 panel constructor6 wxtFrame constructor 3 frame OnSize panel OnSize 640 384 7680.000000 7680.000000 wxt_cairo_create_context wxt_cairo_refresh called before window exists new plot window opened Init finished Graphics xmax 12800 ymax 7680 v_char 339 h_char 160 raise window frame OnSize Graphics xmax 12800 ymax 7680 v_char 339 h_char 160 raise window gnuplot> exit wxt_atexit: handling "persist" setting Checking window 0 : shown parent process: exiting, child process has PID 6255 wxt_cleanup: start wxtApp::OnExit child process: running child process: restarting its event loop panel destructor wxt_cleanup: finished wxt_reset No, on the closing of the plot window at exit. It is still persistent after exit. I'll look into the code around "Checking window 0" if there might be something else at play. Dan |