View Issue Details

IDProjectCategoryView StatusLast Update
0002964ScribusGeneralpublic2006-01-11 08:47
ReporterplinnellAssigned Toringerc 
PriorityhighSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.2cvs 
Fixed in Version1.3.2cvs 
Summary0002964: Crash changing PDF version prefs
DescriptionEdit > preferences > PDF versions triggers it
Additional InformationProgram received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1073904416 (LWP 7726)]
0x085717c8 in TabPDFOptions::EnablePDFX (this=0x8e783b0, a=0)
    at tabpdfoptions.cpp:1082
1082 useLayers2->setEnabled(a == 2);
(gdb) bt
#0 0x085717c8 in TabPDFOptions::EnablePDFX (this=0x8e783b0, a=0)
    at tabpdfoptions.cpp:1082
0000001 0x0857206c in TabPDFOptions::qt_invoke (this=0x8e783b0, _id=52,
    _o=0xbfb63004) at tabpdfoptions.moc:201
0000002 0x412bdf89 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000003 0x412be561 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000004 0x41609840 in QComboBox::activated () from /usr/lib/qt3/lib/libqt-mt.so.3
0000005 0x4135a3d5 in QComboBox::internalActivate ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000006 0x41609954 in QComboBox::qt_invoke () from /usr/lib/qt3/lib/libqt-mt.so.3
0000007 0x412bdf89 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000008 0x412be561 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000009 0x416121a1 in QListBox::selected () from /usr/lib/qt3/lib/libqt-mt.so.3
0000010 0x413984a0 in QListBox::mouseDoubleClickEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000011 0x412f7c25 in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
0000012 0x4125e281 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000013 0x4125f3e8 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
---Type <return> to continue, or q <return> to quit---
0000014 0x4135c90f in QComboBox::eventFilter () from /usr/lib/qt3/lib/libqt-mt.so.3
0000015 0x412bdcce in QObject::activate_filters ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000016 0x412bdd4b in QObject::event () from /usr/lib/qt3/lib/libqt-mt.so.3
0000017 0x412f78dc in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
0000018 0x4125e281 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000019 0x4125f3e8 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
0000020 0x411f8c60 in QETWidget::translateMouseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000021 0x411f803b in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000022 0x4120c12a in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000023 0x41275193 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
0000024 0x4125dbff in QApplication::enter_loop ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000025 0x41447a3e in QDialog::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
0000026 0x08620a2d in ScribusMainWindow::slotPrefsOrg (this=0x87e5200)
    at scribus.cpp:6759
0000027 0x0862220f in ScribusMainWindow::qt_invoke (this=0x87e5200, _id=204,
    _o=0xbfb63eb8) at scribus.moc:1081
0000028 0x412bdf89 in QObject::activate_signal ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000029 0x412be430 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000030 0x41623139 in QAction::activated () from /usr/lib/qt3/lib/libqt-mt.so.3
0000031 0x41401baf in QAction::internalActivation ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000032 0x4162347c in QAction::qt_invoke () from /usr/lib/qt3/lib/libqt-mt.so.3
0000033 0x08483618 in ScrAction::qt_invoke (this=0x88507b8, _id=8, _o=0xbfb63fc4)
    at scraction.moc:208
0000034 0x412bdf89 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000035 0x415ffb12 in QSignal::signal () from /usr/lib/qt3/lib/libqt-mt.so.3
0000036 0x412dabab in QSignal::activate () from /usr/lib/qt3/lib/libqt-mt.so.3
0000037 0x413c4dc8 in QPopupMenu::mouseReleaseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000038 0x412f7c48 in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
0000039 0x4125e281 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000040 0x4125f3e8 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
0000041 0x411f9620 in QETWidget::translateMouseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000042 0x411f803b in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
---Type <return> to continue, or q <return> to quit---
0000043 0x4120c12a in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000044 0x41275179 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
0000045 0x41275076 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
0000046 0x4125dbcf in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
0000047 0x0862710b in mainApp (argc=1, argv=0xbfb648e4) at main_nix.cpp:69
0000048 0x08627156 in main (argc=1, argv=0xbfb648e4) at main_nix.cpp:44
(gdb)
TagsNo tags attached.
Patch

