Bug 101155 - KPDF Part crashes when embedded in Ark
Summary: KPDF Part crashes when embedded in Ark
Status: RESOLVED WORKSFORME
Alias: None
Product: kpdf
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Henrique Pinto
URL:
Keywords:
: 105822 107566 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-09 10:05 UTC by Peter Trash
Modified: 2005-07-18 19:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Settings to ArkSettings (10.76 KB, patch)
2005-07-18 01:32 UTC, Omri Mezrich
Details
Settings to KPdfSettings (32.77 KB, patch)
2005-07-18 01:33 UTC, Omri Mezrich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Trash 2005-03-09 10:05:57 UTC
Version:           2.5 (using KDE 3.4.0 Level "a" , SUSE 9.2 UNSUPPORTED)
Compiler:          gcc version 3.3.4 (pre 3.3.5 20040809)
OS:                Linux (i686) release 2.6.8-24.11-default

the following makes ark crash:

# zip file.zip file.pdf
# ark file.zip
choose right-click on file.pdf an choose "view"

ark does not seem to crash for other file formats (I tried postscript and ascii) and for other compression formats (I tried tar.gz and tar.bz).
Comment 1 Thiago Macieira 2005-03-09 12:35:48 UTC
Can you verify in Konqueror's settings, in the File Associations item, which application is listed on the top for application/pdf? Please tell us which one is at the top for embedding as well.
Comment 2 Stefano 2005-04-05 23:18:50 UTC
I can confirm, I have the same bug, and it seems to be with pdf files only. I'm on RC of kubuntu, with kde-3.4.0.    

Linux version 2.6.10-5-386 (buildd@rothera) (gcc version 3.3.5 (Debian 1:3.3.5-8ubuntu2)) #1 Fri Apr 1 16:41:33 UTC 2005

In file association kpdf is first in both cases.



here is the backtrace 

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1229695584 (LWP 14347)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#4  0xb6604a71 in KPDF::Part::Part () from /usr/lib/kde3/libkpdfpart.so
#5  0xb660a1fc in KParts::GenericFactory<KPDF::Part>::createPartObject ()
   from /usr/lib/kde3/libkpdfpart.so
#6  0xb7fc788b in KParts::Factory::createPart () from /usr/lib/libkparts.so.2
#7  0xb6862444 in General::qt_static_property ()
   from /usr/lib/kde3/libarkpart.so
#8  0xb6862393 in General::qt_static_property ()
   from /usr/lib/kde3/libarkpart.so
#9  0xb6862295 in General::qt_static_property ()
   from /usr/lib/kde3/libarkpart.so
#10 0xb68621ab in General::qt_static_property ()
   from /usr/lib/kde3/libarkpart.so
#11 0xb68620c3 in General::qt_static_property ()
   from /usr/lib/kde3/libarkpart.so
#12 0xb685de8e in ArkViewer::view () from /usr/lib/kde3/libarkpart.so
#13 0xb6855d23 in ArkWidget::viewSlotExtractDone ()
   from /usr/lib/kde3/libarkpart.so
#14 0xb6859454 in ArkWidget::qt_invoke () from /usr/lib/kde3/libarkpart.so
#15 0xb73e6067 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#16 0xb73e6646 in QObject::activate_signal_bool () from /usr/lib/libqt-mt.so.3
#17 0xb683d9d4 in Arch::sigExtract () from /usr/lib/kde3/libarkpart.so
#18 0xb683c926 in Arch::slotExtractExited () from /usr/lib/kde3/libarkpart.so
#19 0xb683daa2 in Arch::qt_invoke () from /usr/lib/kde3/libarkpart.so
#20 0xb683554d in ZipArch::qt_invoke () from /usr/lib/kde3/libarkpart.so
#21 0xb73e6067 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#22 0xb7923ef9 in KProcess::processExited () from /usr/lib/libkdecore.so.4
#23 0xb7922c03 in KProcess::processHasExited () from /usr/lib/libkdecore.so.4
#24 0xb7924fd9 in KProcessController::slotDoHousekeeping ()
   from /usr/lib/libkdecore.so.4
#25 0xb79253dd in KProcessController::qt_invoke ()
   from /usr/lib/libkdecore.so.4
#26 0xb73e6067 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#27 0xb73e61be in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#28 0xb7701ee0 in QSocketNotifier::activated () from /usr/lib/libqt-mt.so.3
#29 0xb7401036 in QSocketNotifier::event () from /usr/lib/libqt-mt.so.3
#30 0xb738e370 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#31 0xb738d9d4 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#32 0xb78de960 in KApplication::notify () from /usr/lib/libkdecore.so.4
#33 0xb737ea10 in QEventLoop::activateSocketNotifiers ()
   from /usr/lib/libqt-mt.so.3
#34 0xb733a917 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#35 0xb739f74c in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#36 0xb739f60e in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#37 0xb738e57b in QApplication::exec () from /usr/lib/libqt-mt.so.3
#38 0xb69bde4a in kdemain () from /usr/lib/libkdeinit_ark.so
#39 0xb69db776 in kdeinitmain () from /usr/lib/kde3/ark.so
#40 0x0804cb6e in ?? ()
#41 0x00000008 in ?? ()
#42 0x080af1d8 in ?? ()
#43 0x00000001 in ?? ()
#44 0x00000000 in ?? ()
#45 0x00000000 in ?? ()
#46 0x0000007b in ?? ()
#47 0x00001f80 in ?? ()
#48 0x0000ffff in ?? ()
#49 0x00000000 in ?? ()
#50 0x00000000 in ?? ()
#51 0x00000000 in ?? ()
#52 0x00000000 in ?? ()
#53 0x00000000 in ?? ()
#54 0x00000000 in ?? ()
#55 0x00000000 in ?? ()
#56 0x00000000 in ?? ()
#57 0x00000000 in ?? ()
#58 0x00000000 in ?? ()
#59 0x00000000 in ?? ()
#60 0x00000000 in ?? ()
#61 0x00000000 in ?? ()
#62 0x00000000 in ?? ()
#63 0x00000000 in ?? ()
#64 0x00000000 in ?? ()
#65 0x0813d6a0 in ?? ()
#66 0x00000000 in ?? ()
#67 0x00000000 in ?? ()
#68 0x00000000 in ?? ()
#69 0x00000000 in ?? ()
#70 0x00000000 in ?? ()
#71 0x00000000 in ?? ()
#72 0x00000000 in ?? ()
#73 0xb7804ee0 in vtable for QGArray () from /usr/lib/libqt-mt.so.3
#74 0x00000000 in ?? ()
#75 0x00000000 in ?? ()
#76 0x00000000 in ?? ()
#77 0x00000000 in ?? ()
#78 0x80000000 in ?? ()
#79 0x00004010 in ?? ()
#80 0x00000000 in ?? ()
#81 0x0813c928 in ?? ()
#82 0x00000000 in ?? ()
#83 0x00000010 in ?? ()
#84 0xb7eae9e0 in __after_morecore_hook () from /lib/tls/i686/cmov/libc.so.6
#85 0xb7eae038 in ?? () from /lib/tls/i686/cmov/libc.so.6
#86 0xb7eae9e0 in __after_morecore_hook () from /lib/tls/i686/cmov/libc.so.6
#87 0x00000001 in ?? ()
#88 0xbffff738 in ?? ()
#89 0xb7df3b0b in malloc () from /lib/tls/i686/cmov/libc.so.6
#90 0x0804e046 in ?? ()
#91 0x00000008 in ?? ()
#92 0x0813d29c in ?? ()
#93 0x0813d2ee in ?? ()
#94 0x00000000 in ?? ()
#95 0x00000001 in ?? ()
#96 0x0813d2ff in ?? ()
#97 0x00000000 in ?? ()
#98 0x00000000 in ?? ()
#99 0x00000000 in ?? ()
#100 0x0813d303 in ?? ()
#101 0x00000000 in ?? ()
#102 0x00000000 in ?? ()
#103 0x00000000 in ?? ()
#104 0x00000000 in ?? ()
#105 0x00000000 in ?? ()
#106 0x00000000 in ?? ()
#107 0x00000000 in ?? ()
#108 0x0813d303 in ?? ()
#109 0x00000000 in ?? ()
#110 0x00000000 in ?? ()
#111 0x0813d2f2 in ?? ()
#112 0x00000001 in ?? ()
#113 0x00000000 in ?? ()
#114 0x0813d2a0 in ?? ()
#115 0x0813d29c in ?? ()
#116 0x00000008 in ?? ()
#117 0x0813d298 in ?? ()
#118 0x000037f3 in ?? ()
#119 0x00000004 in ?? ()
#120 0x00000004 in ?? ()
#121 0x0000000a in ?? ()
#122 0x0000009a in ?? ()
#123 0x080513d8 in vtable for QCString ()
#124 0x0813c930 in ?? ()
#125 0x00000000 in ?? ()
#126 0x00000000 in ?? ()
#127 0x080513d8 in vtable for QCString ()
#128 0x080af150 in ?? ()
#129 0x80cd0000 in ?? ()
#130 0x00000000 in ?? ()
#131 0xbffffb48 in ?? ()
#132 0xbffffa30 in ?? ()
#133 0xbffffab0 in ?? ()
#134 0x00000001 in ?? ()
#135 0xbffffa30 in ?? ()
#136 0x00001c92 in ?? ()
#137 0xbffffb48 in ?? ()
#138 0x0804e591 in ?? ()
#139 0x00000008 in ?? ()
#140 0xbffffab0 in ?? ()
#141 0xbffffa30 in ?? ()
#142 0xbffff9b0 in ?? ()
#143 0x00000000 in ?? ()
#144 0xbffff950 in ?? ()
#145 0xbffff8b8 in ?? ()
#146 0xb7f6ed13 in operator delete () from /usr/lib/libstdc++.so.5
Comment 3 Jonathan Riddell 2005-05-15 16:26:54 UTC
I can confirm this happens.  kpdf is the top viewer for PDFs.
Comment 4 Georg Robbers 2005-05-17 17:01:21 UTC
*** Bug 105822 has been marked as a duplicate of this bug. ***
Comment 5 Albert Astals Cid 2005-06-02 19:44:43 UTC
Any idea why this is categorized as a kpdf bug? i can not understand why, if both kpdf and konqueror can embed the kpdfpart and not ark wouldn't it be an ark bug?
Comment 6 Soenke Dohrn 2005-06-02 22:05:38 UTC
That's why I initiated the bug trace on ARK. Yet, I am not an expert though, not even plain newbie, so I can't say at all.
Comment 7 Henrique Pinto 2005-06-02 23:57:48 UTC
Albert: I couldn't reproduce the problem, nor find anything wrong in Ark's code to load the part (and, if there was a bug in it, i'd expect it to affect all parts, not only one, as the code is generic). As the backtrace suggests a crash in the KPDF part's constructor, I suspected it was a problem with KPDF.

If you don't see any problem in KPDF, feel free to close the report as WORKSFORME.
Comment 8 Albert Astals Cid 2005-06-03 00:07:22 UTC
I can not reproduce it either with kpdf and ark from trunk, are you sure the problem is embedding kpdf in ark and not that the file may be making kpdf crash?
Closing as worksforme as suggested by Henrique, please if you can, try svn trunk versions of both ark and kpdf and try to reproduce the bug. If you still can reopen this bug.
Comment 9 Omri Mezrich 2005-07-18 01:29:48 UTC
I can confirm, ark+kpdf from trunk. Ark either crashes or gets in an infinite loop.

The problem seems to be that both arkpart and kpdfpart define a singleton Settings class, with a static Settings::self(). When called from kpdfpart, I get to the Ark-defined method, basically getting a wrong pointer and reading junk.

Funny, this happens only when running standalone Ark. Opening a pdf from within ark embedded in, say, konqueror, works just fine. Then again, I never really understood dynamic linking, name resolving and such...

Originally I thought maybe because ark itself (the application) links to the settings class, but playing around with that didn't help.

This might be compiler dependent, as well? Which would explain why it works for some...

As a start, I´ll attach patches that change the names to ArkSettings and KPdfSettings, but perhaps a better solution should be sought?

http://bugs.kde.org/show_bug.cgi?id=107566 seems like a duplicate, perhaps...
Comment 10 Omri Mezrich 2005-07-18 01:32:11 UTC
Created attachment 11829 [details]
Settings to ArkSettings
Comment 11 Omri Mezrich 2005-07-18 01:33:05 UTC
Created attachment 11830 [details]
Settings to KPdfSettings
Comment 12 Albert Astals Cid 2005-07-18 01:38:54 UTC
Does applying that patches makes it not crash for you?
Comment 13 Omri Mezrich 2005-07-18 02:46:05 UTC
Yeah, fixes the crash for me.
Comment 14 Albert Astals Cid 2005-07-18 19:05:02 UTC
Ok, i've applied the KpdfSettings patch, i'll contact Henrique and tell him to have a look.
Comment 15 Albert Astals Cid 2005-07-18 19:16:32 UTC
*** Bug 107566 has been marked as a duplicate of this bug. ***