Bug report #6182

Crash when printing without "print to raster", with a transparent raster layer

Added by Alister Hood about 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:-
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data:Yes Copied to github as #:15496

Description

With current master on Windows (at least - I haven't tested other platforms yet), QGIS crashes when I try to print with "print to raster" unchecked, if my map includes a raster layer with transparency >0%.

transparency_issue.zip (4.27 MB) Alister Hood, 2012-10-08 01:12 AM

History

#1 Updated by Alister Hood about 7 years ago

I don't see anything useful in DebugView or the msys terminal if I start QGIS from that. This is the error signature provided by the Windows crash dialogue:

AppName: qgis.exe     AppVer: 0.0.0.0     ModName: qtgui4.dll
ModVer: 4.7.1.0     Offset: 000d3431

#2 Updated by Giovanni Manghi about 7 years ago

  • Status changed from Open to Feedback

if it is a regression please tag this as "blocker".

#3 Updated by Alister Hood about 7 years ago

  • Priority changed from Normal to Severe/Regression

Yes, sorry, it is a regression, although I'm not sure if it has regressed since 1.8 or 1.7 or what.

Note: I'm not able to change the status from "Feedback" to anything except "Closed".

#4 Updated by Giovanni Manghi about 7 years ago

  • Status changed from Feedback to Open
  • Target version set to Version 2.0.0
  • Crashes QGIS or corrupts data changed from No to Yes

Alister Hood wrote:

Yes, sorry, it is a regression, although I'm not sure if it has regressed since 1.8 or 1.7 or what.

it doesn't matter, any previously unknown regression is as blocker issue.

Note: I'm not able to change the status from "Feedback" to anything except "Closed".

I'll fix it.

#5 Updated by Alister Hood about 7 years ago

Here's a backtrace from linux in case it is helpful:

Program received signal SIGSEGV, Segmentation fault.
0xb46cee16 in ?? () from /usr/lib/libQtGui.so.4
(gdb) bt
#0  0xb46cee16 in ?? () from /usr/lib/libQtGui.so.4
#1  0xb46c9349 in ?? () from /usr/lib/libQtGui.so.4
#2  0xb47a6517 in ?? () from /usr/lib/libQtGui.so.4
#3  0xb4729ffc in QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>) () from /usr/lib/libQtGui.so.4
#4  0xb469867d in QPicture::exec(QPainter*, QDataStream&, int) ()
   from /usr/lib/libQtGui.so.4
#5  0xb469a466 in QPicture::play(QPainter*) () from /usr/lib/libQtGui.so.4
#6  0xb47237e5 in QPainter::drawPicture(QPointF const&, QPicture const&) ()
   from /usr/lib/libQtGui.so.4
#7  0xb47108d4 in ?? () from /usr/lib/libQtGui.so.4
#8  0xb4711b76 in ?? () from /usr/lib/libQtGui.so.4
#9  0xb4711f88 in ?? () from /usr/lib/libQtGui.so.4
#10 0xb476474a in ?? () from /usr/lib/libQtGui.so.4
#11 0xb47216d0 in QPainter::end() () from /usr/lib/libQtGui.so.4
#12 0xb47218a8 in QPainter::~QPainter() () from /usr/lib/libQtGui.so.4
#13 0xb5ba4634 in QgsComposition::print(QPrinter&) ()
   from /usr/lib/libqgis_core.so.1.9.0
#14 0x08305ec8 in QgsComposer::on_mActionPrint_triggered() ()
#15 0x083b7fed in QgsComposer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) [clone .part.2] ()
#16 0x083b81cb in QgsComposer::qt_metacall(QMetaObject::Call, int, void**) ()
#17 0xb50c2655 in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**---Type <return> to continue, or q <return> to quit---
) () from /usr/lib/libQtCore.so.4
#18 0xb50d3e92 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#19 0xb45aff2d in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#20 0xb45b01cc in QAction::activate(QAction::ActionEvent) ()
   from /usr/lib/libQtGui.so.4
#21 0xb4a5c585 in ?? () from /usr/lib/libQtGui.so.4
#22 0xb4a63696 in ?? () from /usr/lib/libQtGui.so.4
#23 0xb4a645e5 in QMenu::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib/libQtGui.so.4
#24 0xb461009f in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#25 0xb4a64aec in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4
#26 0xb45b6f6c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#27 0xb45bc462 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#28 0xb5a321e1 in QgsApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libqgis_core.so.1.9.0
#29 0xb50bb9fe in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/libQtCore.so.4
#30 0xb45b7dd4 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
   from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#31 0xb4640132 in ?? () from /usr/lib/libQtGui.so.4
#32 0xb463ef63 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/libQtGui.so.4
#33 0xb4668504 in ?? () from /usr/lib/libQtGui.so.4
#34 0xb3c1c733 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#35 0xb3c1cad0 in ?? () from /usr/lib/libglib-2.0.so.0
#36 0xb3c1cbb1 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#37 0xb50ed821 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#38 0xb46680ea in ?? () from /usr/lib/libQtGui.so.4
#39 0xb50ba4dc in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#40 0xb50ba7d1 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQtCore.so.4
#41 0xb50bfa6a in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#42 0xb45b4dd4 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#43 0x080ff571 in main ()

#6 Updated by Marco Hugentobler about 7 years ago

  • Status changed from Open to Feedback

Just did a quick test with master branch on Linux, and I can print a semitransparent raster to pdf without problem. To which format did you print when you had the crash?

#7 Updated by Alister Hood about 7 years ago

What do you mean by "format"?
I tried printing to printers, both virtual pdf printers and real printers. In linux I use the latest version of CUPS, so I guess it sends the job as PDF rather than PS. But in Windows it would be PS, wouldn't it?
Also, when I tried the "print to file" feature which is built into the print system, it crashed on Windows, but I think it was OK on Linux.

#8 Updated by Alister Hood about 7 years ago

I presume you did test as I described:

with "print to raster" unchecked

#9 Updated by Giovanni Manghi almost 7 years ago

No crash here either. Can you share a sample project that does not work for you?

#10 Updated by Alister Hood almost 7 years ago

I think the behaviour may have changed slightly in latest master. With qgis-dev from OSGEO4W (048a07a), the attached project crashes if I try to print.
If I remove the vector layer from the project, there is no crash, but the printout is blank.
If I don't remove the vector layer, but change the transparency of the rasters to zero, then there is no crash and the printout is not blank... but it has a large number of pages (I guess something to do with the Atlas integration).

#11 Updated by Alister Hood almost 7 years ago

Oh - the file was too big to upload. Try this.

#12 Updated by Alister Hood almost 7 years ago

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

Seems to be fixed in current master

Also available in: Atom PDF