Bug 118103 - Segmentation fault opening a recent file
Summary: Segmentation fault opening a recent file
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Applications
Component: general (show other bugs)
Version: 0.5
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-11 11:39 UTC by 81joe81
Modified: 2005-12-12 21:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 81joe81 2005-12-11 11:39:43 UTC
Version:           0.5 (using KDE KDE 3.5.0)
Installed from:    Ubuntu Packages
OS:                Linux

I'm encountering a sigsev everytime I try to open a pdf file, that is the second in the "recent files" list. I try to open it by keeping clicked the "open" icon
This is the backtrace:
[KCrash handler]
#4  0xb760056a in KURL::hasSubURL () from /usr/lib/libkdecore.so.4
#5  0xb769168a in KURL::fileName () from /usr/lib/libkdecore.so.4
#6  0xb7955890 in KRecentFilesAction::addURL () from /usr/lib/libkdeui.so.4
#7  0x0804ed40 in ?? ()
#8  0x0818b7f8 in ?? ()
#9  0x08277910 in ?? ()
#10 0x00000001 in ?? ()
#11 0xb736d366 in QChar::isSpace () from /usr/lib/libqt-mt.so.3
#12 0x0805039c in ?? ()
#13 0x0817bc80 in ?? ()
#14 0x08277910 in ?? ()
#15 0xbf9ca3d8 in ?? ()
#16 0x08050337 in ?? ()
#17 0x0820e7e0 in ?? ()
#18 0x0820ece0 in ?? ()
#19 0xbf9ca3d8 in ?? ()
#20 0xb74cd460 in ?? () from /usr/lib/libqt-mt.so.3
#21 0x08050320 in ?? ()
#22 0x0818b7f8 in ?? ()
#23 0xbf9ca418 in ?? ()
#24 0xb7057929 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#25 0xb7057929 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#26 0xb788e30a in KRecentFilesAction::urlSelected ()
   from /usr/lib/libkdeui.so.4
#27 0xb78be45b in KRecentFilesAction::menuItemActivated ()
   from /usr/lib/libkdeui.so.4
#28 0xb79630d1 in KRecentFilesAction::qt_invoke () from /usr/lib/libkdeui.so.4
#29 0xb7057a56 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#30 0xb7058238 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#31 0xb73d132b in QPopupMenu::activated () from /usr/lib/libqt-mt.so.3
#32 0xb717a26d in QPopupMenu::actSig () from /usr/lib/libqt-mt.so.3
#33 0xb717a91a in QPopupMenu::mouseReleaseEvent () from /usr/lib/libqt-mt.so.3
#34 0xb7863aa0 in KPopupMenu::mouseReleaseEvent () from /usr/lib/libkdeui.so.4
#35 0xb7092356 in QWidget::event () from /usr/lib/libqt-mt.so.3
#36 0xb6feef80 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#37 0xb6fef500 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#38 0xb7681c3c in KApplication::notify () from /usr/lib/libkdecore.so.4
#39 0xb6f7fe25 in QApplication::sendSpontaneousEvent ()
   from /usr/lib/libqt-mt.so.3
#40 0xb6f7b072 in QETWidget::translateMouseEvent ()
   from /usr/lib/libqt-mt.so.3
#41 0xb6f7966f in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#42 0xb6f92fff in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#43 0xb7006cfb in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#44 0xb6fedc3f in QApplication::enter_loop () from /usr/lib/libqt-mt.so.3
#45 0xb717f5d7 in QPopupMenu::exec () from /usr/lib/libqt-mt.so.3
#46 0xb71b4811 in QToolButton::popupTimerDone () from /usr/lib/libqt-mt.so.3
#47 0xb73da8d8 in QToolButton::qt_invoke () from /usr/lib/libqt-mt.so.3
#48 0xb78eae8c in KToolBarButton::qt_invoke () from /usr/lib/libkdeui.so.4
#49 0xb7057929 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#50 0xb70583c4 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#51 0xb73b8f9a in QTimer::timeout () from /usr/lib/libqt-mt.so.3
#52 0xb707cc19 in QTimer::event () from /usr/lib/libqt-mt.so.3
#53 0xb6feef80 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#54 0xb6fef172 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#55 0xb7681c3c in KApplication::notify () from /usr/lib/libkdecore.so.4
#56 0xb6f7fdb7 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#57 0xb6fe099b in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#58 0xb6f93a84 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#59 0xb7006cfb in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#60 0xb7006c1e in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#61 0xb6fedc13 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#62 0x08050066 in ?? ()
#63 0xbf9cbc24 in ?? ()
#64 0x00000001 in ?? ()
#65 0x00000001 in ?? ()
#66 0x00000000 in ?? ()
#67 0x00000001 in ?? ()
#68 0x00000000 in ?? ()
#69 0x00000001 in ?? ()
#70 0xbf9cbc28 in ?? ()
#71 0xb7d80391 in malloc () from /lib/tls/i686/cmov/libc.so.6
#72 0xb7d2fea2 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#73 0x0804ec61 in ?? ()

If you need more informations, please tell me what to do, while I'm able to reproduce the bug
Comment 1 Albert Astals Cid 2005-12-11 14:18:01 UTC
Does this crash still happen if you open if from command line kpdf, that is open konsole and write kdpf pathToDocument.
Comment 2 81joe81 2005-12-11 16:09:13 UTC
I tried to lauch it from konsole typing "kpdf" and I did same steps as before, that is I tried to open the file keeping clicked the open icon, and kpdf crashed in the same way.
I have not yet tried to open the file directly from the command line, because I think that in this way the crash will not happen: I have already opened this file at least 5 times before today.. I think the problem is related to the way I try to open it (by selecting it from the "recent files") and not to the file itself
Comment 3 Albert Astals Cid 2005-12-11 18:46:41 UTC
The code used for opening a file via the file->open or via recent files is exactly the same.

Can you please paste the contents of the Recent Files key of your .kde/share/config/kpdfrc file?
Comment 4 81joe81 2005-12-11 18:57:23 UTC
This is the config file:
[Desktop Entry]
FullScreen=false

[General]
ShowAlternativeShortcutConfig=false

[KFileDialog Settings]
Recent Files=$HOME/guitar/REM - Losing My Religion.pdf,$HOME/amule/Green Day - Good Riddance - Tabs.pdf,$HOME/amule/Radiohead - Karma Police Original.pdf,$HOME/amule/Radiohead - Karma Police-Exit Music (For A Film)-Paranoid Android.pdf,$HOME/amule/Alanis Morissette - Ironic.pdf,$HOME/ironic.pdf,$HOME/ironic.ps,$HOME/amule/Rolling Stones - Angie.pdf,$HOME/print.pdf,$HOME/amule/(Guitar Songbook) Pink Floyd - Wish You Were Here.pdf,$HOME/amule/Pink Floyd - Best of Band Score (guitar songbook).pdf,$HOME/amule/Pink Floyd - Wish You Were Here (Guitar Songbook).pdf,$HOME/word/ritmica.pdf,$HOME/amule/Patty Smyth - Because The Night.pdf,$HOME/amule/REM - Losing My Religion.pdf,$HOME/amule/Superman (Five for Fighting) [Sheet music].pdf

[KPrinter Settings]
ApplicationOptions=
DialogReduced=false
PrintCommand=
Printer=HPDeskJet930C

[MainWindow]
Height 768=769
Width 1024=1025

[RecentFiles]
File1=/tmp/organizational_chart.pdf
File10=$HOME/print.pdf
File2=$HOME/guitar/REM - Losing My Religion.pdf
File3=$HOME/amule/Radiohead - Karma Police Original.pdf
File4=$HOME/amule/Green Day - Good Riddance - Tabs.pdf
File5=$HOME/amule/Radiohead - Karma Police-Exit Music (For A Film)-Paranoid Android.pdf
File6=$HOME/amule/Alanis Morissette - Ironic.pdf
File7=$HOME/ironic.pdf
File8=$HOME/ironic.ps
File9=$HOME/amule/Rolling Stones - Angie.pdf
Name1=organizational_chart.pdf
Name10=print.pdf
Name2=REM - Losing My Religion.pdf
Name3=Radiohead - Karma Police Original.pdf
Name4=Green Day - Good Riddance - Tabs.pdf
Name5=Radiohead - Karma Police-Exit Music (For A Film)-Paranoid Android.pdf
Name6=Alanis Morissette - Ironic.pdf
Name7=ironic.pdf
Name8=ironic.ps
Name9=Rolling Stones - Angie.pdf
Comment 5 81joe81 2005-12-12 10:45:06 UTC
I've tried to open that file (REM - Losing my religion.pdf) from the normal open file icon and kpdf opened it without problems.
I've closed kpdf, restart it and trying again to open the file via the recent files icon and kpdf crashed again
Comment 6 Albert Astals Cid 2005-12-12 13:57:05 UTC
Ok, confirmed there's some problem in recent files handling, this is more a kdelibs problem than a kdpf problem, i'll try to find a fix and if not i'll pass it to the appropiate person.
Comment 7 Albert Astals Cid 2005-12-12 21:27:56 UTC
SVN commit 487990 by aacid:

Fix bug 118103, using url after erasing it is bad. Patch aproved by dfaure. David i'll leave you the fixing of the commment about refcounting
BUG: 118103


 M  +2 -2      kactionclasses.cpp  


--- branches/KDE/3.5/kdelibs/kdeui/kactionclasses.cpp #487989:487990
@@ -1128,8 +1128,8 @@
     }
 
     // add file to list
-    QString title = url.fileName() + " [" + file + "]";
-    d->m_shortNames.insert( title, url.fileName() );
+    QString title = u.fileName() + " [" + file + "]";
+    d->m_shortNames.insert( title, u.fileName() );
     d->m_urls.insert( title, u );
     lst.prepend( title );
     setItems( lst );