SetText freezes the gui

Hello,

Based on the spy.cxx tutorial, I have written a gui to watch monitors. While the
communication between the client and the server works perfectly during days,
the gui application completely freezes after some time (a few minutes usually).

It seems that something blocks the application when updating the text in the TGTextEntry
widget with the function SetText #-o . Please see the output of gdb below.

If somebody can help, I am thankful as I am running out of ideas.

Thank You,

Bertrand

#6 0xb4cab4bc in TGX11::SendEvent () from /usr/local/lib/root/libGX11.so
No locals.
#7 0xb5248df9 in TGFrame::SendMessage () from /usr/local/lib/root/libGui.so
No locals.
#8 0xb5307729 in TGTextEntry::TextChanged () from /usr/local/lib/root/libGui.so
No locals.
#9 0xb5308553 in TGTextEntry::SetText () from /usr/local/lib/root/libGui.so
No locals.
#10 0x080acbb2 in TaspMoni::SocketToTasp (this=0x8793970) at TaspMoni.cxx:236
mons = {static npos = 4294967295,
_M_dataplus = {<std::allocator> = {<__gnu_cxx::new_allocator> = {}, },
_M_p = 0x880ac6c “211964”}}
pos =
mon = {static npos = 4294967295,
_M_dataplus = {<std::allocator> = {<__gnu_cxx::new_allocator> = {}, },
_M_p = 0x880c21c “counter.Monitor 1 = 211964”}}
cmoni_cmd = 0x880ac78 “counter getmonitor 1\n”
rc =
i = 1
cbuffer = “counter.Monitor 1 = 211964\n”, ‘\0’ <repeats 228 times>
ss =
moni_getmn = {static npos = 4294967295,
_M_dataplus = {<std::allocator> = {<__gnu_cxx::new_allocator> = {}, },
_M_p = 0x880aca4 "counter getmonitor "}}
moni_cmd = {static npos = 4294967295,
_M_dataplus = {<std::allocator> = {<__gnu_cxx::new_allocator> = {}, },
_M_p = 0x880c19c “counter getmonitor 1\n”}}
#11 0x080dd483 in G__NFitDict_917_0_28 (result7=0x87b0744, funcname=0x0, libp=0x87b079c, hash=0) at NFitDict.cxx:5074
No locals.

PS: I also upload the class in case it helps
t.cxx (6.26 KB)

Hi,

Hard to tell what’s going on. Could you send a running piece of code showing the problem?
You can also try to call “fParName[i]->SetText(ctext, kFALSE);” (don’t emit signal) to see if it changes anything.
BTW, which ROOT version are you using?

Cheers, Bertrand.

Hello,

It looks like adding kFALSE in SetText solved the issue, as you
suggested =D>

I had the “problem” with both Root 5.22 and 5.26.

Thanks again,

Bertrand