Opened 18 years ago

Closed 18 years ago

Last modified 15 years ago

#187 closed bug (fixed)

GRASS: Crash when trying to edit a layer where the editor has not sufficient rights

Reported by: holl@… Owned by: rblazek
Priority: major: does not work as expected Milestone:
Component: GRASS Version: Trunk
Keywords: Cc: holl@…
Must Fix for Release: No Platform: Debian
Platform Version: linux32 Awaiting user input: no

Description

Hi developers,

I have found a bug which causes QGIS to crash. It can be reproduced when you try to edit a layer which is in a different mapset than your current one and where you do not have write-privileges.

A Warning-window pops up and tells you that you are not the owner of the layer, where you can only print 'OK'. After hitting OK, QGIS segfaults.

Here is a gdb-bt: ... Debug: qgsmaplayer.cpp: 121: (name) QgsMapLayer::name: returning name 'soils_bak Debug: qgsgrassedit.cpp: 150: (isEditable) layer name: soils_bak Debug: qgsgrassedit.cpp: 160: (isEditable) Vector layer type: grass QgsGrassProvider::isGrassEditable QgsGrassProvider::isValid() returned: true QgsMapCanvas::drawContents QgsGrassEdit::~QgsGrassEdit() QgsGrassEdit::displayDynamic Points = 0 type = 0

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1124519648 (LWP 17647)] std::_Deque_iterator<QgsPoint, QgsPoint&, QgsPoint*>::operator+= (this=0xbfffe0a0, n=1) at stl_deque.h:200 200 _M_first = *new_node; (gdb) bt #0 std::_Deque_iterator<QgsPoint, QgsPoint&, QgsPoint*>::operator+= (this=0xbfffe0a0, n=1) at stl_deque.h:200 #1 0x4168ea3d in QgsRubberBand::reset (this=0x810adc8, isPolygon=false) at stl_deque.h:125 #2 0x43842813 in QgsGrassEdit::displayDynamic (this=0x8355878, Points=0x0, x=0, y=0, type=0, size=-7549647) at qgsgrassedit.cpp:1673 #3 0x4384267f in QgsGrassEdit::eraseDynamic (this=0xff8ccd31) at qgsgrassedit.cpp:1644 #4 0x4383d899 in ~QgsGrassEdit (this=0x8355878) at qgsgrassedit.cpp:923 #5 0x438156e2 in QgsGrassPlugin::edit (this=0x8138018) at qgsgrassplugin.cpp:451 #6 0x4393a2e7 in QgsGrassPlugin::qt_metacall (this=0x8138018, _c=InvokeMetaMethod, _id=3, _a=0xbfffe7d8) at qgsgrassplugin.moc.cpp:94 #7 0x4020dc8f in QMetaObject::activate () from /usr/lib/libQtCore.so.4 #8 0x4020df55 in QMetaObject::activate () from /usr/lib/libQtCore.so.4 #9 0x406cec3f in QAction::activated () from /usr/lib/libQtGui.so.4 #10 0x406ce4e9 in QAction::activate () from /usr/lib/libQtGui.so.4 #11 0x4099ea31 in QToolButton::nextCheckState () from /usr/lib/libQtGui.so.4 #12 0x408f894d in QAbstractButtonPrivate::click () from /usr/lib/libQtGui.so.4 #13 0x408f9921 in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4 #14 0x40716ee2 in QWidget::event () from /usr/lib/libQtGui.so.4 #15 0x408f9762 in QAbstractButton::event () from /usr/lib/libQtGui.so.4 #16 0x4099ea66 in QToolButton::event () from /usr/lib/libQtGui.so.4 #17 0x406d8889 in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4 #18 0x406d7427 in QApplication::notify () from /usr/lib/libQtGui.so.4 #19 0x40728cb8 in QETWidget::translateMouseEvent () from /usr/lib/libQtGui.so.4 #20 0x40726781 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4 #21 0x4073c3a5 in QEventDispatcherX11::processEvents () from /usr/lib/libQtGui.so.4 #22 0x401fb179 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4 #23 0x401fb232 in QEventLoop::exec () from /usr/lib/libQtCore.so.4 #24 0x401fddc0 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4 #25 0x406d70e9 in QApplication::exec () from /usr/lib/libQtGui.so.4 #26 0x0804cb6d in main (argc=1, argv=0xbffff864) at main.cpp:589

