View Issue Details

IDProjectCategoryView StatusLast Update
0007596ScribusColor Managementpublic2008-11-14 22:09
Reporterflorian Assigned Tofschmid  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformIntel 32-bitOSLinuxOS VersionopenSuSE 10.3
Product Version1.3.5svn 
Fixed in Version1.3.5svn 
Summary0007596: Segfault on new color from Scribus SVG palette
DescriptionScribus segfaults when I try to create a new color from the Scribus SVG palette.
Steps To ReproduceSelect german language (bug cannot be reproduced with default english settings).

Menu - Edit - Colors - New - Scribus SVG - [select any color] - OK.
Additional Information(gdb) run
Starting program: /usr/bin/scribus
[Thread debugging using libthread_db enabled]
[New Thread 0xb66bd8e0 (LWP 12668)]
[New Thread 0xb5137b90 (LWP 12671)]
[New Thread 0xb4864b90 (LWP 12677)]
[New Thread 0xb4063b90 (LWP 12678)]
[Thread 0xb4864b90 (LWP 12677) exited]
[Thread 0xb4063b90 (LWP 12678) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb66bd8e0 (LWP 12668)]
ColorManager::newColor (this=0x9693760) at /usr/include/QtGui/qlistwidget.h:314
314 { if (view) view->setItemSelected(this, aselect); }
(gdb) bt
#0 ColorManager::newColor (this=0x9693760)
    at /usr/include/QtGui/qlistwidget.h:314
0000001 0x0817f15d in ColorManager::qt_metacall (this=0x9693760,
    _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbfc68c6c)
    at /usr/src/scribus_cvs/builddir/scribus/moc_colorm.cxx:87
0000002 0xb7060c19 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
0000003 0xb7061050 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
0000004 0xb7c95b81 in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4
0000005 0xb79efa59 in QAbstractButtonPrivate::emitClicked ()
   from /usr/lib/libQtGui.so.4
0000006 0xb79f0f50 in QAbstractButtonPrivate::click () from /usr/lib/libQtGui.so.4
0000007 0xb79f119b in QAbstractButton::mouseReleaseEvent ()
   from /usr/lib/libQtGui.so.4
0000008 0xb7702974 in QWidget::event () from /usr/lib/libQtGui.so.4
0000009 0xb79efc6f in QAbstractButton::event () from /usr/lib/libQtGui.so.4
0000010 0xb7a96a32 in QPushButton::event () from /usr/lib/libQtGui.so.4
0000011 0xb76aa1cc in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
0000012 0xb76af1a5 in QApplication::notify () from /usr/lib/libQtGui.so.4
0000013 0xb704bcb9 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
0000014 0xb76ae8b1 in QApplicationPrivate::sendMouseEvent ()
   from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
0000015 0xb771723f in QETWidget::translateMouseEvent () from /usr/lib/libQtGui.so.4
0000016 0xb7716a30 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
0000017 0xb773d62a in ?? () from /usr/lib/libQtGui.so.4
0000018 0xb68bb5d6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
0000019 0xb68be972 in ?? () from /usr/lib/libglib-2.0.so.0
0000020 0x08d8fb28 in ?? ()
0000021 0x00000000 in ?? ()
(gdb) cont
Continuing.
Scribus ist abgest?rzt
-------------
Absturz durch Signal 0000011
Calling Emergency Save

Program received signal SIGSEGV, Segmentation fault.
0x08839c81 in ScribusMainWindow::emergencySave (this=0x0)
    at /usr/src/scribus_cvs/Scribus/scribus/scribus.cpp:9022
9022 QWidgetList windows = wsp->windowList();
(gdb) cont
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)
TagsNo tags attached.
Patch

Activities

cbradney

2008-11-04 23:15

administrator   ~0020608

Unable to reproduce here with a German UI

jghali

2008-11-04 23:51

administrator   ~0020609

Unable to reproduce with a German or French UI

florian

2008-11-05 09:22

reporter   ~0020612

Bug still there with revision 12822, same backtrace:

GNU gdb 6.6.50.20070726-cvs
Copyright (C) 2007 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-suse-linux"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/bin/scribus
[Thread debugging using libthread_db enabled]
[New Thread 0xb66dc8e0 (LWP 19103)]
[New Thread 0xb50e5b90 (LWP 19106)]
[New Thread 0xb4869b90 (LWP 19112)]
[New Thread 0xb4068b90 (LWP 19113)]
[Thread 0xb4869b90 (LWP 19112) exited]
[Thread 0xb4068b90 (LWP 19113) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb66dc8e0 (LWP 19103)]
ColorManager::newColor (this=0x93e12f8) at /usr/include/QtGui/qlistwidget.h:314
314 { if (view) view->setItemSelected(this, aselect); }
(gdb) bt
#0 ColorManager::newColor (this=0x93e12f8) at /usr/include/QtGui/qlistwidget.h:314
0000001 0x0817f49d in ColorManager::qt_metacall (this=0x93e12f8, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbf9a799c)
    at /usr/src/scribus_cvs/builddir/scribus/moc_colorm.cxx:87
