Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#2439 closed defect (fixed)

g.gui.iclass crashes

Reported by: madi Owned by: grass-dev@…
Priority: blocker Milestone: 7.2.0
Component: wxGUI Version: svn-trunk
Keywords: g.gui.iclass, classification, imagery Cc:
CPU: x86-64 Platform: Linux

Description

Hi,

I try to use g.gui.iclass but it crashes. What I do: 1) Launch g.gui.iclass 2) Add RGB map layer 3) Zoom and pan 4) Add a class in the class manager (no spaces in the name, no fancy characters), and assign a custom color 5) Select "digitize new area" and start digitizing 6) I manage to digitize a couple of polygons, then it explodes - disappears with no errors or anything.

Linux RHEL 6.5 GRASS 7.1.svn (r62079)

Thanks

Attachments (1)

2014-11-27-191149_1440x900_scrot.png (69.1 KB) - added by madi 5 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 5 years ago by annakrat

Are you able to reproduce it several times or is it more random behavior? It is working for me on Ubuntu.

comment:2 Changed 5 years ago by madi

It happens all the times. Now three times in a row. Thanks

comment:3 Changed 5 years ago by annakrat

Does vector digitizer works for you, can you digitize areas? g.gui.iclass is using it. Is there any specific number of polygons you manage to digitize before it crashes or it changes every time?

comment:4 in reply to:  3 Changed 5 years ago by madi

Replying to annakrat:

Does vector digitizer works for you, can you digitize areas?

Yes it works (although the digitizer somehow "retains" the cursor from the terminal even after closing it, thus, before doing anything else in the terminal, I have to ctrl+c to get back my cursor).

g.gui.iclass is using it. Is there any specific number of polygons you manage to digitize before it crashes or it changes every time?

I managed to digitize up to 3 small polygons. Trials were uniformly distributed between (1,3). Since I verified that the digitizer works standalone, I have created the training map separately and then launched the g.gui.iclass from command line passing it. It doesn't seem to work though, the histograms are empty, coincident plots are horizontal lines and "scatter plots" only shows the grey empty area that is probably supposed to lie beneath the graphs. I understand that this problems are nearly impossible to reproduce on other machines. I'll try with my laptop to see if it works there.

Thank you for your time

comment:5 Changed 5 years ago by madi

Hi,

another tentative on a different computer [Fedora 20 installed, GRASS 7.1.svn (r62244), wxPython 2.8.12.0-5, Python 2.7.5] led to a crash. This time the digitization process went a little bit further, the crash occurred when i pushed "run analysis". The whole GUI crashed. No error shown.

Thanks, madi

comment:6 Changed 5 years ago by neteler

I just tried on Fedora 20, G7.trunk, r62247, confirmed.

The issue occurs when snapping is applied to close a boundary. To replicate:

# NC location
g.region rast=elev_state_500m -p
g.gisenv set=DEBUG=3
g.gui.iclass
  • load raster map 'elev_state_500m@PERMANENT' into upper display
  • create a class (default settings are fine)
  • digitize some new area with the left-most digitizer tool
  • do several, let enough space to a have large snapping area
  • let one cut another (overlap)
  • ZAP

The rest of the output is this:

