Bug report #1479

map composer: adding scalebar when view is added crashes qgis

Added by alicebtoklas - over 15 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:-
Affected QGIS version: Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11539

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)

mapcomposer_scalebar_bug_backtrace.gz - backtrace of crash in gdb (1.9 KB) mlennert -, 2009-02-08 03:29 AM

History

#1 Updated by leolami - over 15 years ago

Also on Debian

#2 Updated by Marco Hugentobler over 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

#3 Updated by alicebtoklas - over 15 years ago

Step-by-step:

using a shape of the administrative boundaries of Belgium (you can download it on launch qgis[[BR)
]

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?

#4 Updated by cfarmer - about 15 years ago

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

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

-carson

#5 Updated by mlennert - about 15 years ago

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

Replying to [comment:7 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 r1 and on the qgis-developers list r2. 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

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

#6 Updated by cfarmer - about 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

#7 Updated by mlennert - about 15 years ago

Replying to [comment:9 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 r1 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

r1 http://lists.osgeo.org/pipermail/qgis-developer/2009-January/005620.html

#8 Updated by Marco Hugentobler about 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

#9 Updated by mlennert - about 15 years ago

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

#10 Updated by mlennert - about 15 years ago

Replying to [comment:12 mlennert]:

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

#11 Updated by mlennert - about 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

#12 Updated by alicebtoklas - about 15 years ago

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

Alice

#13 Updated by Marco Hugentobler about 15 years ago

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

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

#14 Updated by Paolo Cavallini about 15 years ago

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

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

#15 Updated by alicebtoklas - about 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.

#16 Updated by mlennert - about 15 years ago

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

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

#17 Updated by Anonymous over 14 years ago

Milestone Version 1.0.2 deleted

Also available in: Atom PDF