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] Broken vector topology crashes wxGUI #488

Closed
neteler opened this issue Apr 4, 2020 · 8 comments
Closed

[Bug] Broken vector topology crashes wxGUI #488

neteler opened this issue Apr 4, 2020 · 8 comments
Labels
bug Something isn't working GUI wxGUI related
Milestone

Comments

@neteler
Copy link
Member

neteler commented Apr 4, 2020

Describe the bug

Opening a vector map (polygons) with broken topology (due to previous crash), the entire wxGUI shuts down:

Coor file of vector map
<high_low_suitable_Europe@figures> is larger
than it should be (180 bytes excess)
Traceback (most recent call last):
  File "/home/mneteler/software/grass78_git/dist.x86_64-pc-
linux-gnu/gui/wxpython/mapwin/buffered.py", line 593, in
OnPaint

self.pdcVector.DrawToDCClipped(gcdc, rgn)
wx._core
.
wxAssertionError
:
C++ assertion "n > 1" failed at
../src/common/graphcmn.cpp(742) in StrokeLines():
Traceback (most recent call last):
  File "/home/mneteler/software/grass78_git/dist.x86_64-pc-
linux-gnu/gui/wxpython/mapwin/buffered.py", line 593, in
OnPaint

self.pdcVector.DrawToDCClipped(gcdc, rgn)
wx._core
.
wxAssertionError
:
C++ assertion "n > 1" failed at
../src/common/graphcmn.cpp(742) in StrokeLines():
Traceback (most recent call last):
[...]

It seems to be in a loop, repeating the same Traceback multiple times (may also be due to zooming attempts).

To Reproduce

Hard to reproduce. It usually silently crashes.

System description (please complete the following information):

Linux Fedora 31

g.version -rge
version=7.8.3dev
date=2020
revision=ecc6e6f79
build_date=2020-04-04
build_platform=x86_64-pc-linux-gnu
build_off_t_size=8
libgis_revision=340c2a4a0
libgis_date="Thu Apr 2 13:03:21 2020 +0200"
proj=5.2.0
gdal=2.3.2
geos=3.7.1
sqlite=3.30.0

Screenshot

image

@neteler neteler added bug Something isn't working backport_needed GUI wxGUI related labels Apr 4, 2020
@neteler neteler added this to the 7.8.3 milestone Apr 4, 2020
@neteler
Copy link
Member Author

neteler commented Apr 5, 2020

Confirmed also for master.

@petrasovaa
Copy link
Contributor

I can't reproduce it, which is not a big surprise. Maybe it happens with a particular vector you could share?

@neteler
Copy link
Member Author

neteler commented Apr 24, 2020

I have stored the vector map here as a "pack" file (EPSG 4326):

https://data.neteler.org/tmp/high_low_suitable_Europe.pack

@neteler neteler modified the milestones: 7.8.3, 7.8.4 Apr 26, 2020
@tmszi
Copy link
Member

tmszi commented May 27, 2020

I confirm this bug (tested with santana3a_high_low_suitable_Europe vector map layer)

vdigit

Error message (star editting):

Traceback (most recent call last):
  File "/usr/lib64/grass79/gui/wxpython/mapwin/buffered.py",
line 593, in OnPaint

self.pdcVector.DrawToDCClipped(gcdc, rgn)
wx._core
.
wxAssertionError
:
C++ assertion "n > 1" failed at /var/tmp/portage/x11-libs/wx
GTK-3.0.4-r302/work/wxWidgets-3.0.4/src/common/graphcmn.cpp(
742) in StrokeLines():

@neteler
Copy link
Member Author

neteler commented Aug 11, 2020

Still the case in current master:

GRASS version: 7.9.dev                                                          
Code revision: 64527a73f                                                        
Build date: 2020-08-06                                                          
Build platform: x86_64-pc-linux-gnu                                             
GDAL: 3.0.4                                                                     
PROJ: 6.3.2                                                                     
GEOS: 3.8.1                                                                     
SQLite: 3.32.3                                                                  
Python: 3.8.5                                                                   
wxPython: 4.0.7                                                                 
Platform: Linux-5.6.16-300.fc32.x86_64-x86_64-with-glibc2.2.5

@tmszi
Copy link
Member

tmszi commented Aug 16, 2020

Additional info:

If I zoom into santana3a_high_low_suitable_Europe vector map layer, and start editing after that, editing work correctly. If I zoom out or move/pan to problematic part of vector topology during editing I got same error message as mentioned above and render maps stop (same screenshot).

v.build -e map=santana3a_high_low_suitable_Europe

Building topology for vector map <santana3a_high_low_suitable_Europe@PERMANENT>...
Registering primitives...
Building areas...
 100%
Attaching islands...
 100%
Attaching centroids...
 100%
WARNING: Number of incorrect boundaries: 66
WARNING: Number of centroids outside area: 1
Checking for topological errors...
WARNING: Number of boundaries of length zero: 2
ERROR: Intersection with points is not yet supported

Problematic is WARNING: Number of boundaries of length zero: 2.

After clean vector map, editing work correctly.

v.clean input=santana3a_high_low_suitable_Europe@PERMANENT output=santana3a_high_low_suitable_Europe_clean type=line,boundary tool=rmline thres=0.00

@neteler
Copy link
Member Author

neteler commented Nov 24, 2021

Great, PR #911 solves it nicely:

image

... "Yes" leads to:

image

Thanks, @tmszi !

@petrasovaa
Copy link
Contributor

Fixed in #1989, it is in main and 8.0 branch now.

ninsbl pushed a commit to ninsbl/grass that referenced this issue Oct 26, 2022
ninsbl pushed a commit to ninsbl/grass that referenced this issue Feb 17, 2023
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

3 participants