Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1479 closed bug (fixed)

map composer: adding scalebar when view is added crashes qgis

Reported by: alicebtoklas Owned by: nobody
Priority: critical: causes crash or data corruption Milestone:
Component: Printing Version: 1.0.0
Keywords: Cc: mlennert
Must Fix for Release: Yes Platform: Debian
Platform Version: Awaiting user input: no

Description

In the map composer, when the map is already added, adding the scalebar crashes QGIS. The following error message is given:

Fatal: ASSERT failure in QList<T>::at: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 391
Abandon

Adding the scalebar first and then the map works, but then QGIS also crashes when trying to modify the scalebar.

(on ubuntu 8.04)

Attachments (1)

mapcomposer_scalebar_bug_backtrace.gz (1.9 KB ) - added by mlennert 15 years ago.
backtrace of crash in gdb

Download all attachments as: .zip

Change History (21)

comment:1 by leolami, 15 years ago

Also on Debian

comment:2 by mhugent, 15 years ago

Component: Build/InstallPrinting

comment:3 by mhugent, 15 years ago

I cannot reproduce this crash on my kubuntu 8.10 system, both with 1.0 branch and head. Is it possible that you attach a small example dataset and a little step-by-step tutorial to get the crash?

thanks, Marco

comment:4 by mlennert, 15 years ago

Cc: mlennert added

comment:5 by alicebtoklas, 15 years ago

Step-by-step:

using a shape of the administrative boundaries of Belgium (you can download it on http://biogeo.berkeley.edu/bgm/gdata.php)

launch qgis

add a vector layer: for example BEL0.shp

open the map composer doing file/print

in the map composer, do "add a new map" and draw the map on the canvas

then "add scalebar"; QGIS crashes when I click on the canvas to draw the scalebar

you see?

comment:6 by pcav, 15 years ago

Milestone: Version 1.0.1

comment:7 by cfarmer, 15 years ago

Resolution: worksforme
Status: newclosed

Tested following the steps outlined above. I am unable to reproduce using Ubuntu 8.10.

-carson

in reply to:  7 comment:8 by mlennert, 15 years ago

Resolution: worksforme
Status: closedreopened

Replying to cfarmer:

Tested following the steps outlined above. I am unable to reproduce using Ubuntu 8.10.

-carson

I find this a bit quick. The bug can be reproduced both by myself and apparently leolami on Debian (Lenny for my part, deb packages just installed from the gfoss repository) and by the OP on Ubuntu 8.04. It was reported on both the Italian GFOSS list [1] and on the qgis-developers list [2]. I don't think that you can just ask everyone to move to Ubuntu 8.10 and close the bug. It would seem more appropriate to identify the problem.

Maybe it is an issue with different versions of qt ? Did you compile yourself, or use the launchpad package ?

I just tried with an svn checkout of the 1.0.0 branch and I still get the same error.

Moritz

[1] http://www.nabble.com/problema-con-compositore-di-mappe-in-Qgis-td21255539.html [2] http://n2.nabble.com/QGIS-1.0:-bug-in-map-composer-td2137920.html

comment:9 by cfarmer, 15 years ago

I'm terribly sorry Moritz, I didn't realise that setting the ticket to worksforme, closed the ticket (though in hindsight this appears to be quite obvious).

In my case, I compiled QGIS myself (svn trunk and 1.0.0 branch), and I'm running Qt 4.4.3.

Apologies for the confusion, hopefully we can find a solution here ;-)

-carson

in reply to:  9 comment:10 by mlennert, 15 years ago

Must Fix for Release: NoYes

Replying to cfarmer:

I'm terribly sorry Moritz, I didn't realise that setting the ticket to worksforme, closed the ticket (though in hindsight this appears to be quite obvious).

No offense taken ;-)

In my case, I compiled QGIS myself (svn trunk and 1.0.0 branch), and I'm running Qt 4.4.3.

Well, I've tried the gfoss packages, compiling via dpkg-buildpackage and via cmake+make and all three give the same result, also running Qt 4.4.3...

Checking with ldd on qgis and the different libgis components, my non-expert eyes don't see anything obvious.

I'll try the stable dev branch and trunk to see if there's any difference.

Apologies for the confusion, hopefully we can find a solution here ;-)

I hope so, too. Apart this bug report and one mention of the issue on the dev list [1] without any response, this just doesn't seem to be an issue for most people...

