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] Windows GUI can't launch for 8.4.0dev (nightly) #3726

Closed
echoix opened this issue May 21, 2024 · 7 comments · Fixed by #3732
Closed

[Bug] Windows GUI can't launch for 8.4.0dev (nightly) #3726

echoix opened this issue May 21, 2024 · 7 comments · Fixed by #3732
Labels
blocker Blocking a release bug Something isn't working GUI wxGUI related windows Microsoft Windows specific

Comments

@echoix
Copy link
Member

echoix commented May 21, 2024

Describe the bug

Grass 8.4.0dev nightly from OSGeo4w doesn't launch GUI.
I tried it yesterday night. What is weird it that it first oppened, and the history panel had some errors with very big spaces between errors (with only ^ or a character alike on some lines). I forgot to take a screenshot.
I closed grass, then opened 8.3.2 to compare, no error.
I opened grass 8.4.0dev again, GUI didn't launch.
I then tried installing on a fresh VM (not a full VM, it was windows sandbox), and installed only GRASS 8.4.0dev nightly from osgeo4w.
GUI never launched.
In windows sandbox, it doesn't use my current locale settings, so it removed a source of error.

In both environments, installing a fresh 8.3.2-1 (or 8.3.2-2 now) works correctly.

To reproduce

Describe the steps to reproduce the behavior, e.g.:

  1. Install the grass-dev nighlty from OSGeo4W
  2. Launch grass 8.4.0dev
  3. Wait for the console+splash screen to appear
  4. Wait for the splash screen to disappear
  5. GUI never launches even after minutes.
  6. Force launching gui by typing g.gui wxpython in the grass console.
  7. See error.

Expected behavior

Screenshots

Starting GRASS GIS...
WARNING: Concurrent mapset locking is not supported on Windows

          __________  ___   __________    _______________
         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
        / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \
       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ /
       \____/_/ |_/_/  |_/____/____/   \____/___//____/

Welcome to GRASS GIS 8.4.0dev (exported)
GRASS GIS homepage:                      https://grass.osgeo.org
This version running through:            Command Prompt (C:\WINDOWS\system32\cmd.exe)
Help is available with the command:      g.manual -i
See the licence terms with:              g.version -c
See citation options with:               g.version -x
If required, restart the GUI with:       g.gui wxpython
When ready to quit enter:                exit

Launching <wxpython> GUI in the background, please wait...
Microsoft Windows [version 10.0.22631.3593]
(c) Microsoft Corporation. Tous droits réservés.

