-
Notifications
You must be signed in to change notification settings - Fork 103
Description
I am running into issues with hangs when trying to close the Gnuplot object, it's destructor appears to hang inside of an fclose command.
When this happens I am rendering a chart every few seconds, destroying it, and rendering another chart with new values.
My first suspicion was dangling newline or something causing gnuplot to wait for input but I cannot validate that idea.
I also ran the program in valgrind to make sure I wasn't corrupting memory or anything wonky.
Have you ran into this before? Seems only to happen on some machines I test it on and others can run through just fine without any hangs. Is my cycling running out of file descriptors or something? When it happens the machine has been constantly rendering charts for a few minutes.
Below is the stack trace. I have redacted unrelated function names on my side.
#0 0x00007f6a717ee848 in _IO_proc_close () from /lib64/libc.so.6
#1 0x00007f6a717fb97c in _IO_file_close_it () from /lib64/libc.so.6
#2 0x00007f6a717ec3fe in fclose () from /lib64/libc.so.6
#3 0x00005588888fae09 in gnuplotio::FileHandleWrapper::fh_close (this=0x7fff9c71c7e0) at [REDACTED]gnuplot-iostream.h:1536
#4 0x00005588888fb572 in gnuplotio::Gnuplot::~Gnuplot (this=0x7fff9c71c750, __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
at [REDACTED]gnuplot-iostream.h:1647
#5 0x00005588888feda4 in BaseChart<float>::render (this=0x55888a485c90, height=463, width=1763) at [REDACTED]BaseChart.hpp:80
#6 0x00005588888e7fb2 in [REDACTED] (this=0x55888ae4f800, io_condition=Glib::IO_IN, ch=..., is_out=false)
at [REDACTED]:655
#7 0x00005588888eb3f9 in [REDACTED]::<lambda(Glib::IOCondition)>::operator()(Glib::IOCondition) const (__closure=0x55888b198d90, cond=Glib::IO_IN)
at [REDACTED]:1242
#8 0x00005588888f8760 in sigc::adaptor_functor<[REDACTED]::[REDACTED]()::<lambda(Glib::IOCondition)> >::operator()<const Glib::IOCondition&>(const Glib::IOCondition &) const (this=0x55888b198d90, _A_arg1=@0x7fff9c71d164: Glib::IO_IN) at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:89
#9 0x00005588888f7d4e in sigc::internal::slot_call1<[REDACTED]::[REDACTED]()::<lambda(Glib::IOCondition)>, bool, Glib::IOCondition>::call_it(sigc::internal::slot_rep *, sigc::type_trait_take_t) (rep=0x55888b198d60, a_1=@0x7fff9c71d164: Glib::IO_IN) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:148
#10 0x00007f6a889bdc1f in ?? () from /usr/lib64/libglibmm-2.4.so.1
#11 0x00007f6a862e47f5 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#12 0x00007f6a862e4bb8 in ?? () from /usr/lib64/libglib-2.0.so.0
#13 0x00007f6a862e4ed2 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#14 0x00007f6a882819b5 in gtk_main () from /usr/lib64/libgtk-3.so.0
#15 0x00007f6a899cca96 in Gtk::Main::run(Gtk::Window&) () from /usr/lib64/libgtkmm-3.0.so.1
#16 0x0000558888866544 in main (argc=2, argv=0x7fff9c71d628) at [REDACTED]:135
Appreciate any help.