Opened 14 years ago

Closed 13 years ago

#2003 closed bug (fixed)

crash when refreshing layer list if this contains unclean vectors

Reported by: pcav Owned by: rugginoso
Priority: critical: causes crash or data corruption Milestone: Version 1.7.0
Component: GRASS Version: Trunk
Keywords: Cc: rblazek, jdenisgiguere
Must Fix for Release: No Platform: Windows
Platform Version: Awaiting user input: no

Description

When reloading the layers lists from the GRASS Browser, QGIS crashes if the list contains an unclean vector: terminate called after throwing an instance of 'QgsGrass::Exception'

what(): Unable to open vector map <fiumi_buf@paolo> on level 2. Try to rebuild vector topology by v.build.

I attach a broken vector, to be copied in the vector folder within the location

Attachments (1)

fiumi_buf.tar.gz (608 bytes ) - added by pcav 14 years ago.
broken GRASS vector

Download all attachments as: .zip

Change History (15)

by pcav, 14 years ago

Attachment: fiumi_buf.tar.gz added

broken GRASS vector

in reply to:  description ; comment:1 by jef, 14 years ago

Replying to pcav:

I attach a broken vector, to be copied in the vector folder within the location

doesn't work for me. Looks like the archive is incomplete - at least I don't see layers in that map.

in reply to:  1 comment:2 by lutra, 14 years ago

Replying to jef:

Replying to pcav:

I attach a broken vector, to be copied in the vector folder within the location

doesn't work for me. Looks like the archive is incomplete - at least I don't see layers in that map.

Hi Jurgen I tested a few minutes ago and it "worked" for me.

comment:3 by pcav, 14 years ago

Correct: the file is broken, thus incomplete. The issue here is that qgis should not crash in case of an unclean vector, but just return an error.

comment:4 by lutra, 14 years ago

Platform: DebianAll

I believe that the cause of this problem has another important consequence:

try import a big vector trough v.in.ogr, at some point, while the module is still working, try have a look to the vectors in the grass browser... qgis will crash.

comment:5 by rblazek, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in r12782

comment:6 by rblazek, 14 years ago

Cc: rblazek added

in reply to:  4 comment:7 by lutra, 14 years ago

Resolution: fixed
Status: closedreopened

Replying to lutra:

I believe that the cause of this problem has another important consequence:

try import a big vector trough v.in.ogr, at some point, while the module is still working, try have a look to the vectors in the grass browser... qgis will crash.

I'm afraid I have to reopen this ticket because refreshing the GRASS browser while a module is producing an output (at least with vectors) causes QGIS to crash on windows platforms, not under linux.

Tested with qgis-dev installed with osgeo4w.

comment:8 by rblazek, 14 years ago

Platform: AllWindows

It only crashes on Windows (works on Linux). I don't see anything wrong in code, it gives correct message "Cannot open vector ... in mapset ... on level 2 ..." and then it crashes. It could be crashing in Vect_close (which is correct), so I disabled Vect_close on win in r13159.

in reply to:  8 comment:9 by lutra, 14 years ago

Replying to rblazek:

It only crashes on Windows (works on Linux). I don't see anything wrong in code, it gives correct message "Cannot open vector ... in mapset ... on level 2 ..." and then it crashes. It could be crashing in Vect_close (which is correct), so I disabled Vect_close on win in r13159.

just tested r13555 and it still crashes... same error message... sorry.

comment:10 by lutra, 14 years ago

Resolution: fixed
Status: reopenedclosed

it does not crash anymore, now it shows a warning like

Cannot open vector fiumi_buf in mapset mapset3003 on level 2 (topology not available, try to rebuild topology using v.build module).

comment:11 by lutra, 14 years ago

Resolution: fixed
Status: closedreopened

sorry for the noise, it still crashes under windows just after showing the warning.

comment:12 by pcav, 14 years ago

Milestone: Version 1.5.0Version 1.6.0

comment:13 by jdenisgiguere, 13 years ago

Cc: jdenisgiguere added

comment:14 by lutra, 13 years ago

Resolution: fixed
Status: reopenedclosed

I don't know what is changed in qgis trunk/osgeo4w in the last week, but a few days ago an unclean vector caused qgis to crash as described, now it throws the warning message

Cannot open vector fiumi_buf in mapset mapset3003 on level 2 (topology not available, try to rebuild topology using v.build module).

and doesn't crash anymore! So stopping a module or refreshing the GRASS browser after a module crashed for its own reasons is safe again

Still crash under qgis 1.6. Tested on Seven 32/64bit.

We still cannot remove any vector or unclean vector as we are stuck here #3646, but it seems really a (win)GRASS problem, not a QGIS one.

Please reopen if necessary.

Note: See TracTickets for help on using tickets.