D2/3: Clean and create array for line B
D3/3:   cross = 0 seg1/dist1 = 0/0.000000 seg2/dist2 = 0/173449.944234 x = 551622.851745 y = 188769.787209
D3/3:   cross = 1 seg1/dist1 = 1/266055.291692 seg2/dist2 = 0/0.000000 x = 405511.416010 y = 95301.442290
D3/3: cross 0 deleted (first/last point)
D3/3: cross 1 deleted (first/last point)
D3/3:   alive crosses:
D3/3:   naxlines = 0 nbxlines = 0
D3/3:   j = 5 bline = 9
D3/3: Vect_read_line(): line = 9
D3/3: V2_read_line_nat(): line = 9
D3/3: Vect__Read_line_nat: offset = 482
D3/3:     type = 4, do_cats = 0 dead = 0
D3/3:     n_points = 3
D3/3:     off = 535
D3/3: lines 5 and 9 touching by end nodes only -> no intersection
D3/3: nlines =  4
D3/3: aline =  6
D3/3: Vect_read_line(): line = 6
D3/3: V2_read_line_nat(): line = 6
D3/3: Vect__Read_line_nat: offset = 291
D3/3:     type = 4, do_cats = 0 dead = 0
D3/3:     n_points = 5
D3/3:     off = 376
D3/3: touch1: n = 1 s = 1 e = 1 w = 1
D3/3: touch2: n = 1 s = 1 e = 1 w = 0
D3/3: Vect_select_lines_by_box()
D3/3:   Box(N,S,E,W,T,B): 2.304216e+05, 2.259615e+04, 8.107041e+05, 3.475503e+05, 0.000000e+00, 0.000000e+00
D3/3: dig_select_lines_with_box()
D3/3:   7 lines selected (all types)
D3/3:   6 lines of requested type
D3/3:   6 lines selected by box
D3/3:   j = 0 bline = 7
D3/3: Vect_read_line(): line = 7
D3/3: V2_read_line_nat(): line = 7
D3/3: Vect__Read_line_nat: offset = 376
D3/3:     type = 4, do_cats = 0 dead = 0
D3/3:     n_points = 3
D3/3:     off = 429
D2/3: Vect_segment_intersection(): d = 11342745774.668097, d1 = 0.000000, d2 = 11342745774.668097
D2/3:  -> not parallel/collinear: d1 = 0.000000, d2 = 11342745774.668097
D2/3:   -> intersection 551622.851745, 188769.787209
D2/3:   -> 0 x 1: intersection type = 1
D3/3:     in 551622.851745, 188769.787209 
D2/3: n_cross = 1
D2/3: Clean and create array for line A
D3/3:   cross = 0 seg1/dist1 = 0/0.000000 seg2/dist2 = 1/149966.456340 x = 551622.851745 y = 188769.787209
D3/3: cross 0 deleted (first/last point)
D3/3:   alive crosses:
D2/3: Clean and create array for line B
D3/3:   cross = 0 seg1/dist1 = 1/149966.456340 seg2/dist2 = 0/0.000000 x = 551622.851745 y = 188769.787209
D3/3: cross 0 deleted (first/last point)
D3/3:   alive crosses:
D3/3:   naxlines = 0 nbxlines = 0
D3/3:   j = 4 bline = 8
D3/3: Vect_read_line(): line = 8
D3/3: V2_read_line_nat(): line = 8
D3/3: Vect__Read_line_nat: offset = 429
D3/3:     type = 4, do_cats = 0 dead = 0
D3/3:     n_points = 3
D3/3:     off = 482
D2/3: Vect_segment_intersection(): d = 12793518020.367088, d1 = 0.000000, d2 = 0.000000
D2/3:  -> not parallel/collinear: d1 = 0.000000, d2 = 0.000000
D2/3:   -> intersection 551622.851745, 188769.787209
D2/3:   -> 0 x 0: intersection type = 1
D3/3:     in 551622.851745, 188769.787209 
D2/3: Vect_segment_intersection(): d = -1235536961.876049, d1 = -12793518020.367088, d2 = -21610915633.841331
D2/3:  -> not parallel/collinear: d1 = -12793518020.367088, d2 = -21610915633.841331
D2/3:   -> no intersection
D2/3: Vect_segment_intersection(): d = -49731304514.643005, d1 = -41502689191.546005, d2 = -70106683186.608276
D2/3:  -> not parallel/collinear: d1 = -41502689191.546005, d2 = -70106683186.608276
D2/3:   -> no intersection
D2/3: n_cross = 1
D2/3: Clean and create array for line A
D3/3:   cross = 0 seg1/dist1 = 0/0.000000 seg2/dist2 = 0/0.000000 x = 551622.851745 y = 188769.787209
D3/3: cross 0 deleted (first/last point)
D3/3:   alive crosses:
D2/3: Clean and create array for line B
D3/3:   cross = 0 seg1/dist1 = 0/0.000000 seg2/dist2 = 0/0.000000 x = 551622.851745 y = 188769.787209
D3/3: cross 0 deleted (first/last point)
D3/3:   alive crosses:
D3/3:   naxlines = 0 nbxlines = 0
D3/3:   j = 5 bline = 9
D3/3: Vect_read_line(): line = 9
D3/3: V2_read_line_nat(): line = 9
D3/3: Vect__Read_line_nat: offset = 482
D3/3:     type = 4, do_cats = 0 dead = 0
D3/3:     n_points = 3
D3/3:     off = 535
D2/3: n_cross = 0
D3/3:   naxlines = 0 nbxlines = 0
D3/3: nlines =  4

