Opened 17 years ago

Closed 16 years ago

Last modified 15 years ago

#604 closed bug (fixed)

Setting any band to "Not set" on a multi-band raster crashes qgis

Reported by: gsherman Owned by: ersts
Priority: critical: causes crash or data corruption Milestone:
Component: Rasters Version: 0.8.1
Keywords: Cc:
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

Description (last modified by gsherman)

The summary says it all. Set any band to not set and click Apply or Ok. QGIS crashes.

This also happens in 0.9 and the raster transparency branch.

Attachments (1)

merge2.tif (71.7 KB ) - added by tutey@… 17 years ago.
examlpe 3-band GeoTIFF which crashes QGIS 0.8.1

Download all attachments as: .zip

Change History (7)

comment:1 by gsherman, 17 years ago

Description: modified (diff)

comment:2 by timlinux, 17 years ago

Milestone: Version 0.8.1Version 0.8.2

Moved to milestone 0.8.2 since we wont be fixing any further issues before the 0.8.1 release

comment:3 by tutey@…, 17 years ago

Awaiting user input: unset
Component: Build/InstallRasters
Type: defectbug
Version: 0.80.8.1

I confirm this bug with 0.8.1 SVN 6800. Please find a smallish example 3-band GeoTIFF attached. No chances the bug will be fixed for 0.8.1?

  1. qgis merge2.tif
  1. double click the layer
  1. Symbology->Red->Not Set->OK

Crash. Setting any other band to Not Set crahes QGIS as well. The backtrace is below. merge2.tif is attached.

Program received signal SIGABRT, Aborted.
[Switching to Thread -1242188096 (LWP 11352)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb650f9a1 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb65112b9 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0x0804aa04 in myMessageOutput ()
#4  0xb7d5299c in qt_message_output (msgType=QtFatalMsg,
    buf=0x6 <Address 0x6 out of bounds>) at global/qglobal.cpp:1982
#5  0xb7d52ac1 in qFatal (
    msg=0xb7e3beb0 "ASSERT failure in %s: \"%s\", file %s, line %d")
    at global/qglobal.cpp:2227
#6  0xb7d52aff in qt_assert_x (where=0xb7f84ade "QVector<T>::operator[]",
    what=0xb7f84967 "index out of range",
    file=0xb7f85a58 "/usr/local/qt4/include/QtCore/qvector.h", line=290)
    at global/qglobal.cpp:1779
#7  0xb7f64015 in QgsRasterLayer::getRasterBandNumber ()
   from /usr/local/qgis08/lib/libqgis_raster.so.1
#8  0xb7f70a60 in QgsRasterLayer::drawMultiBandColor ()
   from /usr/local/qgis08/lib/libqgis_raster.so.1
#9  0xb7f781ac in QgsRasterLayer::draw ()
   from /usr/local/qgis08/lib/libqgis_raster.so.1
#10 0xb7f7b258 in QgsRasterLayer::drawThumbnail ()
   from /usr/local/qgis08/lib/libqgis_raster.so.1
#11 0xb68e3e95 in QgsRasterLayerProperties::apply ()
   from /usr/local/qgis08/lib/libqgis_gui.so.1
#12 0xb68e4b0c in QgsRasterLayerProperties::accept ()
   from /usr/local/qgis08/lib/libqgis_gui.so.1
#13 0xb697c015 in QgsRasterLayerProperties::qt_metacall ()
   from /usr/local/qgis08/lib/libqgis_gui.so.1
#14 0xb7e1a3fc in QMetaObject::activate (sender=0x83a9da8,
    from_signal_index=29, to_signal_index=30, argv=0x0)
    at kernel/qobject.cpp:2940
#15 0xb7e1a856 in QMetaObject::activate (sender=0x83a9da8, m=0xb7a0c4f0,
    from_local_signal_index=2, to_local_signal_index=3, argv=0xbfca262c)
    at kernel/qobject.cpp:2992
#16 0xb78b46ae in QAbstractButton::clicked (this=0x83a9da8, _t1=false)
    at .moc/release-shared/moc_qabstractbutton.cpp:180
#17 0xb76d258e in QAbstractButtonPrivate::emitClicked (this=0x83a9de0)
    at widgets/qabstractbutton.cpp:517
#18 0xb76d3896 in QAbstractButtonPrivate::click (this=0x83a9de0)
    at widgets/qabstractbutton.cpp:510
#19 0xb76d3acf in QAbstractButton::mouseReleaseEvent (this=0x83a9da8,
    e=0xbfca2b5c) at widgets/qabstractbutton.cpp:1076
#20 0xb7483ec6 in QWidget::event (this=0x83a9da8, event=0xbfca2b5c)
    at kernel/qwidget.cpp:5698
#21 0xb76d2944 in QAbstractButton::event (this=0x83a9da8, e=0xbfca2b5c)
    at widgets/qabstractbutton.cpp:1038
#22 0xb774d700 in QPushButton::event (this=0x83a9da8, e=0xbfca2b5c)
    at widgets/qpushbutton.cpp:582
