Bug report #2339

QGis crashes when moving border between map canvas and overview map and "use render caching..." enabled

Added by kivih1 - almost 15 years ago. Updated almost 14 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Map Canvas
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:duplicate
Crashes QGIS or corrupts data: Copied to github as #:12399

Description

when there are layers in the project and one or more layers is visible, and the Overview map is visible and docked (left or right), QGis crashes when trying to move the border between the canvas and the overview map. It is not necessary to have layers associated with the overview map for the program to crash.

5c5e_appcompat.txt Magnifier - Additional information added to the error report (9.77 KB) kivih1 -, 2010-01-05 12:31 PM

error_signature.jpg - error signature (10.2 KB) kivih1 -, 2010-01-05 12:33 PM

Exception_information1.jpg - Exception information (228 KB) kivih1 -, 2010-01-05 12:41 PM

qgis_ticket_2339_bt - Debug messages and Backtrace (29.6 KB) Giuseppe Sucameli, 2011-01-13 04:05 PM

History

#1 Updated by Jürgen Fischer almost 15 years ago

no reproducable with 8545ed7e (SVN r12664) here.

#2 Updated by Giovanni Manghi almost 15 years ago

Tested under linux and windows, both with qgis 1.4 and trunk, overview window docked on both sides. Not reproducable here.

#3 Updated by kivih1 - almost 15 years ago

this is strange: I can't reproduce it on my computer at work, but it's still there on my private computer (which is only 3 months old). Maybe it has to do with the graphica card? Anyway, the very same project loaded in Qgis 1.3 behaves OK, whereas it crashes in 1.4.
I will do some more experimentation in the coming weeks, and will report when I have any news.

Hubert

#4 Updated by Giovanni Manghi almost 15 years ago

Hi,
it would be great to see what the console returns when qgis crashes. Do you have any linux installation in your pc?

#5 Updated by kivih1 - almost 15 years ago

Lutra,

I don't have Linux on my PC. This is what info I get from Windows after the crash:

Error signature: see jpg in the appendix
Exception information (the first part of it, too large to show all): see jpg
Additional information added to the error report: see txt

It all makes no sense to me but I hope it does so to you!

Hubert

#6 Updated by Giovanni Manghi almost 15 years ago

Still not able to replicate this on both windows (xp) and linux. Can you replicate the problem on more than one machine, in order to rule out local configuration problems?

#7 Updated by kivih1 - almost 15 years ago

I found out that Qgis only crashes when Actions->Options->Use cache when rendering is turned ON. When OFF no problems.

Hubert

#8 Updated by Giovanni Manghi almost 15 years ago

Ok, this is confirmed also under linux.

Terminal says

"Warning: QPaintDevice: Cannot destroy paint device that is being painted
Segmentation fault" 

#9 Updated by Jürgen Fischer over 14 years ago

might be related to #2714.

#10 Updated by Giovanni Manghi over 14 years ago

Replying to [comment:11 jef]:

might be related to #2714.

if the workaround for #2714 has fixed it then it does not work for this bug. It is pretty easy to reproduce on trunk but I also found vectors that do not cause qgis to crash.

#11 Updated by Alister Hood over 14 years ago

Replying to [comment:12 lutra]:

Replying to [comment:11 jef]:

might be related to #2714.

if the workaround for #2714 has fixed it then it does not work for this bug. It is pretty easy to reproduce on trunk but I also found vectors that do not cause qgis to crash.

I've just installed 1.5 and am unable to reproduce. N.B. that for me 1.4 only crashed sometimes - not every time I moved the border.

#12 Updated by Giuseppe Sucameli over 14 years ago

Unable to reproduce it using QGis trunk (0d74e285 (SVN r13959)) on Ubuntu 9.04

#13 Updated by Giovanni Manghi over 14 years ago

Replying to [comment:15 brushtyler]:

Unable to reproduce it using QGis trunk (0d74e285 (SVN r13959)) on Ubuntu 9.04

Hi Giuseppe,

it is not replicable with all vectors. I also found vectors that do not cause the crash.

#14 Updated by Giuseppe Sucameli over 14 years ago

Replying to [comment:16 lutra]:

Replying to [comment:15 brushtyler]:

Unable to reproduce it using QGis trunk (0d74e285 (SVN r13959)) on Ubuntu 9.04

Hi Giuseppe,

it is not replicable with all vectors. I also found vectors that do not cause the crash.

I tried more than one vector but nothing.

Could you attach a vector file which may cause the crash?

#15 Updated by Giovanni Manghi over 14 years ago

With this

http://www.iambiente.pt/atlas/dl/regista_dl.jsp?zona=continente&grupo=&tema=c_curvasnivel

for me is instant crash even with "Use cache when rendering" OFF.

I'm using qgis 1.5 under Ubuntu 10.04

