Bug report #2003

crash when refreshing layer list if this contains unclean vectors

Added by Paolo Cavallini about 15 years ago. Updated over 13 years ago.

Status:Closed
Priority:Low
Assignee:Lorenzo Masini
Category:GRASS
Affected QGIS version: Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:12063

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

fiumi_buf.tar.gz - broken GRASS vector (608 Bytes) Paolo Cavallini, 2009-10-12 09:58 AM

History

#1 Updated by Jürgen Fischer almost 15 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.

#2 Updated by Giovanni Manghi almost 15 years ago

Replying to [comment:1 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.

#3 Updated by Paolo Cavallini almost 15 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.

#4 Updated by Giovanni Manghi almost 15 years ago

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.

#5 Updated by Redmine Admin almost 15 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Fixed in 88fafe41 (SVN r12783)

#6 Updated by Giovanni Manghi over 14 years ago

  • Resolution deleted (fixed)
  • Status changed from Closed to Feedback

Replying to [comment:4 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.

#7 Updated by Redmine Admin over 14 years ago

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 67d41d02 (SVN r13160).

#8 Updated by Giovanni Manghi over 14 years ago

Replying to [comment:8 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 67d41d02 (SVN r13160).

just tested 2923dd3d (SVN r13556) and it still crashes... same error message... sorry.

#9 Updated by Giovanni Manghi over 14 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

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).

#10 Updated by Giovanni Manghi over 14 years ago

  • Status changed from Closed to Feedback
  • Resolution deleted (fixed)

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

#11 Updated by Giovanni Manghi over 13 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

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.

Also available in: Atom PDF