At this point the iclass GUI is closed.

comment:7 Changed 5 years ago by mlennert

I don't know if it's connected, but yesterday I was working with a group of students who were supposed to digitize using a fairly recent 7.0 release branch version (not with g.gui.iclass, but with the wx digitizer in the map display and many had problems with GUI crashes. I was too busy to try to debug these, though, and haven't had the time to go back to those machines, yet, so I can't offer more debugging info. Just thought that maybe the problem is not in g.gui.iclass, but in the general digitizing routines.

Moritz

comment:8 in reply to:  6 Changed 5 years ago by mlennert

Replying to neteler:

I just tried on Fedora 20, G7.trunk, r62247, confirmed.

The issue occurs when snapping is applied to close a boundary. To replicate:

# NC location
g.region rast=elev_state_500m -p
g.gisenv set=DEBUG=3
g.gui.iclass
  • load raster map 'elev_state_500m@PERMANENT' into upper display
  • create a class (default settings are fine)
  • digitize some new area with the left-most digitizer tool
  • do several, let enough space to a have large snapping area
  • let one cut another (overlap)
  • ZAP

I can confirm this in g.gui.vdigit as well, even without letting one area cut another. It is enough that the newly digitized area is within snapping distance of the other. This is easiest to see when you use a fairly high distance (working on the landsat images in the NC example data I used 1000m). The debug messages are similar to Markus'.

As g.gui.vdigit is a python script I don't know how to debug this with gdb (I get "No executable file specified"). Any hints ?

Moritz

comment:9 Changed 5 years ago by mlennert

Priority: normalblocker

Redinfind priority as blocker as I think that digitizing is a fundamental functionality and we should not release a new version with such issues.

comment:10 Changed 5 years ago by annakrat

See possible duplicate #2476.

comment:11 in reply to:  10 ; Changed 5 years ago by mmetz

Replying to annakrat:

See possible duplicate #2476.

worksforme as of r63077. Please test.

comment:12 in reply to:  11 Changed 5 years ago by mlennert

Replying to mmetz:

Replying to annakrat:

See possible duplicate #2476.

worksforme as of r63077. Please test.

I cannot make the interface crash anymore.

Thanks a lot Markus !

Probably can do with some more serious, production-style testing, but after a quick test it seems ok.

Moritz

comment:13 in reply to:  11 ; Changed 5 years ago by madi

Replying to mmetz:

Replying to annakrat:

See possible duplicate #2476.

worksforme as of r63077. Please test.

Thank you Markus. I'm still not able to run g.gui.iclass properly. I don't know if it's related, but when I try to display the map it says that I haven't specified the name of the maps. Let's see if I can attach a screen shot

Changed 5 years ago by madi

comment:14 in reply to:  13 ; Changed 5 years ago by annakrat

Replying to madi:

Replying to mmetz:

Replying to annakrat:

See possible duplicate #2476.

worksforme as of r63077. Please test.

Thank you Markus. I'm still not able to run g.gui.iclass properly. I don't know if it's related, but when I try to display the map it says that I haven't specified the name of the maps. Let's see if I can attach a screen shot

That's related to something different (#2454), please update and try again, this should be solved.

comment:15 in reply to:  14 ; Changed 5 years ago by madi

Replying to annakrat:

Replying to madi:

Replying to mmetz:

Replying to annakrat:

See possible duplicate #2476.

worksforme as of r63077. Please test.

Thank you Markus. I'm still not able to run g.gui.iclass properly. I don't know if it's related, but when I try to display the map it says that I haven't specified the name of the maps. Let's see if I can attach a screen shot

That's related to something different (#2454), please update and try again, this should be solved.

Thank you Anna, yes indeed now this works. The only strange behaviour that still remains for me is that digitizing polygons, the dotted line (as far as I remember it used to be blue) that serves as a guide has disappeared. So now while i digitize a polygon, when I confirm a segment it turns green, but when i go to the next segment there is no guiding line until i confirm it green.

Thanks, madi

comment:16 in reply to:  15 ; Changed 5 years ago by mlennert

Replying to madi:

Replying to annakrat:

Replying to madi:

Replying to mmetz:

Replying to annakrat:

See possible duplicate #2476.

worksforme as of r63077. Please test.

Thank you Markus. I'm still not able to run g.gui.iclass properly. I don't know if it's related, but when I try to display the map it says that I haven't specified the name of the maps. Let's see if I can attach a screen shot

That's related to something different (#2454), please update and try again, this should be solved.

Thank you Anna, yes indeed now this works. The only strange behaviour that still remains for me is that digitizing polygons, the dotted line (as far as I remember it used to be blue) that serves as a guide has disappeared. So now while i digitize a polygon, when I confirm a segment it turns green, but when i go to the next segment there is no guiding line until i confirm it green.

I can confirm this, but for me (in the general digitizer called directly in the Map Display), but the problem only appears after opening the settings menu. When I close the digitizer and reopen it, I then see the green dotted line again.

Moritz

comment:17 in reply to:  16 ; Changed 5 years ago by mlennert

Replying to mlennert:

Replying to madi:

Replying to annakrat:

Replying to madi:

Replying to mmetz:

Replying to annakrat:

See possible duplicate #2476.

worksforme as of r63077. Please test.

Thank you Markus. I'm still not able to run g.gui.iclass properly. I don't know if it's related, but when I try to display the map it says that I haven't specified the name of the maps. Let's see if I can attach a screen shot

That's related to something different (#2454), please update and try again, this should be solved.

Thank you Anna, yes indeed now this works. The only strange behaviour that still remains for me is that digitizing polygons, the dotted line (as far as I remember it used to be blue) that serves as a guide has disappeared. So now while i digitize a polygon, when I confirm a segment it turns green, but when i go to the next segment there is no guiding line until i confirm it green.

I can confirm this, but for me (in the general digitizer called directly in the Map Display), but the problem only appears after opening the settings menu. When I close the digitizer and reopen it, I then see the green dotted line again.

More info: I can also make the line appear again by simply switching drawing tools..

comment:18 in reply to:  17 ; Changed 5 years ago by madi

Replying to mlennert:

More info: I can also make the line appear again by simply switching drawing tools..

This does not work for me. Tried drawing polygons and lines both from g.gui.iclass and from vdigit. Thanks.

comment:19 in reply to:  18 ; Changed 5 years ago by annakrat

Replying to madi:

Replying to mlennert:

More info: I can also make the line appear again by simply switching drawing tools..

This does not work for me. Tried drawing polygons and lines both from g.gui.iclass and from vdigit. Thanks.

I don't have this problem, but I am not surprised, because drawing these intermediate lines must be rewritten, I am having problems with that in the new raster digitizer. I would suggest to close this ticket (it's a blocker) and start a new one.

comment:20 in reply to:  19 Changed 5 years ago by madi

Resolution: fixed
Status: newclosed

Replying to annakrat:

Replying to madi:

Replying to mlennert:

More info: I can also make the line appear again by simply switching drawing tools..

This does not work for me. Tried drawing polygons and lines both from g.gui.iclass and from vdigit. Thanks.

I don't have this problem, but I am not surprised, because drawing these intermediate lines must be rewritten, I am having problems with that in the new raster digitizer. I would suggest to close this ticket (it's a blocker) and start a new one.

You are right, I'm closing this ticket, because it seems not to crash anymore after all. Please feel free to reopen if it's the case. Thank you!

comment:21 Changed 3 years ago by neteler

Milestone: 7.1.07.2.0

Milestone renamed

Note: See TracTickets for help on using tickets.