Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The wxGUI crashes at launch #1971

Closed
jmburgos opened this issue Nov 11, 2021 · 17 comments
Closed

[Bug]: The wxGUI crashes at launch #1971

jmburgos opened this issue Nov 11, 2021 · 17 comments
Labels
bug Something isn't working GUI wxGUI related

Comments

@jmburgos
Copy link

Describe the bug
I cannot open an existing mapset or create a new one. The wxGUI crashes as soon as I press the "Start GRASS session" button.

To Reproduce
Steps to reproduce the behavior:

  1. Start GRASS with the "-gui" option.
  2. Select an existing location and mapset, or create a new one.
  3. Press the "Start GRASS session" button
  4. The wxGUI crashes with the following error:
    Launching GUI in the background, please wait...
    GRASS 7.8.5 (newLocation):~/Documents/Kelp > Traceback (most recent call last):
    File "/usr/lib64/grass78/gui/wxpython/wxgui.py", line 73, in OnInit
    splash = SC.AdvancedSplash(bitmap=introBmp,
    File "/usr/lib64/python3.10/site-packages/wx/lib/agw/advancedsplash.py", line 251, in init
    self.SetTextFont()
    File "/usr/lib64/python3.10/site-packages/wx/lib/agw/advancedsplash.py", line 442, in SetTextFont
    self._textfont.SetPointSize(self._textsize)
    TypeError: Font.SetPointSize(): argument 1 has unexpected type 'float'
    OnInit returned false, exiting...

Expected behavior
Not to have a crash, naturally. :)

System description (please complete the following information):

  • Operating System: Fedora 35
  • GRASS GIS version 7.8.5

Details about further software components
version=7.8.5
date=2020
revision=exported
build_date=2021-08-10
build_platform=x86_64-redhat-linux-gnu
build_off_t_size=8
libgis_revision=2021-08-12T05:55:20+00:00
libgis_date=2021-08-12T05:55:20+00:00
proj=8.1.0
gdal=3.3.1
geos=3.9.1
sqlite=3.36.0

3.10.0 (default, Oct 4 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]
4.0.7 gtk3 (phoenix) wxWidgets 3.0.5

@jmburgos jmburgos added the bug Something isn't working label Nov 11, 2021
@petrasovaa
Copy link
Contributor

petrasovaa commented Nov 12, 2021

This looks like a problem in wxPython. I would try newer wxPython version. Not sure why it popped up in your case, maybe it's because newest Python 3.10 version? In main branch this splash screen widget is not used, so there won't be this problem, so we could backport that.

@petrasovaa petrasovaa added the GUI wxGUI related label Nov 12, 2021
@neteler
Copy link
Member

neteler commented Nov 12, 2021

BTW: the new 7.8.6 is upcoming for Fedora, at time in testing: https://bugzilla.redhat.com/show_bug.cgi?id=2012725

@neteler neteler changed the title The wxGUI crashes at launch [Bug]: The wxGUI crashes at launch Dec 9, 2021
@frankbroniewski
Copy link

I just wanted to drop in and say that I run into the same issue, same system specs as @jmburgos. WxPython is version 4.0.7, I don't think that a newer version is available in the Fedora repos? But I am sure I can work around not having a GUI while waiting for the 7.8.6 release, I find the command line quite workable actually

@neteler
Copy link
Member

neteler commented Dec 10, 2021

On Fedora GRASS GIS 7.8.6 has been published on 2021-11-15. Did you try updating your system?

@frankbroniewski
Copy link

frankbroniewski commented Dec 10, 2021

Hi Markus, are you sure that's for Fedora 35 and not 36? According to https://src.fedoraproject.org/rpms/grass it's still on 7.8.5, and I did a dnf upgrade just in case ... or do I need to add a copr? GRASS GIS download page https://grass.osgeo.org/download/linux/ links to the Fedora projects rpm link above.

@neteler
Copy link
Member

neteler commented Dec 10, 2021

Hi Frank, I overlooked that it didn't migrate automatically to stable in F35... sorry. I just gave it a kick :-)
https://bodhi.fedoraproject.org/updates/FEDORA-2021-ee225d70b8 (see at page bottom: "This update has been submitted for stable by neteler."). It may take a day or so. Thanks for the notification!

