-
Notifications
You must be signed in to change notification settings - Fork 30
Crash due to Pango conflict on GTK / Linux #157
Comments
Unfortunately I don't have a linux box to troubleshoot. Can you let me know which OS, python, wxPython versions? Have you tried upgrading any of these? It seems unlikely to be a DVHA code issues, and more likely an environment problem. |
@victorgabr Just curious if you came across this error when running on Linux? |
Not the version I have here, but I can pull the last commit and run it on my computer just to test it. I will report back if that happens. |
Awesome, thanks!! |
I am using ubuntu 20.04 , python 3.8.5 , wxpython 4.1.1 . I also tried with wxpython 4.0.7. I am facing same issue with both versions. sorry for late reply. |
@ThirumuruganE which version of Pango? |
You might be out of date:
After we verify you have the latest version of Pango, the next step is to figure out when this error occurs, can you provide a screen shot of DVHA when this error happens? |
I cloned the latest version of the source code. And I am getting an error on pango but in a different line: I will try to update pango. /home/victor/DVH-Analytics/venv/bin/python /home/victor/DVH-Analytics/dvha_app.py
Options.load: Options file corrupted. Loading default options.
'positions'
Options.load: Options file corrupted. Loading default options.
'positions'
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:12.201: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:12.202: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.946: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.946: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.946: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.946: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.946: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.947: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.947: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.947: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.947: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.947: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.947: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.947: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:97971): Gtk-CRITICAL **: 19:49:24.947: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
Bail out! Pango:ERROR:../pango/pango/pango-layout.c:4274:pango_layout_check_lines: assertion failed: (!layout->log_attrs)
**
Pango:ERROR:../pango/pango/pango-layout.c:4274:pango_layout_check_lines: assertion failed: (!layout->log_attrs)
Process finished with exit code 134 (interrupted by signal 6: SIGABRT) |
Seems like this type of error has been around for a long time, but I can't find anything helpful yet. This one was from 2006: https://discuss.wxpython.org/t/wxpython-apps-failing-with-pango-assert-failure/16499 |
I updated pango to the latest version. https://archlinux.org/packages/extra/x86_64/pango/ I had to rebuild wxpython from its source again. But still the same error. wxpython support on Linux is not that great. I used pip, but maybe a conda-forge build has a proper way of linking pango. /home/victor/DVH-Analytics/venv/bin/python /home/victor/DVH-Analytics/dvha_app.py
Options.load: Options file corrupted. Loading default options.
'positions'
Options.load: Options file corrupted. Loading default options.
'positions'
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:23.416: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:23.417: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.819: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.819: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.819: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.819: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.819: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.819: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.820: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.820: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.820: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.820: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.820: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.820: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
(dvha_app.py:46758): Gtk-CRITICAL **: 22:50:29.820: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
WARNING: Options.load: Options file corrupted. Loading default options.
'positions'
Bail out! Pango:ERROR:../pango/pango/pango-layout.c:4288:pango_layout_check_lines: assertion failed: (!layout->log_attrs)
**
Pango:ERROR:../pango/pango/pango-layout.c:4288:pango_layout_check_lines: assertion failed: (!layout->log_attrs)
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
|
I found a workaround, tested it on Manjaro/Arch Linux. You need to build wxpython from the source and link it to your system's GTK 3. I installed webkitgtk3 using: https://aur.archlinux.org/packages/webkitgtk/ git clone --branch wxPython-4.1.1 --recurse-submodules https://github.com/wxWidgets/Phoenix.git
cd Phoenix
git submodule update --init --recursive Build wxpython while linking GTK3 properly. python build.py cleanall
python build.py dox etg --nodoc sip build --gtk3 -j 4
python build.py sdist
creating a package distribution using wheel pip install wheel
python build.py bdist_wheel
Install your wheel binary pip install ./dist/wxPython-4.1.1-cp39-cp39-linux_x86_64.whl
And it worked, no crash due to pango rendering. |
Wow, thanks so much Victor! That sounds like a ton of work. @ThirumuruganE , hopefully this will help you out? I'll have to do some more research to see what I can on my end to possibly avoid this. |
Thank you very much @victorgabr @cutright . |
This is a really long post, providing probably no new information to those already in the thread, but maybe it will be useful anyone else trying to get DVHA working on Ubuntu. I just installed Ubuntu 20.04.2 LTS into a Virtual machine with Virtual Box on my Mac. Aside from PyCharm, the only things I installed were:
and then
and
per https://wxpython.org/Phoenix/docs/html/wx.html2.WebView.html (and needs to be installed before installing wxPython). Python 3.8 came with this version of Ubuntu, which was used for a virtual environment. All DVHA requirements installed with no issues... other than the fact that wxPython had to build from source, so it took a VERY long time. After calling Long story short, I did not get any pango errors in the above scenario. |
FYI, installing libwebkit2gtk-4.0-dev, and then building wxpython from source into a fresh virtual environment solved my WebView2 issues. |
Exactly. In my experience, python wheels or Conda packages never run DVH-Analytics on Linux, I have always had to build wxpython from source, then it links to my current OS libraries. If you update your OS libraries, you might have to rebuild wxpython again. |
Thanks Victor, I'll collect the notes from this thread into the DVHA documentation soon. |
Thank you so much @cutright . |
I am unable to import dicom, I have attached the screenshot of the error. kindly let me know how to resolve this issue.
Thanks in advance
The text was updated successfully, but these errors were encountered: