Bug report #4439

Crash when changing style in Layer Properties

Added by Ivan Mincik over 12 years ago. Updated over 12 years ago.

Status:Closed
Priority:Normal
Assignee:Martin Dobias
Category:Symbology
Affected QGIS version: Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:14371

Description

My QGIS is frequently crashing when changing Styles in Layer Properties.
I see many possibly related issues to this one (some of them already closed), but each one in slightly different case. I am not able to write down exact procedure how to reproduce crash.

To reproduce try:
1. Load some vector layer (SHP)
2. Go to Layer Manager -> Styles and classify by 'Unique value'.
3. Try to change styles for some categories. Sometimes double clicking to category name and than changing style helps to reproduce problem.
4. Press Apply or OK button, QGIS will crash.

I am including debug log and backtraces from two of my test cases.

OS: Debian Squeeze, Gnome, 32 bit
Qgis version: 1.7.1 - self compiled Debian package

qgis_crashing_when_changing_styles.txt Magnifier (9.27 KB) Ivan Mincik, 2011-10-24 02:32 PM

qgis_crashing_when_changing_styles2.txt Magnifier (12.1 KB) Ivan Mincik, 2011-10-24 02:32 PM

crash_with_ed20ff368723695a76c03648b7b528b4bf827adb.log Magnifier (22.8 KB) Ivan Mincik, 2011-10-31 07:29 AM

Associated revisions

History

#1 Updated by Mars Sjoden over 12 years ago

Out of curiosity, Are you able to replicate this if you Only open the Properties Window for a selected shapefile, do no changes and simply press OK or APPLY.

I noticed on OS X I don't even need to change any symbology, simply entering the OK or APPLY button for the properties window would, on random occasions, kill QGIS.

#2 Updated by Ivan Mincik over 12 years ago

marsofearth - wrote:

Out of curiosity, Are you able to replicate this if you Only open the Properties Window for a selected shapefile, do no changes and simply press OK or APPLY.

I noticed on OS X I don't even need to change any symbology, simply entering the OK or APPLY button for the properties window would, on random occasions, kill QGIS.

Yes, also in my case it is possible to crash QGIS also by clicking on one of the layer categories and pressing OK or APPLY.
Currently I have found that there is better chance to survive when I just simply change outline style and return it back before any real changes has done.

#3 Updated by Mars Sjoden over 12 years ago

Another test to try that I have found on Mac OS X.6.8 with QGIS 1.7.1-2 William Kyng's build
And after watching hours of Screen Capture video of using (and crashing QGIS) on Debian Squeeze, Ubuntu 11.04, OpenSUSE, and Fedora 15

1. Launch QGIS
2. Load Vector Layer
3. Double Click TOC Layer to Invoke Properties Window - ( VS Right Click to select and invoke Properties Window )
4. do nothing, but click OK or APPLY

Sometimes this would crash QGIS every time other times I would have to do One Further step of ZOOMING or PANNING the map canvas first before step 3.

Of Note. So far I have been unable to crash QGIS if I only Right Click the TOC Layer to select and invoke the Properties Window.

just something to try.

#4 Updated by Giovanni Manghi over 12 years ago

1. Launch QGIS
2. Load Vector Layer
3. Double Click TOC Layer to Invoke Properties Window - ( VS Right Click to select and invoke Properties Window )
4. do nothing, but click OK or APPLY

I tried hard to make qgis-master crash with the above steps, but I wasn't able to to that. I'm on Ubuntu 64bit 11.10

#5 Updated by Ivan Mincik over 12 years ago

Giovanni Manghi wrote:

1. Launch QGIS
2. Load Vector Layer
3. Double Click TOC Layer to Invoke Properties Window - ( VS Right Click to select and invoke Properties Window )
4. do nothing, but click OK or APPLY

I tried hard to make qgis-master crash with the above steps, but I wasn't able to to that. I'm on Ubuntu 64bit 11.10

Hi Giovanni, can You try may steps:
1. Load some vector layer (SHP)
2. Go to Layer Manager -> Styles and classify by 'Unique value'.
3. Try to change styles for some categories. Sometimes double clicking to category name and than changing style helps to reproduce problem.
4. Press Apply or OK button, QGIS will crash.

#6 Updated by Giovanni Manghi over 12 years ago

Hi Ivan, I tried again and again but no crashes. This can be something related to a specific vector?

By the way, when you mean "unique value" are you referring to renderer in the old symbology? If yes, then please try again with the new one, the old is deprecated and will be dropped soon.

Hi Giovanni, can You try may steps:
1. Load some vector layer (SHP)
2. Go to Layer Manager -> Styles and classify by 'Unique value'.
3. Try to change styles for some categories. Sometimes double clicking to category name and than changing style helps to reproduce problem.
4. Press Apply or OK button, QGIS will crash.

#7 Updated by Ivan Mincik over 12 years ago

Giovanni Manghi wrote:

Hi Ivan, I tried again and again but no crashes. This can be something related to a specific vector?

I will try to compile latest trunk and test again.

By the way, when you mean "unique value" are you referring to renderer in the old symbology? If yes, then please try again with the new one, the old is deprecated and will be dropped soon.

Yes, crashing also with new symbology. I have this problem with many of my PostGIS layers.

#8 Updated by Mars Sjoden over 12 years ago

Hello Ivan, if possible to somewhat standardize your debuging of our similar crashing issue, try using the publicly available Natural Earth data

just to rule out data source as an issue..

#9 Updated by Ivan Mincik over 12 years ago

Mars Sjoden wrote:

Hello Ivan, if possible to somewhat standardize your debuging of our similar crashing issue, try using the publicly available Natural Earth data

just to rule out data source as an issue..

I have downloaded '110m-admin-0-countries.zip' and did 'unique value' classification by 'TYPE'. Than after few times reopening 'Layer properties', clicking to some category and pressing OK, QGIS will crash.

#10 Updated by Ivan Mincik over 12 years ago

I have downloaded '110m-admin-0-countries.zip' and did 'unique value' classification by 'TYPE'. Than after few times reopening 'Layer properties', clicking to some category and pressing OK, QGIS will crash.

Also, I am able to crash with 'new symbology' just by changing colors (values 'Categorized' by TYPE)

#11 Updated by Giovanni Manghi over 12 years ago

Also, I am able to crash with 'new symbology' just by changing colors (values 'Categorized' by TYPE)

here seems rock solid. Same datasource, same steps.

#12 Updated by Mars Sjoden over 12 years ago

Ivan, How are you invoking the Properties Window?

By Double Clicking the TOC Layer or
Right Clicking and selecting Properties from the TOC Layer?

Do you notice any difference in stability between the two ways?

#13 Updated by Ivan Mincik over 12 years ago

Mars Sjoden wrote:

Ivan, How are you invoking the Properties Window?

By Double Clicking the TOC Layer or
Right Clicking and selecting Properties from the TOC Layer?

Do you notice any difference in stability between the two ways?

Thanks for pointing this. I did once again many tests by invoking 'Properties' in both ways.
It seems that 'right clicking and selecting Properties from the TOC Layer' is more stable (no crash in my last tests) that 'double clicking the TOC Layer' (crashing many times).

#14 Updated by Martin Dobias over 12 years ago

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

I can replicate the crash when double clicking layer's symbology items in legend.

Should be fixed in ed20ff3

#15 Updated by Ivan Mincik over 12 years ago

Martin Dobias wrote:

I can replicate the crash when double clicking layer's symbology items in legend.

Should be fixed in ed20ff3

Hi Martin,
after applying Your patch (ed20ff3) to release_1_7_1 branch by 'cherry-pick' Qgis is immediately crashing when trying to open some project containing classified layer. Log and bt included.

#16 Updated by Ivan Mincik over 12 years ago

  • Resolution deleted (fixed)

#17 Updated by Martin Dobias over 12 years ago

oops. 50f20c2 should take care of it.

#18 Updated by Martin Dobias over 12 years ago

  • Resolution set to fixed

btw. when deleting resulution "fixed" change also the status, otherwise the bug will stay marked as closed

#19 Updated by Ivan Mincik over 12 years ago

Martin Dobias wrote:

btw. when deleting resulution "fixed" change also the status, otherwise the bug will stay marked as closed

I wanted to do so, but I see this value as read-only text.

Also available in: Atom PDF