@frankbroniewski
Copy link

Hi Markus, no worries, I mean, you fixed it in the middle of the night. Thanks a ton for your help!

@danhox
Copy link

danhox commented Dec 12, 2021

The problem still persiste after grass have been updated to 7.8.6.2

@neteler
Copy link
Member

neteler commented Dec 13, 2021

The problem still persiste after grass have been updated to 7.8.6.2

Please add which Fedora version you use along with the wxPython version number.

@danhox
Copy link

danhox commented Dec 13, 2021

Fedora 35 and wxpython4 and python 3.10

@danhox
Copy link

danhox commented Dec 14, 2021

3.10.0 (default, Oct 4 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]
4.0.7 gtk3 (phoenix) wxWidgets 3.0.5

@petrasovaa
Copy link
Contributor

I backported #1718 to 7.8 which should fix this problem by using a different wx splash screen widget. I would try wxPython 4.1 (not sure if they fixed it there), or using Python <3.10.

@neteler
Copy link
Member

neteler commented Dec 14, 2021

I have upgraded my system to F35 today and can confirm the bug.

# G78
Traceback (most recent call last):
  File "/usr/lib64/python3.10/site-packages/wx/core.py", line 3285, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/gui/wxpython/wxgui.py", line 83, in show_main_gui
    mainframe = GMFrame(parent=None, id=wx.ID_ANY, workspace=self.workspaceFile)
  File "/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/gui/wxpython/lmgr/frame.py", line 143, in __init__
    self.notebook = self._createNoteBook()
  File "/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/gui/wxpython/lmgr/frame.py", line 365, in _createNoteBook
    self.datacatalog = DataCatalog(
  File "/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/gui/wxpython/datacatalog/catalog.py", line 45, in __init__
    self.toolbar = DataCatalogToolbar(parent=self)
  File "/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/gui/wxpython/datacatalog/toolbars.py", line 47, in __init__
    self.InitToolbar(self._toolbarData())
  File "/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/toolbars.py", line 123, in InitToolbar
    self.CreateTool(*tool)
  File "/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/toolbars.py", line 145, in CreateTool
    toolWin = self.AddLabelTool(tool, label, bitmap,
  File "/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/wrap.py", line 434, in AddLabelTool
    return wx.ToolBar.AddTool(self, toolId=toolId, label=label, bitmap=bitmap, bmpDisabled=bmpDisabled,
TypeError: ToolBar.AddTool(): arguments did not match any overloaded call:
  overload 1: 'toolId' is not a valid keyword argument
  overload 2: argument 'toolId' has unexpected type 'WindowIDRef'
  overload 3: argument 'toolId' has unexpected type 'WindowIDRef'

and

G8:
Traceback (most recent call last):
  File "/usr/lib64/python3.10/site-packages/wx/core.py", line 3285, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "/home/mneteler/software/grass_main/dist.x86_64-pc-linux-gnu/gui/wxpython/wxgui.py", line 88, in show_main_gui
    mainframe = GMFrame(parent=None, id=wx.ID_ANY, workspace=self.workspaceFile)
  File "/home/mneteler/software/grass_main/dist.x86_64-pc-linux-gnu/gui/wxpython/lmgr/frame.py", line 153, in __init__
    self._createDataCatalog(self.notebook)
  File "/home/mneteler/software/grass_main/dist.x86_64-pc-linux-gnu/gui/wxpython/lmgr/frame.py", line 337, in _createDataCatalog
    self.datacatalog = DataCatalog(parent=parent, giface=self._giface)
  File "/home/mneteler/software/grass_main/dist.x86_64-pc-linux-gnu/gui/wxpython/datacatalog/catalog.py", line 67, in __init__
    self.toolbar = DataCatalogToolbar(parent=self)
  File "/home/mneteler/software/grass_main/dist.x86_64-pc-linux-gnu/gui/wxpython/datacatalog/toolbars.py", line 64, in __init__
    self.InitToolbar(self._toolbarData())
  File "/home/mneteler/software/grass_main/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/toolbars.py", line 119, in InitToolbar
    self.CreateTool(*tool)
  File "/home/mneteler/software/grass_main/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/toolbars.py", line 141, in CreateTool
    toolWin = self.AddLabelTool(
  File "/home/mneteler/software/grass_main/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/wrap.py", line 504, in AddLabelTool
    return wx.ToolBar.AddTool(
TypeError: ToolBar.AddTool(): arguments did not match any overloaded call:
  overload 1: 'toolId' is not a valid keyword argument
  overload 2: argument 'toolId' has unexpected type 'WindowIDRef'
  overload 3: argument 'toolId' has unexpected type 'WindowIDRef'

@petrasovaa
Copy link
Contributor

@neteler I think this is a different problem. I believe the deprecate warning from #1302 is enforced in Python 3.10, This was addressed in newer wxPython, you need at least 4.1. So I think this issue can be closed, there is not much to do on our side.

@neteler
Copy link
Member

neteler commented Dec 15, 2021

ok, I see. The new problem is now reported in #2019.
Closing this one.

@neteler neteler closed this as completed Dec 15, 2021
@neteler
Copy link
Member

neteler commented Dec 16, 2021

Note: Installation instruction for Fedora 35 with Python 3.10 version to build a local wxPython 4.1.1 are now found here:
#2019 (comment)

@neteler
Copy link
Member

neteler commented Dec 23, 2021

@neteler I think this is a different problem. I believe the deprecate warning from #1302 is enforced in Python 3.10, This was addressed in newer wxPython, you need at least 4.1. So I think this issue can be closed, there is not much to do on our side.

Info for Fedora 35 users:

---------- Forwarded message ---------
From: bugzilla@redhat.com
Date: Wed, Dec 22, 2021 at 9:38 PM

https://bugzilla.redhat.com/show_bug.cgi?id=1827788

--- Comment 10 from Scott Talbert ---
markusN, I just submitted a bunch of Python 3.10 fixes to python-wxpython4:
https://src.fedoraproject.org/rpms/python-wxpython4/c/f55a17c2d3b336c82fb44f7816ec63219847f4cc?branch=rawhide

Once these build successfully in Rawhide, I'll push them to F35 as well. I was able to launch the GRASS GUI on F35 with these changes in place. Please let me know if you find any additional issues. Also, please file a separate bug in the future.

ar-jan added a commit to ar-jan/void-packages that referenced this issue Feb 15, 2022
Version 7.8.7RC1 includes a workaround for a wxPython issue
OSGeo/grass#1971 (comment)
ar-jan added a commit to ar-jan/void-packages that referenced this issue Feb 15, 2022
Version 7.8.7RC1 includes a workaround for a wxPython issue
OSGeo/grass#1971 (comment)
ar-jan added a commit to ar-jan/void-packages that referenced this issue Feb 15, 2022
Version 7.8.7RC1 includes a workaround for a wxPython issue
OSGeo/grass#1971 (comment)
ar-jan added a commit to ar-jan/void-packages that referenced this issue Feb 15, 2022
Version 7.8.7RC1 includes a workaround for a wxPython issue
OSGeo/grass#1971 (comment)
ar-jan added a commit to ar-jan/void-packages that referenced this issue Feb 15, 2022
Version 7.8.7RC1 includes a workaround for a wxPython issue
OSGeo/grass#1971 (comment)
ar-jan added a commit to ar-jan/void-packages that referenced this issue Feb 15, 2022
Version 7.8.7RC1 includes a workaround for a wxPython issue
OSGeo/grass#1971 (comment)
ar-jan added a commit to ar-jan/void-packages that referenced this issue Feb 15, 2022
Version 7.8.7RC1 includes a workaround for a wxPython issue
OSGeo/grass#1971 (comment)
ar-jan added a commit to ar-jan/void-packages that referenced this issue Feb 15, 2022
Version 7.8.7RC1 includes a workaround for a wxPython issue
OSGeo/grass#1971 (comment)
ar-jan added a commit to ar-jan/void-packages that referenced this issue Feb 15, 2022
Version 7.8.7RC1 includes a workaround for a wxPython issue
OSGeo/grass#1971 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GUI wxGUI related
Projects
None yet
Development

No branches or pull requests

5 participants