I’m using ROOT version 6.26/10 on Suse- Linux tumbleweed.
Hi, all, I have been using the the Web-based TCanvasWidget embedded in my qt-based program.to draw markers, Lines Graphs etc for quite some time. I now want to draw objects on the screen which change repeatedly their position when I call the proper subroutine with a pushbutton. If I do this several times in sequence, the program crashes.This happens independently if I call gPad =KWidget->getCanvas(); (KWidget is my TCanvasWidget) only once in the calling routine or allways the inside the called subroutine. Unfortunartely I do not get useful information with the debugger. The crash seems to happen, when gPad->Update(); gPad->Modified(); is called.Someone experienced this and knows how to overcome the problem? Thank you very much in advance Best regards Karl
in a Subroutine ExampleWidget::Doit() which is executed with different parameters each time I press my button.
The drawing looks fine the first few times (about 5) but the the program crashes.
I also tried to call the gPad = KWidget->getCanvas(); outside the subroutine only once and then used gPad->Clear() inside the subroutine before doing the next drawing because I thought that perhaps a repeated call of gPad = KWidget->getCanvas(); could cause the problem. However the result was the same: the program crashed after a few calls
Hi Sergey, I investigated more the problem i am facing. As it seems now, it does not have to do with multiple calls to ui->KWidget->getCanvas(). My program was quite big so I broke it down to the essential parts and coded from scratch.
This part of the program is for projecting points on the surface of a sphere to a plane. The program as I am posting it, works fine. It displays 360 points on the circumference of a circle. If however I uncomment the commented part which should draw a bunch of concentric circles, it crashes. when canv->Update(); is called. It seens that the crash is caused by a Resize event issued at the end of the subroutine:
Only if you are really convinced it is a bug in ROOT then please submit a
report at https://root.cern/bugs Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
#5 0x0000000000000000 in ()
#6 0x00007f7415c3127f in TPad::ResizePad(char const*) () at /home/karl/rootbin/lib/libGpad.so
#7 0x00007f7415c053cd in TCanvas::SetCanvasSize(unsigned int, unsigned int) () at /home/karl/rootbin/lib/libGpad.so
#8 0x0000000000408c1f in TCanvasWidget::resizeEvent(QResizeEvent*) (this=0x4a07110, event=0x7fffc16ec560) at /home/karl/startest/TCanvasWidget.cpp:114
I could send you the .ui file and the other files of the project as well as well, but i do not know how to attach them.
At the start of the program I also get this message, but I don’t know what I should do about it:
Please register the custom scheme ‘rootscheme’ via QWebEngineUrlScheme::registerScheme() before installing the custom scheme handler.
As it seems, I am not even capable of posting the program code correctly, because the #include instructions with the “triangular brackets” (I dont’t know how to call them correctly) have the second part missing in my post