Perhaps this is of some help. Thank you for looking into this.

Best

Stephan

Change History (3)

comment:1 by holl@…, 18 years ago

sorry for the unreadble gdb-output. Here it is again

QgsGrassEdit()
Debug: qgsmaplayer.cpp: 121: (name) QgsMapLayer::name: returning name 'soils_bak
Debug: qgsgrassedit.cpp: 150: (isEditable) layer name: soils_bak
Debug: qgsgrassedit.cpp: 160: (isEditable) Vector layer type: grass
QgsGrassProvider::isGrassEditable
QgsGrassProvider::isValid() returned: true
QgsMapCanvas::drawContents
QgsGrassEdit::~QgsGrassEdit()
QgsGrassEdit::displayDynamic Points = 0 type = 0

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1124519648 (LWP 17647)]
std::_Deque_iterator<QgsPoint, QgsPoint&, QgsPoint*>::operator+= (this=0xbfffe0a0, __n=1) at stl_deque.h:200
200           _M_first = *__new_node;
(gdb) bt
#0  std::_Deque_iterator<QgsPoint, QgsPoint&, QgsPoint*>::operator+= (this=0xbfffe0a0, __n=1) at stl_deque.h:200
#1  0x4168ea3d in QgsRubberBand::reset (this=0x810adc8, isPolygon=false) at stl_deque.h:125
#2  0x43842813 in QgsGrassEdit::displayDynamic (this=0x8355878, Points=0x0, x=0, y=0, type=0, size=-7549647) at qgsgrassedit.cpp:1673
#3  0x4384267f in QgsGrassEdit::eraseDynamic (this=0xff8ccd31) at qgsgrassedit.cpp:1644
#4  0x4383d899 in ~QgsGrassEdit (this=0x8355878) at qgsgrassedit.cpp:923
#5  0x438156e2 in QgsGrassPlugin::edit (this=0x8138018) at qgsgrassplugin.cpp:451
#6  0x4393a2e7 in QgsGrassPlugin::qt_metacall (this=0x8138018, _c=InvokeMetaMethod, _id=3, _a=0xbfffe7d8) at qgsgrassplugin.moc.cpp:94
#7  0x4020dc8f in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#8  0x4020df55 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#9  0x406cec3f in QAction::activated () from /usr/lib/libQtGui.so.4
#10 0x406ce4e9 in QAction::activate () from /usr/lib/libQtGui.so.4
#11 0x4099ea31 in QToolButton::nextCheckState () from /usr/lib/libQtGui.so.4
#12 0x408f894d in QAbstractButtonPrivate::click () from /usr/lib/libQtGui.so.4
#13 0x408f9921 in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
#14 0x40716ee2 in QWidget::event () from /usr/lib/libQtGui.so.4
#15 0x408f9762 in QAbstractButton::event () from /usr/lib/libQtGui.so.4
#16 0x4099ea66 in QToolButton::event () from /usr/lib/libQtGui.so.4
#17 0x406d8889 in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#18 0x406d7427 in QApplication::notify () from /usr/lib/libQtGui.so.4
#19 0x40728cb8 in QETWidget::translateMouseEvent () from /usr/lib/libQtGui.so.4
#20 0x40726781 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#21 0x4073c3a5 in QEventDispatcherX11::processEvents () from /usr/lib/libQtGui.so.4
#22 0x401fb179 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#23 0x401fb232 in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#24 0x401fddc0 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#25 0x406d70e9 in QApplication::exec () from /usr/lib/libQtGui.so.4
#26 0x0804cb6d in main (argc=1, argv=0xbffff864) at main.cpp:589
(gdb)

comment:2 by anonymous, 18 years ago

Resolution: fixed
Status: newclosed

Fixed in revision 5685.

Radim

comment:3 by (none), 15 years ago

Milestone: Version 0.8

Milestone Version 0.8 deleted

Note: See TracTickets for help on using tickets.