One thing we could try is to identify the relevant differences between Ubuntu 8.04 and 8.10, but I'm not sure what elements to look at. Are there no qgis devs listening that could help us here ?

Moritz

[1] http://lists.osgeo.org/pipermail/qgis-developer/2009-January/005620.html

comment:11 by mhugent, 15 years ago

Moritz

I cannot reproduce this problem on any of the systems I have access to (which of course does not mean it does not exist). To help trace down the problem, you could paste a debugger backtrace. Just run gdb with qgis: run 'gdb qgis' in a terminal and after the crash, type 'backtrace' and paste the output here.

If you have a qgis compiled with debugging output enabled, the output will be even better, containing line numbers of the relevant source files.

Marco

in reply to:  11 ; comment:12 by mlennert, 15 years ago

Replying to mhugent:

I cannot reproduce this problem on any of the systems I have access to (which of course does not mean it does not exist).

I've been able to reproduce it with 1.0.0 release and with 1.0 dev-branch, but not with trunk, so something seems to have changed between the two...if someone could just give me a hint as to where to look in the code (i.e. where is the print dialog and process), this would help me avoid having to search for it (I'm not familiar at all with the qgis code).

To help trace down the problem, you could paste a debugger backtrace. Just run gdb with qgis: run 'gdb qgis' in a terminal and after the crash, type 'backtrace' and paste the output here.

If you have a qgis compiled with debugging output enabled, the output will be even better, containing line numbers of the relevant source files.

Ok, I'll try this as well, but the fact that it works in trunk is already a hint. I hope it's just something that needs to be backported.

Moritz

in reply to:  12 comment:13 by mlennert, 15 years ago

Replying to mlennert:

Replying to mhugent:

To help trace down the problem, you could paste a debugger backtrace. Just run gdb with qgis: run 'gdb qgis' in a terminal and after the crash, type 'backtrace' and paste the output here.

If you have a qgis compiled with debugging output enabled, the output will be even better, containing line numbers of the relevant source files.

Ok, I'll try this as well, but the fact that it works in trunk is already a hint. I hope it's just something that needs to be backported.

Ok, here's the debug message:

Debug: /home/mlennert/SRC/QGIS/Version-1_0/src/core/composer/qgscomposeritem.cpp: 84: (setSelected) entered. Fatal: ASSERT failure in QList<T>::at: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 387

And I'll attach the backtrace of gdb.

Moritz

by mlennert, 15 years ago

backtrace of crash in gdb

comment:14 by mlennert, 15 years ago

bump...

Could anyone knowledgable in these things have a look at the gdb output ? And can anyone else reproduce this bug ?

For us it's somewhat of a showstopper because teaching students how to make good maps is a bit difficult when they can't even add a scalebar... ;-) (Our current best solution seems to be to use the QuickPrint plugin and to import the resulting pdf into inkscape for editing...not ideal, but at least we can stick with QGIS.)

Moritz

comment:15 by alicebtoklas, 15 years ago

I could reproduce it both on Windows 2000 and Mac OSX (10.5.5)
Alice

comment:16 by mhugent, 15 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in 1.0 branch. Thanks for pasting the backtrace. The problem was visible only in connection with some translation. That's why I did not notice it on the systems where I had access to.

Marco

comment:17 by pcav, 15 years ago

Resolution: fixed
Status: closedreopened

The problem seems still there:

Warning: Object::disconnect: Unexpected null parameter Fatal: ASSERT failure in QList<T>::at: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 387

1.0.1 from debina.gfoss.it

comment:18 by alicebtoklas, 15 years ago

Note that you can avoid the problem by working with the english version: in the QGIS options, "locale" tab ("paramètres du lieu" in french), tick the box "override system locale" ("forcer la nationalité du système" in french) and choose english(US), then restart QGIS.

in reply to:  17 comment:19 by mlennert, 15 years ago

Resolution: fixed
Status: reopenedclosed

Replying to pcav:

The problem seems still there:

Warning: Object::disconnect: Unexpected null parameter Fatal: ASSERT failure in QList<T>::at: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 387

1.0.1 from debina.gfoss.it

The fix dates after the release of 1.0.1, so you have to wait until 1.0.2 comes out. In the meantime, just follow the advice of alicebtoklas.

Moritz

comment:20 by (none), 15 years ago

Milestone: Version 1.0.2

Milestone Version 1.0.2 deleted

Note: See TracTickets for help on using tickets.