Bug report #334

Crash printing raster layers

Added by anonymous - over 17 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:Redmine Admin
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 #:10393

Description

.8 Preview 2 crashes when I try to print. Both the Map Composer and the QGIS main window disappear completely.

Both generating an eps file and printing to a printer cause it to crash. Creating an SVG or PNG works fine.

It appears to be a problem only when there are multiple raster layers.

printcrash.qgs - Here's a one-layer project that has the problem. OTF projection is off. QGIS crashes with the layer pre-projected into the other coordinate systems as well. (3.68 KB) Redmine Admin, 2006-11-19 05:19 PM

History

#1 Updated by Gavin Macaulay - over 17 years ago

works for me. can you provide a debugging backtrace?

#2 Updated by Redmine Admin over 17 years ago

How do I do get a backtrace?
I had two .tif image layers, if that helps.

#3 Updated by Redmine Admin over 17 years ago

To get backtrace you need to unset core file limit in shell:
ulimit -c 100000
run qgis and get crash and then run
gdb -c <your_core_file> /path/to/qgis/executable
and type 'bt' in the debuger.

Yes it would be useful if you could place the files on web.

Radim

#4 Updated by Redmine Admin over 17 years ago

I did some more testing, and it can happen with only 1 layer. The layer is a Digital Raster Graphic from [http://www.granit.sr.unh.edu/]. It is .tif, ~20Mb. OTF projection is off, and it happens with two different projections of the layer.
It doesn't happen if the layer is disabled (not visible).
Other raster layers (.jpg) do not have this problem.
I'll try to get a backtrace soon.

#5 Updated by Redmine Admin over 17 years ago

Here's a backtrace for this bug:
#0 0x054c1701 in ?? ()
#3905 0xb76b49c2 in QPaintDevice::~QPaintDevice () from /usr/lib/libQtGui.so.4
#3906 0xb76b4715 in QPaintDevice::~QPaintDevice () from /usr/lib/libQtGui.so.4
#3907 0xb76b6988 in QPaintDevice::~QPaintDevice () from /usr/lib/libQtGui.so.4
#3908 0xb76b08ea in QPaintDevice::~QPaintDevice () from /usr/lib/libQtGui.so.4
#3909 0xb766ecdd in QPainter::drawImage () from /usr/lib/libQtGui.so.4
#3910 0xb7ec7559 in QgsRasterLayer::drawPalettedMultiBandColor ()
from /usr/lib/libqgis_raster.so.0
#3911 0xb7ed2157 in QgsRasterLayer::draw () from /usr/lib/libqgis_raster.so.0
#3912 0xb7eddfc9 in QgsRasterLayer::draw () from /usr/lib/libqgis_raster.so.0
#3913 0xb7e57585 in QgsComposerMap::draw () from /usr/lib/libqgis_composer.so.0
#10 0xb7e5883f in QgsComposerMap::draw () from /usr/lib/libqgis_composer.so.0
#3914 0xb7bf6662 in Q3CanvasItemList::drawUnique ()
from /usr/lib/libQt3Support.so.4
#3915 0xb7bf95fb in Q3Canvas::drawCanvasArea () from /usr/lib/libQt3Support.so.4
#3916 0xb7bf96f8 in Q3Canvas::drawArea () from /usr/lib/libQt3Support.so.4
#3917 0xb7e3e679 in QgsComposer::on_mActionPrint_activated ()
from /usr/lib/libqgis_composer.so.0
#3918 0xb7e7e08d in QgsComposer::qt_metacall ()
from /usr/lib/libqgis_composer.so.0
#3919 0xb7da62bd in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#3920 0xb7da64e9 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#3921 0xb75ad011 in QAction::activated () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#3922 0xb75ada20 in QAction::activate () from /usr/lib/libQtGui.so.4
#3923 0xb784b75a in QToolButton::nextCheckState () from /usr/lib/libQtGui.so.4
#3924 0xb77b3f89 in QButtonGroup::id () from /usr/lib/libQtGui.so.4
#3925 0xb77b41bd in QAbstractButton::mouseReleaseEvent ()
from /usr/lib/libQtGui.so.4
#3926 0xb75f0eec in QWidget::event () from /usr/lib/libQtGui.so.4
#3927 0xb77b45e6 in QAbstractButton::event () from /usr/lib/libQtGui.so.4
#3928 0xb784b504 in QToolButton::event () from /usr/lib/libQtGui.so.4
#3929 0xb75b17c5 in QApplicationPrivate::notify_helper ()
from /usr/lib/libQtGui.so.4
#3930 0xb75b2a5a in QApplication::notify () from /usr/lib/libQtGui.so.4
#3931 0xb7603e7d in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#3932 0xb7603568 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#3933 0xb761484e in non-virtual thunk to QDesktopWidget::~QDesktopWidget() ()
from /usr/lib/libQtGui.so.4
#3934 0xb7d9868a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#3935 0xb7d9889d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#3936 0xb7d9afe7 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#3937 0xb75b1565 in QApplication::exec () from /usr/lib/libQtGui.so.4
#3938 0x0804c488 in main ()

Here was another I got the first time.
#0 0x082b7591 in ?? ()
#3905 0x00000061 in ?? ()
#3906 0xb79b6e2d in typeinfo name for QWidgetPrivate ()
from /usr/lib/libQtGui.so.4
#3907 0x00000010 in ?? ()
#3908 0xb6a49320 in +malloc_initialize_hook () from /lib/tls/i686/cmov/libc.so.6
#3909 0x08745688 in ?? ()
#3910 0x00000000 in ?? ()

#6 Updated by Redmine Admin over 17 years ago

Let's try that again. I forgot to apply the preformatting.

#0  0x054c1701 in ?? ()
#3905  0xb76b49c2 in QPaintDevice::~QPaintDevice () from /usr/lib/libQtGui.so.4
#3906  0xb76b4715 in QPaintDevice::~QPaintDevice () from /usr/lib/libQtGui.so.4
#3907  0xb76b6988 in QPaintDevice::~QPaintDevice () from /usr/lib/libQtGui.so.4
#3908  0xb76b08ea in QPaintDevice::~QPaintDevice () from /usr/lib/libQtGui.so.4
#3909  0xb766ecdd in QPainter::drawImage () from /usr/lib/libQtGui.so.4
#3910  0xb7ec7559 in [[QgsRasterLayer]]::drawPalettedMultiBandColor ()
   from /usr/lib/libqgis_raster.so.0
#3911  0xb7ed2157 in [[QgsRasterLayer]]::draw () from /usr/lib/libqgis_raster.so.0
#3912  0xb7eddfc9 in [[QgsRasterLayer]]::draw () from /usr/lib/libqgis_raster.so.0
#3913  0xb7e57585 in [[QgsComposerMap]]::draw () from /usr/lib/libqgis_composer.so.0
#10 0xb7e5883f in [[QgsComposerMap]]::draw () from /usr/lib/libqgis_composer.so.0
#3914 0xb7bf6662 in Q3CanvasItemList::drawUnique ()
   from /usr/lib/libQt3Support.so.4
#3915 0xb7bf95fb in Q3Canvas::drawCanvasArea () from /usr/lib/libQt3Support.so.4
#3916 0xb7bf96f8 in Q3Canvas::drawArea () from /usr/lib/libQt3Support.so.4
#3917 0xb7e3e679 in [[QgsComposer]]::on_mActionPrint_activated ()
   from /usr/lib/libqgis_composer.so.0
#3918 0xb7e7e08d in [[QgsComposer]]::qt_metacall ()
   from /usr/lib/libqgis_composer.so.0
#3919 0xb7da62bd in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#3920 0xb7da64e9 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#3921 0xb75ad011 in QAction::activated () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#3922 0xb75ada20 in QAction::activate () from /usr/lib/libQtGui.so.4
#3923 0xb784b75a in QToolButton::nextCheckState () from /usr/lib/libQtGui.so.4
#3924 0xb77b3f89 in QButtonGroup::id () from /usr/lib/libQtGui.so.4
#3925 0xb77b41bd in QAbstractButton::mouseReleaseEvent ()
   from /usr/lib/libQtGui.so.4
#3926 0xb75f0eec in QWidget::event () from /usr/lib/libQtGui.so.4
#3927 0xb77b45e6 in QAbstractButton::event () from /usr/lib/libQtGui.so.4
#3928 0xb784b504 in QToolButton::event () from /usr/lib/libQtGui.so.4
#3929 0xb75b17c5 in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#3930 0xb75b2a5a in QApplication::notify () from /usr/lib/libQtGui.so.4
#3931 0xb7603e7d in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#3932 0xb7603568 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#3933 0xb761484e in non-virtual thunk to QDesktopWidget::~QDesktopWidget() ()
   from /usr/lib/libQtGui.so.4
#3934 0xb7d9868a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#3935 0xb7d9889d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#3936 0xb7d9afe7 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#3937 0xb75b1565 in QApplication::exec () from /usr/lib/libQtGui.so.4
#3938 0x0804c488 in main ()

#7 Updated by Martin Dobias over 17 years ago

Thanks for the backtrace. Please could you also specify exactly which raster layer is crashing QGIS and with what projections?

#8 Updated by Redmine Admin over 17 years ago

printcrash.qgs is just a QGIS project file, can you also post
the layer data (drg181.tif and drg181.tfw) or put them somehre
on the Web?

Radim

#10 Updated by Redmine Admin over 17 years ago

Yes, that's the file. The GRANIT site doesn't seem to have a direct link to the file itself, so you probably have go here: [http://www.granit.sr.unh.edu/cgi-bin/load_file?PATH=/data/database/index.html], search for quad 181, and then download the DRG (If you haven't already). Unfortunately, it's too big to for me to put online easily.

#11 Updated by Redmine Admin over 17 years ago

Works for me with drg181.tif + drg181.tfw on Linux with QGIS revision 6189
and Qt 4.2.2. Please test again on Windows with the next QGIS build.

Radim

#12 Updated by Gavin Macaulay - over 17 years ago

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

This ticket was for Linux, and the offending file has loaded fine since a7c00ed9 (SVN r6190) with Qt 4.2.2 in linux versions of qgis, so I'd call it fixed.

#13 Updated by Anonymous over 14 years ago

Milestone Version 0.8 deleted

Also available in: Atom PDF