gio@sibirica:~$ qgis
Python support ENABLED :-) 
Loaded : [[GdalTools]] (package: [[GdalTools]])
Warning: QHttp: empty path requested is invalid -- using '/'
Loaded : Plugin Installer (package: plugin_installer)
Loaded : fTools (package: fTools)
Loaded : [[OpenStreetMap]] plugin (package: osm)
Loaded : [[MapServer]] Export (package: mapserver_export)
gio@sibirica:~$ qgis
Python support ENABLED :-) 
Loaded : [[GdalTools]] (package: [[GdalTools]])
Warning: QHttp: empty path requested is invalid -- using '/'
Loaded : Plugin Installer (package: plugin_installer)
Loaded : fTools (package: fTools)
Loaded : [[OpenStreetMap]] plugin (package: osm)
Loaded : [[MapServer]] Export (package: mapserver_export)
Warning: QPixmap::operator=: Cannot assign to pixmap during painting
Warning: QPainter::begin: A paint device can only be painted by one painter at a time.
Warning: QPainter::end: Painter not active, aborted
Warning: QPixmap::operator=: Cannot assign to pixmap during painting
Warning: QPainter::begin: A paint device can only be painted by one painter at a time.
Warning: QPainter::end: Painter not active, aborted
Warning: QPixmap::operator=: Cannot assign to pixmap during painting
Warning: QPainter::begin: A paint device can only be painted by one painter at a time.
Warning: QPainter::end: Painter not active, aborted
Warning: QPixmap::operator=: Cannot assign to pixmap during painting
Warning: QPainter::begin: A paint device can only be painted by one painter at a time.
Warning: QPainter::end: Painter not active, aborted
Warning: QPixmap::operator=: Cannot assign to pixmap during painting
Warning: QPainter::begin: A paint device can only be painted by one painter at a time.
Warning: QPainter::end: Painter not active, aborted
Segmentation fault

#16 Updated by Giuseppe Sucameli over 14 years ago

Ok, now I'm able to reproduce it too (QGis trunk 0d74e285 (SVN r13959) on Ubuntu 9.04)

#17 Updated by Giuseppe Sucameli over 14 years ago

Replying to [comment:18 lutra]:

With this

http://www.iambiente.pt/atlas/dl/regista_dl.jsp?zona=continente&grupo=&tema=c_curvasnivel

for me is instant crash even with "Use cache when rendering" OFF.

For me only if the cache render is enabled.

Before crash, the terminal displays this message:

"Warning: QPaintDevice: Cannot destroy paint device that is being painted
Segmentation fault" 

This message is displayed from

/home/brushtyler/Projects/Work/Faunalia/qgis/qgis_unstable/src/core/qgsmaplayer.cpp: 848

delete mpCacheImage;

So I think that when the render is disabled the crash is related to a different issue.

#18 Updated by Paolo Cavallini about 14 years ago

Might be due to Qt? Could you please try again with current trunk, and report which Qt version you use?

#19 Updated by Giovanni Manghi about 14 years ago

tested again with trunk, on ubuntu 10.04 and 10.10 (different libqt4 versions), render caching on and off and it is always instant crash.

#20 Updated by Giuseppe Sucameli almost 14 years ago

Replying to [comment:23 lutra]:

tested again with trunk, on ubuntu 10.04 and 10.10 (different libqt4 versions), render caching on and off and it is always instant crash.

I made further tests. I found that segfault is dued to the processEvent() calls in QgsVectorLayer (!QgsVectorLayer.cpp:1045).

Searching for similar Qt bugs, I found #2714 (maybe the same bug??), and also Martin wrote the problem is caused by processEvent(). The crash happens in Qt libraries.

I discovered another piece, it's caused by an invalid extra-call. If I add debug messages both before (!QgsVectorLayer.cpp:1039) and after (!QgsVectorLayer.cpp:1055) the qapp->processEvent() call I notice that there are N pre-call messages and N+1 post-call messages.

#21 Updated by Giuseppe Sucameli almost 14 years ago

Replying to [comment:24 brushtyler]:

I discovered another piece, it's caused by an invalid extra-call. If I add debug messages both before (!QgsVectorLayer.cpp:1039) and after (!QgsVectorLayer.cpp:1055) the qapp->processEvent() call I notice that there are N pre-call messages and N+1 post-call messages.

Found, no extra-call (would be very strange!), but it's a race condition, see the attachment.

#22 Updated by Giuseppe Sucameli almost 14 years ago

Look at the attachment qgis_ticket_2339_bt:

at line 95 you can see the missing "before qApp->processEvents()"

and after a refreshing of the layer

at line 189 there's the related "after qApp->processEvents()"

#23 Updated by Jürgen Fischer almost 14 years ago

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

duplicate of #2714.

Also available in: Atom PDF