Relationships

related to 0000273 closedfschmid More PDF presentation effects wanted 
related to 0001993 closedfschmid New PDF viewer and presentation effects with visible bookmarks or full screen 
has duplicate 0002959 closedringerc Scribus crashes when changing paper size of document 
has duplicate 0002975 closed crash after using file/document setup 

Activities

plinnell

2006-01-06 00:24

viewer   ~0007942

This was first observed with the win32 build by ExScite.

jghali

2006-01-06 00:58

administrator   ~0007943

the TabPDFOptions dialog is initalized with a NULL ScribusView* vie argument. In this case the useLayers2 widget is not initialized.

plinnell

2006-01-06 11:23

viewer   ~0007945

Switching guides from background to foreground triggers a similar crash.


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1073904416 (LWP 5058)]
0x08184f60 in QButton::isOn (this=0x0) at qbutton.h:193
193 return stat != Off;
(gdb) bt
#0 0x08184f60 in QButton::isOn (this=0x0) at qbutton.h:193
0000001 0x081ab0e7 in QRadioButton::isChecked (this=0x0) at qradiobutton.h:84
0000002 0x08445107 in ReformDoc::updateDocumentSettings (this=0x8de5a20)
    at reformdoc.cpp:1045
0000003 0x085f3eb7 in ScribusMainWindow::slotDocSetup (this=0x87ef200)
    at scribus.cpp:1919
0000004 0x0862a451 in ScribusMainWindow::qt_invoke (this=0x87ef200, _id=199,
    _o=0xbfa047f8) at scribus.moc:1076
0000005 0x412bdf89 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000006 0x412be430 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000007 0x41623139 in QAction::activated () from /usr/lib/qt3/lib/libqt-mt.so.3
0000008 0x41401baf in QAction::internalActivation ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000009 0x4162347c in QAction::qt_invoke () from /usr/lib/qt3/lib/libqt-mt.so.3
0000010 0x084894aa in ScrAction::qt_invoke (this=0x883fa50, _id=8, _o=0xbfa04904)
    at scraction.moc:208
0000011 0x412bdf89 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000012 0x415ffb12 in QSignal::signal () from /usr/lib/qt3/lib/libqt-mt.so.3
0000013 0x412dabab in QSignal::activate () from /usr/lib/qt3/lib/libqt-mt.so.3
0000014 0x413c4dc8 in QPopupMenu::mouseReleaseEvent ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000015 0x412f7c48 in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
0000016 0x4125e281 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000017 0x4125f3e8 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
0000018 0x411f9620 in QETWidget::translateMouseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000019 0x411f803b in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000020 0x4120c12a in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
0000021 0x41275193 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
0000022 0x41275076 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
0000023 0x4125dbcf in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
0000024 0x0862f3b7 in mainApp (argc=1, argv=0xbfa05224) at main_nix.cpp:69
0000025 0x0862f402 in main (argc=1, argv=0xbfa05224) at main_nix.cpp:44
(gdb)

plinnell

2006-01-07 00:54

viewer   ~0007951

Enabling color management triggers this:

New Thread 1073904416 (LWP 10025)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1073904416 (LWP 10025)]
0x08184f60 in QButton::isOn (this=0x0) at qbutton.h:193
193 return stat != Off;
(gdb) bt
#0 0x08184f60 in QButton::isOn (this=0x0) at qbutton.h:193
0000001 0x081ab0e7 in QRadioButton::isChecked (this=0x0) at qradiobutton.h:84
0000002 0x08445107 in ReformDoc::updateDocumentSettings (this=0x916cf78) at reformdoc.cpp:1045
0000003 0x085f3eb7 in ScribusMainWindow::slotDocSetup (this=0x87ef488) at scribus.cpp:1919
0000004 0x0862a451 in ScribusMainWindow::qt_invoke (this=0x87ef488, _id=199, _o=0xbfa47558)
    at scribus.moc:1076