#23 0xb743c782 in QApplicationPrivate::notify_helper (this=0x807c180,
    receiver=0x83a9da8, e=0xbfca2b5c) at kernel/qapplication.cpp:3434
#24 0xb743fecc in QApplication::notify (this=0xbfca3ebc, receiver=0x83a9da8,
    e=0xbfca2b5c) at kernel/qapplication.cpp:3133
#25 0xb7499bcf in QETWidget::translateMouseEvent (this=0x83a9da8,
    event=0xbfca2e5c) at qcoreapplication.h:186
#26 0xb74994c2 in QApplication::x11ProcessEvent (this=0xbfca3ebc,
    event=0xbfca2e5c) at kernel/qapplication_x11.cpp:2764
#27 0xb74bce72 in x11EventSourceDispatch (s=0x807dc00, callback=0,
    user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:122
#28 0xb64728d6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0xb6475996 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#30 0xb6475e1e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#31 0xb7e2d4ba in QEventDispatcherGlib::processEvents (this=0x807c0d0,
    flags=@0xbfca3068) at kernel/qeventdispatcher_glib.cpp:363
#32 0xb74bcb9b in QGuiEventDispatcherGlib::processEvents (this=0x807c0d0,
    flags=@0x2c58) at kernel/qguieventdispatcher_glib.cpp:178
#33 0xb7e080bd in QEventLoop::processEvents (this=0x0, flags=@0x0)
    at kernel/qeventloop.cpp:126
#34 0xb7e08238 in QEventLoop::exec (this=0xbfca3110, flags=@0xbfca3118)
    at kernel/qeventloop.cpp:172
#35 0xb77b6481 in QDialog::exec (this=0x8319d80) at dialogs/qdialog.cpp:393
#36 0xb7f2d3b5 in QgsLegend::mouseDoubleClickEvent ()
   from /usr/local/qgis08/lib/libqgis_legend.so.1
#37 0xb7483f7c in QWidget::event (this=0x826ee50, event=0xbfca37bc)
    at kernel/qwidget.cpp:5702
#38 0xb7710750 in QFrame::event (this=0x826ee50, e=0xbfca37bc)
    at widgets/qframe.cpp:633
#39 0xb778478a in QAbstractScrollArea::viewportEvent (this=0x2c58, e=0x6)
    at widgets/qabstractscrollarea.cpp:854
#40 0xb77de530 in QAbstractItemView::viewportEvent (this=0x826ee50,
    event=0xbfca37bc) at itemviews/qabstractitemview.cpp:1277
#41 0xb77871b3 in QAbstractScrollAreaFilter::eventFilter (this=0x0,
    o=0x8269c90, e=0xbfca37bc) at qabstractscrollarea_p.h:78
#42 0xb743c731 in QApplicationPrivate::notify_helper (this=0x807c180,
    receiver=0x8269c90, e=0xbfca37bc) at kernel/qapplication.cpp:3426
#43 0xb743fecc in QApplication::notify (this=0xbfca3ebc, receiver=0x8269c90,
    e=0xbfca37bc) at kernel/qapplication.cpp:3133
#44 0xb7499bcf in QETWidget::translateMouseEvent (this=0x8269c90,
    event=0xbfca3abc) at qcoreapplication.h:186
#45 0xb74994c2 in QApplication::x11ProcessEvent (this=0xbfca3ebc,
    event=0xbfca3abc) at kernel/qapplication_x11.cpp:2764
#46 0xb74bce72 in x11EventSourceDispatch (s=0x807dc00, callback=0,
    user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:122
#47 0xb64728d6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#48 0xb6475996 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#49 0xb6475e1e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#50 0xb7e2d4ba in QEventDispatcherGlib::processEvents (this=0x807c0d0,
    flags=@0xbfca3cc8) at kernel/qeventdispatcher_glib.cpp:363
#51 0xb74bcb9b in QGuiEventDispatcherGlib::processEvents (this=0x807c0d0,
    flags=@0x2c58) at kernel/qguieventdispatcher_glib.cpp:178
#52 0xb7e080bd in QEventLoop::processEvents (this=0x0, flags=@0x0)
    at kernel/qeventloop.cpp:126
#53 0xb7e08238 in QEventLoop::exec (this=0xbfca3d70, flags=@0xbfca3d78)
    at kernel/qeventloop.cpp:172
#54 0xb7e0aadd in QCoreApplication::exec () at kernel/qcoreapplication.cpp:727
#55 0xb743c269 in QApplication::exec () at kernel/qapplication.cpp:2927
#56 0x0804c38b in main ()

Maciek

by tutey@…, 17 years ago

Attachment: merge2.tif added

examlpe 3-band GeoTIFF which crashes QGIS 0.8.1

comment:4 by ersts, 16 years ago

Owner: changed from nobody to ersts

comment:5 by ersts, 16 years ago

Resolution: fixed
Status: newclosed

This bug was fixed with a patch to the trunk as revisoin 7332 and also patched in the raster_transparency_branch as revisions 7331 and 7333.

comment:6 by (none), 15 years ago

Milestone: Version 0.8.2

Milestone Version 0.8.2 deleted

Note: See TracTickets for help on using tickets.