Opened 10 years ago
Closed 9 years ago
#2476 closed defect (fixed)
vector digitizer crashing with _breakLineAtIntersection
Reported by: | annakrat | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.3 |
Component: | wxGUI | Version: | svn-trunk |
Keywords: | vdigit | Cc: | |
CPU: | Unspecified | Platform: | Linux |
Description
I was able to reproduce this crash every time.
- draw a line (just 2 points)
- draw an area so that it intersects with the line
- right click to confirm, crash
Crashing happens in level_two.c in wxdigit.py in _addFeature. Without the line, the area closes without problem, so maybe _breakLineAtIntersection is where something goes wrong.
Change History (7)
follow-up: 2 comment:1 by , 10 years ago
follow-up: 3 comment:2 by , 10 years ago
Replying to mmetz:
Replying to annakrat:
Crashing happens in level_two.c in wxdigit.py in _addFeature. Without the line, the area closes without problem, so maybe _breakLineAtIntersection is where something goes wrong.
The problem is in wxdigit.py in _addFeature: the line is broken, afterwards the digitizer tries to get the areas for this line. But this line no longer exists because it has been broken into new lines -> crash.
You would need to get areas on each side before breaking the line, but the vector lib might only be able to build areas after the new line was broken. I would suggest to break the line only after trying to attach centroids.
Fixed in r63077.
follow-up: 4 comment:3 by , 10 years ago
Replying to mmetz:
Replying to mmetz:
You would need to get areas on each side before breaking the line, but the vector lib might only be able to build areas after the new line was broken. I would suggest to break the line only after trying to attach centroids.
Fixed in r63077.
Thanks, it's not crashing any more. But when I draw a line over an area, so that it breaks, I get this error:
Traceback (most recent call last): File "/home/anna/dev/grass/trunk1/dist.x86_64-unknown- linux-gnu/gui/wxpython/mapwin/buffered.py", line 1248, in MouseActions self.OnRightUp(event) File "/home/anna/dev/grass/trunk1/dist.x86_64-unknown- linux-gnu/gui/wxpython/mapwin/buffered.py", line 1485, in OnRightUp self._onRightUp(event) File "/home/anna/dev/grass/trunk1/dist.x86_64-unknown- linux-gnu/gui/wxpython/vdigit/mapwindow.py", line 935, in _onRightUp (UserSettings.Get(group = 'vdigit', key = "category", subkey = 'value'), ) IndexError : list index out of range
It seems to be related to the fix, list 'fids' is empty, but I couldn't see what's wrong.
follow-up: 5 comment:4 by , 10 years ago
Replying to annakrat:
Replying to mmetz:
Replying to mmetz:
You would need to get areas on each side before breaking the line, but the vector lib might only be able to build areas after the new line was broken. I would suggest to break the line only after trying to attach centroids.
Fixed in r63077.
Thanks, it's not crashing any more. But when I draw a line over an area, so that it breaks, I get [another] error.
It seems to be related to the fix, list 'fids' is empty, but I couldn't see what's wrong.
I fixed it in r63178, list 'fids' is no longer empty but can contain invalid line ids.
I can not close g.gui.vdigit because GetProgress() is not implemented, but the vector is properly created.
comment:5 by , 10 years ago
Replying to mmetz:
I can not close g.gui.vdigit because GetProgress() is not implemented, but the vector is properly created.
This should be fixed in r63204.
comment:6 by , 9 years ago
Milestone: | 7.0.0 → 7.0.3 |
---|
This issue seems to be fixed (tested with 7.0.3svn). Closing, feel free to re-open if needed.
comment:7 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to annakrat:
The problem is in wxdigit.py in _addFeature: the line is broken, afterwards the digitizer tries to get the areas for this line. But this line no longer exists because it has been broken into new lines -> crash.
You would need to get areas on each side before breaking the line, but the vector lib might only be able to build areas after the new line was broken. I would suggest to break the line only after trying to attach centroids.