0000002 0xb707fc19 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
0000003 0xb7080050 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
0000004 0xb7cb4b81 in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4
0000005 0xb7a0ea59 in QAbstractButtonPrivate::emitClicked () from /usr/lib/libQtGui.so.4
0000006 0xb7a0ff50 in QAbstractButtonPrivate::click () from /usr/lib/libQtGui.so.4
0000007 0xb7a1019b in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
0000008 0xb7721974 in QWidget::event () from /usr/lib/libQtGui.so.4
0000009 0xb7a0ec6f in QAbstractButton::event () from /usr/lib/libQtGui.so.4
0000010 0xb7ab5a32 in QPushButton::event () from /usr/lib/libQtGui.so.4
0000011 0xb76c91cc in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
0000012 0xb76ce1a5 in QApplication::notify () from /usr/lib/libQtGui.so.4
0000013 0xb706acb9 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
0000014 0xb76cd8b1 in QApplicationPrivate::sendMouseEvent () from /usr/lib/libQtGui.so.4
0000015 0xb773623f in QETWidget::translateMouseEvent () from /usr/lib/libQtGui.so.4
0000016 0xb7735a30 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
0000017 0xb775c62a in ?? () from /usr/lib/libQtGui.so.4
0000018 0xb68da5d6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
0000019 0xb68dd972 in ?? () from /usr/lib/libglib-2.0.so.0
0000020 0x08d98b28 in ?? ()
0000021 0x00000000 in ?? ()
(gdb) cont
Continuing.
Scribus ist abgest?rzt
-------------
Absturz durch Signal 0000011
Calling Emergency Save

Program received signal SIGSEGV, Segmentation fault.
0x0883cadf in ScribusMainWindow::emergencySave (this=0x0) at /usr/src/scribus_cvs/Scribus/scribus/scribus.cpp:9023
9023 QWidgetList windows = wsp->windowList();
(gdb) cont
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.

----------

I could break down the bug to <colorm.cpp>, line 381:
colorListBox->item(newItemIndex)->setSelected(true);

This line is being executed with newItemIndex==10 which exceeds the length of the list by one.

My guess is:

The new color is inserted into the colorListBox in alphanumeric order. The bug is mainly restricted to german UI / SVG palette because default colors begin with capital letters in german UI, SVG palette colors begin with lowercase letters, so SVG palette colors are appended to the end of the colorListBox.

The parameter to colorListBox->item is one too big in line 381 (perhaps newItemIndex is one too big in the whole method?).

Have a look at this:

When you create a new color that fits alphabetically in the middle of the list, using Menu - Edit - Colors - New - [select any color] - OK, the selection will change: not to the newly created color but to the entry one line below.

florian

2008-11-05 09:26

reporter   ~0020613

You might want to try to reproduce the bug by creating a new color with the name "zzz". That should go to the end of the color list, not depending on UI language.

jghali

2008-11-05 10:28

administrator   ~0020614

Still unable to reproduce

fschmid

2008-11-05 14:56

administrator   ~0020615

Can't reproduce here with OpenSuse 10.3 and Qt-4.4.2 compiled from sources.

fschmid

2008-11-05 15:25

administrator   ~0020616

Please try again with SVN revision 12823 as soon as it is available.

florian

2008-11-05 16:49

reporter   ~0020617

revision 12823 works for me

Issue History

Date Modified Username Field Change
2008-11-04 20:57 florian New Issue
2008-11-04 23:15 cbradney Note Added: 0020608
2008-11-04 23:51 jghali Note Added: 0020609
2008-11-05 09:22 florian Note Added: 0020612
2008-11-05 09:26 florian Note Added: 0020613
2008-11-05 10:28 jghali Note Added: 0020614
2008-11-05 14:56 fschmid Note Added: 0020615
2008-11-05 15:25 fschmid Note Added: 0020616
2008-11-05 16:49 florian Note Added: 0020617
2008-11-05 17:13 fschmid Status new => resolved
2008-11-05 17:13 fschmid Fixed in Version => 1.3.5svn
2008-11-05 17:13 fschmid Resolution open => fixed
2008-11-05 17:13 fschmid Assigned To => fschmid
2008-11-14 22:09 cbradney Status resolved => closed