Hi experts,
I'm using wxWidgets (branch WX_3_0_BRANCH) from github and wxPython to develop GUI application on Ubuntu 14.04 LTS.
My app extends ScrolledPanel, and there is an HyperTreeList in which some common controls are added such textbox, checbox, slider... added to the scrolledpanel. My GUI works well except a very strange assertion when scrolling the panel:
(safplus_ide.py:19747): Gtk-CRITICAL **: gtk_widget_set_allocation: assertion 'gtk_widget_get_visible (widget) || gtk_widget_is_toplevel (widget)' failed
I google searched much time but not seen any clue for it.
Does anyone having any clue on this issue?
Thanks.
GTK CRITICAL: gtk assertion failed
Re: GTK CRITICAL: gtk assertion failed
Hi,
I'm not an expert, and you're not likely to find anyone with great expertise in the wxPython-only HyperTreeList in a WX_3_0_BRANCH build . However:
David
I'm not an expert, and you're not likely to find anyone with great expertise in the wxPython-only HyperTreeList in a WX_3_0_BRANCH build . However:
- 1) Gtk-CRITICALs of one sort or another are increasingly common. Sometimes they flag a real problem, but most often they seem not to matter at all as the program works correctly. So if you can't see a problem, ignoring the asserts is not unreasonable.
2) The first Google page for that particular assert message had mostly 2014/5 results, so it's possible that it won't happen with a more recent gtk+ version.
3) If you wish to debug the issue, or at least identify which control(s) are causing it, you should (in a debug build both of your program and wxWidgets) run your program in a debugger; pass your program the --g-fatal-warnings option so it will break at the first warning. The backtrace then is often helpful.
David
Re: GTK CRITICAL: gtk assertion failed
Hi David,
Thanks a lot for your response.
Actually, my program work fine except the assertion, it makes user not to be happy
The assertion only happens when I add a control to an existing treeItem like this:
txt = wx.TextCtrl(self.tree.GetMainWindow(), -1, "")
self.tree.SetItemWindow(treeItem, txt, 1)
I don't thing the above code is incorrect.
As you said, the assertion is not found with a recent gtk+ version, so should I switch to use it? what the exact version? and where can I download it? is it from the github?
Thanks again.
Thanks a lot for your response.
Actually, my program work fine except the assertion, it makes user not to be happy
The assertion only happens when I add a control to an existing treeItem like this:
txt = wx.TextCtrl(self.tree.GetMainWindow(), -1, "")
self.tree.SetItemWindow(treeItem, txt, 1)
I don't thing the above code is incorrect.
As you said, the assertion is not found with a recent gtk+ version, so should I switch to use it? what the exact version? and where can I download it? is it from the github?
Thanks again.
Re: GTK CRITICAL: gtk assertion failed
I don't know enough to have an opinion. Does the wxPython demo contain HyperTreeList? If so, does it assert?I don't thing the above code is incorrect.
I did not say that. I noticed that the google results were mostly from 2014/5, and wondered if it was the gtk+ versions from that time that are affected.As you said, the assertion is not found with a recent gtk+ version
I've no idea what versions might be good or bad.what the exact version? and where can I download it?
You can download any gtk+ version you like from https://www.gtk.org/, but you would need carefully to build wxWidgets/wxPython/your program against that version; and if you found a version that didn't assert, you have no easy way to make all future users of your program link to that gtk+ version.
A much easier way to test would be to do so in ubuntu 16.04 (or 16.10 or...) which will contain a more recent gtk+; a quick way to find out which would be to look in Distrowatch, which lists versions of such libraries for each ubuntu release.
Re: GTK CRITICAL: gtk assertion failed
>>>I don't know enough to have an opinion. Does the wxPython demo contain HyperTreeList? If so, does it assert?
Yes, the assert is also seen with HyperTreeList demo
I tried my program on Ubuntu 10.04 and the assert has not been seen.
I'll try with Ubuntu 16.04 or higher to see if it works.
Thanks a lot.
Yes, the assert is also seen with HyperTreeList demo
I tried my program on Ubuntu 10.04 and the assert has not been seen.
I'll try with Ubuntu 16.04 or higher to see if it works.
Thanks a lot.