0000005 0x412bdf89 in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3
0000006 0x412be430 in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3
0000007 0x41623139 in QAction::activated () from /usr/lib/qt3/lib/libqt-mt.so.3
0000008 0x41401baf in QAction::internalActivation () from /usr/lib/qt3/lib/libqt-mt.so.3
0000009 0x4162347c in QAction::qt_invoke () from /usr/lib/qt3/lib/libqt-mt.so.3
0000010 0x084894aa in ScrAction::qt_invoke (this=0x882cae8, _id=8, _o=0xbfa47664) at scraction.moc:208
0000011 0x412bdf89 in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3
0000012 0x415ffb12 in QSignal::signal () from /usr/lib/qt3/lib/libqt-mt.so.3
0000013 0x412dabab in QSignal::activate () from /usr/lib/qt3/lib/libqt-mt.so.3
0000014 0x413c4dc8 in QPopupMenu::mouseReleaseEvent () from /usr/lib/qt3/lib/libqt-mt.so.3
0000015 0x412f7c48 in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
0000016 0x4125e281 in QApplication::internalNotify () from /usr/lib/qt3/lib/libqt-mt.so.3
0000017 0x4125f3e8 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
0000018 0x411f9620 in QETWidget::translateMouseEvent () from /usr/lib/qt3/lib/libqt-mt.so.3
0000019 0x411f803b in QApplication::x11ProcessEvent () from /usr/lib/qt3/lib/libqt-mt.so.3
0000020 0x4120c12a in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3
0000021 0x41275193 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
0000022 0x41275076 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
0000023 0x4125dbcf in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
0000024 0x0862f3b7 in mainApp (argc=1, argv=0xbfa47f84) at main_nix.cpp:69
0000025 0x0862f402 in main (argc=1, argv=0xbfa47f84) at main_nix.cpp:44
(gdb)

plinnell

2006-01-07 01:13

viewer   ~0007952

Note this is in the doc setup, this is what makes it so ugly.

plinnell

2006-01-07 01:15

viewer   ~0007953

Reminder sent to: cbradney, Howard White

plinnell

2006-01-07 01:16

viewer   ~0007954

Reminder sent to: ringerc

ringerc

2006-01-07 09:05

reporter   ~0007955

Last edited: 2006-01-07 09:45

useLayers2 was introduced in tabpdfoptions.cpp 1.1.2.48 -> 1.1.2.49 :

From: Franz Schmid <...>

Modified Files:
      Tag: Version13x
    fileloader.cpp pdflib.cpp pdfoptions.h pdfopts.cpp
    prefsmanager.cpp reformdoc.cpp scribusXml.cpp
    tabpdfoptions.cpp tabpdfoptions.h
Log Message:
First part of fixing Bugs 0000273 and 0001993.

so it looks like it just needs to be unconditionally inited. (CORRECTION: It's not meant to be. It just shouldn't be accessed if it hasn't been set up.) This might be the origin of some of the other problems as well.

If the controls were all private and tabpdfoptions just returned information about its state on request, this problem would go away anyway.

ringerc

2006-01-07 09:23

reporter   ~0007956

Once the access of userLayers2 is fixed, we get this crash when accepting the dialog instead:

#0  0x081873e8 in QButton::isOn (this=0xffffffff) at /usr/lib/qt-3.3/include/qbutton.h:193
0000001  0x081ab1a0 in QRadioButton::isChecked (this=0xffffffff) at /usr/lib/qt-3.3/include/qradiobutton.h:84
0000002  0x0843d0c0 in ReformDoc::updateDocumentSettings (this=0xbffcfda8) at reformdoc.cpp:1045
0000003  0x085ebec9 in ScribusMainWindow::slotDocSetup (this=0x873dda0) at scribus.cpp:1914
0000004  0x08623f78 in ScribusMainWindow::qt_invoke (this=0x873dda0, _id=199, _o=0xbffd0128) at scribus.moc:1076
0000005  0x054e4eb4 in QObject::activate_signal (this=0x87a22b0, clist=0x87c26e8, o=0xbffd0128) at kernel/qobject.cpp:2355
0000006  0x054e5374 in QObject::activate_signal (this=0x87a22b0, signal=2) at kernel/qobject.cpp:2324
0000007  0x0587eee9 in QAction::activated (this=0xffffffff) at .moc/release-shared-mt/moc_qaction.cpp:150
0000008  0x0563649f in QAction::internalActivation (this=0x87a22b0) at widgets/qaction.cpp:979
0000009  0x0587f0ad in QAction::qt_invoke (this=0x87a22b0, _id=8, _o=0xbffd0244) at .moc/release-shared-mt/moc_qaction.cpp:168
0000010 0x084820f8 in ScrAction::qt_invoke (this=0x87a22b0, _id=8, _o=0xbffd0244) at scraction.moc:208
0000011 0x054e4eb4 in QObject::activate_signal (this=0x8834d60, clist=0x88347c8, o=0xbffd0244) at kernel/qobject.cpp:2355
0000012 0x0585d2e6 in QSignal::signal (this=0x8834d60, t0=@0xffffffff) at .moc/release-shared-mt/moc_qsignal.cpp:100
0000013 0x05502693 in QSignal::activate (this=0x8834d60) at kernel/qsignal.cpp:212
0000014 0x055f95e2 in QPopupMenu::mouseReleaseEvent (this=0x882ed90, e=0xbffd0674) at widgets/qpopupmenu.cpp:1693
0000015 0x05523187 in QWidget::event (this=0x882ed90, e=0xbffd0674) at kernel/qwidget.cpp:4699
0000016 0x054800dd in QApplication::internalNotify (this=0xffffffff, receiver=0x882ed90, e=0xbffd0674) at kernel/qapplication.cpp:2635
0000017 0x0548103f in QApplication::notify (this=0xbffd0a08, receiver=0x882ed90, e=0xbffd0674) at kernel/qapplication.cpp:2421
0000018 0x05417b4d in QETWidget::translateMouseEvent (this=0x882ed90, event=0xbffd0938) at kernel/qapplication.h:518
0000019 0x05415f01 in QApplication::x11ProcessEvent (this=0xbffd0a08, event=0xbffd0938) at kernel/qapplication_x11.cpp:3468
0000020 0x0542a008 in QEventLoop::processEvents (this=0x872c680, flags=Variable "flags" is not available.
) at kernel/qeventloop_x11.cpp:192
0000021 0x05498812 in QEventLoop::enterLoop (this=0x872c680) at kernel/qeventloop.cpp:198
0000022 0x05498736 in QEventLoop::exec (this=0x872c680) at kernel/qeventloop.cpp:145
0000023 0x0547faa9 in QApplication::exec (this=0xbffd0a08) at kernel/qapplication.cpp:2758
0000024 0x086290bd in mainApp (argc=1, argv=0xbffd0b24) at main_nix.cpp:69
0000025 0x0862910a in main (argc=1, argv=0xbffd0b24) at main_nix.cpp:44


IOW more problems with the PDF view modes stuff.

ringerc

2006-01-07 09:53

reporter   ~0007958

You should find that even just accepting the dialog causes a crash. It might've been intermittent before since we were accessing unitialized memory (so god knows what settings were getting corrupted).

ringerc

2006-01-07 10:04

reporter   ~0007959

Worked around by diabling access to the missing widgets in reformdoc. Transition mode prefs are not saved. This is not a fix, it's a quick workaround (see ML).

plinnell

2006-01-07 10:50

viewer   ~0007960

crash gone now for the moment

fschmid

2006-01-08 11:40

developer   ~0007965

In my opinion Craig has fixed this ok. I don't think we need the Presentation Effects in the Preferences or the Doc Setup.

We should thing about a complete redesign of the PDF Export Dialog and the PDF Options Tab in the Preferences and Doc Setup. The current code gets too ugly to maintain.

plinnell

2006-01-08 14:53

viewer   ~0007969

No more crashes and I agree with Franz's last comment.

ringerc

2006-01-08 18:40

reporter   ~0007971

Franz, works for me. I'll remove that commented out code.

I agree that the current code is going to become a problem. I personally wonder if it's better to break the common code in tabpdfoptions out into a common base, then inherit that base for the PDF export and prefs dialogs.

In fact, since we really only remove functionality from the prefs version, or add it to the PDF dialog version, perhaps much of the PDF-export only stuff just needs to be moved into PDFExportDialog from TabPDFWidget . Everything inside the "if (view != 0)" in TabPDFOptions should probably be in PDFExportDialog. Ideally this can be organised to be done mostly by adding new tabs, rather than manipulating the layouts within existing ones too much.

This should probably coincide with the removal of public access to ALL widgets in both classes, in favour of modifying a passed structure (or just creating and returning one).

I recently made much of TabPDFWidget private and made PDFExportDialog a friend of it. All remaining public widgets are accessed by the prefs code. Most of those should either manipulate a temporary copy of a PDFOptions structure directly, or the dialog should build and return such a structure.

Here's how I think reformdoc's use of TabPDFWidget should look:

ApplicationPrefs tempPrefs(doc->prefsData);
TabPDFWidget w(..., tempPrefs.PDF_Options, ...);
whateverLayout.addWidget(&w);
// blah blah other prefs stuff. For now we must copy prefs out of each
// panel. Later they should probably be separate widgets which modify
// the passed prefs data reference instead.
if (prefsDialog.exec())
{
   doc->prefsData = tempPrefs;
   // blah blah
}


Anyway, just some late night I'm-tired-and-blathering ideas. Much of this may be nonsense, but perhaps there's the odd useful bit in it.

plinnell

2006-01-11 08:47

viewer   ~0008022

tested. fixed.

Issue History

Date Modified Username Field Change
2006-01-06 00:21 plinnell New Issue
2006-01-06 00:24 plinnell Note Added: 0007942
2006-01-06 00:58 jghali Note Added: 0007943
2006-01-06 11:23 plinnell Note Added: 0007945
2006-01-07 00:54 plinnell Note Added: 0007951
2006-01-07 01:13 plinnell Note Added: 0007952
2006-01-07 01:15 plinnell Note Added: 0007953
2006-01-07 01:16 plinnell Note Added: 0007954
2006-01-07 09:05 ringerc Note Added: 0007955
2006-01-07 09:12 ringerc Status new => confirmed
2006-01-07 09:23 ringerc Note Added: 0007956
2006-01-07 09:28 ringerc Status confirmed => assigned
2006-01-07 09:28 ringerc Assigned To => fschmid
2006-01-07 09:29 ringerc Relationship added related to 0000273
2006-01-07 09:29 ringerc Relationship added related to 0001993
2006-01-07 09:45 ringerc Note Edited: 0007955
2006-01-07 09:53 ringerc Note Added: 0007958
2006-01-07 10:04 ringerc Note Added: 0007959
2006-01-07 10:50 plinnell Note Added: 0007960
2006-01-07 11:41 ringerc Severity crash => block
2006-01-07 11:51 ringerc Relationship added has duplicate 0002959
2006-01-08 11:40 fschmid Note Added: 0007965
2006-01-08 14:53 plinnell Note Added: 0007969
2006-01-08 14:53 plinnell Status assigned => resolved
2006-01-08 14:53 plinnell Resolution open => fixed
2006-01-08 14:53 plinnell Fixed in Version => 1.3.2cvs
2006-01-08 18:40 ringerc Note Added: 0007971
2006-01-08 18:40 ringerc Assigned To fschmid => ringerc
2006-01-08 20:47 plinnell Relationship added has duplicate 0002975
2006-01-11 08:47 plinnell Status resolved => closed
2006-01-11 08:47 plinnell Note Added: 0008022