C:\Users\E-C\OneDrive\Documents> g.gui wxpython
Launching <wxpython> GUI in the background, please wait...
Traceback (most recent call last):
  File "C:\OSGeo4W\apps\Python312\Lib\site-packages\wx\core.py", line 3427, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\OSGeo4W\apps\grass\grass84/gui/wxpython/wxgui.py", line 93, in show_main_gui
    mainframe = GMFrame(
                ^^^^^^^^
  File "C:\OSGeo4W\apps\grass\grass84\gui\wxpython\main_window\frame.py", line 184, in __init__
    self.BuildPanes()
  File "C:\OSGeo4W\apps\grass\grass84\gui\wxpython\main_window\frame.py", line 577, in BuildPanes
    self._createHistoryBrowser(parent=self)
  File "C:\OSGeo4W\apps\grass\grass84\gui\wxpython\main_window\frame.py", line 397, in _createHistoryBrowser
    self.history = HistoryBrowser(parent=parent, giface=self._giface)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\OSGeo4W\apps\grass\grass84\gui\wxpython\history\browser.py", line 380, in __init__
    self.tree = HistoryBrowserTree(
                ^^^^^^^^^^^^^^^^^^^
  File "C:\OSGeo4W\apps\grass\grass84\gui\wxpython\history\tree.py", line 129, in __init__
    self._initHistoryModel()
  File "C:\OSGeo4W\apps\grass\grass84\gui\wxpython\history\tree.py", line 287, in _initHistoryModel
    self._refreshTree()
  File "C:\OSGeo4W\apps\grass\grass84\gui\wxpython\history\tree.py", line 157, in _refreshTree
    self.SetModel(copy.deepcopy(self._model))
  File "C:\OSGeo4W\apps\grass\grass84\gui\wxpython\gui_core\treeview.py", line 84, in SetModel
    self.RefreshItems()
  File "C:\OSGeo4W\apps\Python312\Lib\site-packages\wx\lib\mixins\treemixin.py", line 371, in RefreshItems
    self.RefreshChildrenRecursively(rootItem)
  File "C:\OSGeo4W\apps\Python312\Lib\site-packages\wx\lib\mixins\treemixin.py", line 395, in RefreshChildrenRecursively
    self.RefreshItemRecursively(child, childIndex)
  File "C:\OSGeo4W\apps\Python312\Lib\site-packages\wx\lib\mixins\treemixin.py", line 402, in RefreshItemRecursively
    item = self.DoRefreshItem(item, itemIndex, hasChildren)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\OSGeo4W\apps\Python312\Lib\site-packages\wx\lib\mixins\treemixin.py", line 413, in DoRefreshItem
    self.RefreshItemText(item, index)
  File "C:\OSGeo4W\apps\Python312\Lib\site-packages\wx\lib\mixins\treemixin.py", line 423, in RefreshItemText
    self.__refreshAttribute(item, index, 'ItemText')
  File "C:\OSGeo4W\apps\Python312\Lib\site-packages\wx\lib\mixins\treemixin.py", line 482, in __refreshAttribute
    value = getattr(self, 'OnGet%s'%attribute)(index, *args)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\OSGeo4W\apps\grass\grass84\gui\wxpython\gui_core\treeview.py", line 94, in OnGetItemText
    label = node.label.replace("&", "")
            ^^^^^^^^^^
  File "C:\OSGeo4W\apps\grass\grass84\gui\wxpython\history\tree.py", line 64, in label
    return self.dayToLabel(self.data["day"])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\OSGeo4W\apps\grass\grass84\gui\wxpython\history\tree.py", line 82, in dayToLabel
    return "{:%B %-d} (yesterday)".format(day)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Invalid format string

System description

  • Operating System: Windows 11 23H2
  • GRASS GIS version: 8.4-309-d505efbc1-1 nightly from OSGeo4w for commit d505efb
C:\Users\E-C\OneDrive\Documents>g.version -breg
version=8.4.0dev
date=2024
revision=exported
build_date=2024-04-14
build_platform=x86_64-w64-mingw32
build_off_t_size=8

./configure --host=x86_64-w64-mingw32 --with-libs=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/lib /C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/bin --with-includes=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/include --libexecdir=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/bin --prefix=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/apps/grass --bindir=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/bin --includedir=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/include --with-opengl=windows --without-x --with-cxx --enable-shared --enable-largefile --with-fftw --with-freetype --with-freetype-includes=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/include/freetype2 --with-proj-share=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/share/proj --with-proj-includes=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/include --with-proj-libs=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/lib --with-postgres --with-postgres-includes=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/include --with-postgres-libs=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/lib --with-gdal=/c/src/osgeo4w/src/grass-dev/grass/mswindows/osgeo4w/gdal-config --with-geos=/c/src/osgeo4w/src/grass-dev/grass/mswindows/osgeo4w/geos-config --with-sqlite --with-sqlite-includes=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/include --with-sqlite-libs=/c/src/osgeo4w/src/grass-dev/grass/mswindows/osgeo4w/lib --with-regex --with-nls --with-zstd --with-odbc --with-blas --with-lapack --with-lapack-includes=/mingw64/include --with-openmp --with-cairo --with-cairo-includes=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/include --with-cairo-ldflags=-L/c/src/osgeo4w/src/grass-dev/grass/mswindows/osgeo4w/lib -lcairo --with-bzlib --with-liblas=/c/src/osgeo4w/src/grass-dev/grass/mswindows/osgeo4w/liblas-config --with-netcdf=/C/src/osgeo4w/src/GRASS-~1/osgeo4w/osgeo4w/bin/nc-config --without-pdal host_alias=x86_64-w64-mingw32
libgis_revision=8.4.0dev
libgis_date=2024-04-13T22:45:54+00:00
proj=9.4.0
gdal=3.8.5
geos=3.12.1
sqlite=3.45.1

Additional context

Also tested out through windows sandbox, that launches a minimal fresh windows image, installed the 8.4-310-25961a86c-1 nightly for 25961a8 (that was just published), and couldn't launch too.

My current OS Locale is based of fr-CA, but since I am currently tackling localisation issues in another software at work, my locale has overrides in number formats so I can see if my software behaves correctly. Windows sandbox uses the default US region and english.

@echoix echoix added bug Something isn't working windows Microsoft Windows specific GUI wxGUI related blocker Blocking a release labels May 21, 2024
@petrasovaa
Copy link
Contributor

Maybe this is relevant? https://stackoverflow.com/questions/10807164/python-time-formatting-different-in-windows
@lindakarlovska could you please look into this?

@echoix
Copy link
Member Author

echoix commented May 23, 2024

There still isn't a new nightly out. Is it weekly?

@echoix
Copy link
Member Author

echoix commented May 23, 2024

Maybe we could ask @jef-n if we could have windows nightlies until the release. I would try them when possible. We'll be done in about 2-3 weeks.

If ever the GUI not opening is solved, is there a certain task that would explore enough of the functionalities to "test" the release, GUI-wise?

@jef-n
Copy link
Contributor

jef-n commented May 23, 2024

Maybe we could ask @jef-n if we could have windows nightlies until the release. I would try them when possible. We'll be done in about 2-3 weeks.

or to just fix the upload of the nightlies. a build of 75375c9 (and the previous of c189b1f) should popup shortly…

@petrasovaa
Copy link
Contributor

This should work:
f"{current_date:%B} {current_date.day}"

The problem is in the - before the d, it's linux only.

@lindakarlovska
Copy link
Contributor

f"{current_date:%B} {current_date.day}"

I am creating PR for it..

@echoix
Copy link
Member Author

echoix commented May 25, 2024

Edit: I wrote the reproduction steps, but were inside the comment, so never appeared

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Blocking a release bug Something isn't working GUI wxGUI related windows Microsoft Windows specific
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants