Ticket #2003 (closed bug: fixed)

Opened 4 years ago

Last modified 2 years ago

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
Platform Version: Platform: Windows
Must Fix for Release: No 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

fiumi_buf.tar.gz Download (0.6 KB) - added by pcav 4 years ago.
broken GRASS vector

Change History

Changed 4 years ago by pcav

broken GRASS vector

in reply to: ↑ description ; follow-up: ↓ 2   Changed 3 years ago by 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.

in reply to: ↑ 1   Changed 3 years ago by lutra

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.

  Changed 3 years ago by pcav

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.

follow-up: ↓ 7   Changed 3 years ago by lutra

  • platform changed from Debian to All

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.

  Changed 3 years ago by rblazek

  • status changed from new to closed
  • resolution set to fixed

Fixed in r12782

  Changed 3 years ago by rblazek

  • cc rblazek added

in reply to: ↑ 4   Changed 3 years ago by lutra

  • status changed from closed to reopened
  • resolution fixed deleted

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.

follow-up: ↓ 9   Changed 3 years ago by rblazek

  • platform changed from All to Windows

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   Changed 3 years ago by lutra

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.

  Changed 3 years ago by lutra

  • status changed from reopened to closed
  • resolution set to fixed

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

  Changed 3 years ago by lutra

  • status changed from closed to reopened
  • resolution fixed deleted

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

  Changed 3 years ago by pcav

  • milestone changed from Version 1.5.0 to Version 1.6.0

  Changed 2 years ago by jdenisgiguere

  • cc jdenisgiguere added

  Changed 2 years ago by lutra

  • status changed from reopened to closed
  • resolution set to fixed

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.