Bug 389216 - Export Markdown to PDF segfaults
Summary: Export Markdown to PDF segfaults
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.3.1
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 389344 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-01-19 17:59 UTC by adarmalik
Modified: 2018-04-06 11:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description adarmalik 2018-01-19 17:59:34 UTC
I have a markdown file open and want to export it to PDF. Okular crashes with a segfault:

kernel: okular[32020]: segfault at 300000000 ip 00007f9aa1d26411 sp 00007ffcc5c2bf10 error 4 in libOkular5Core.so.8.0.0[7f9aa1ca6000+eb000]

Also the menu seems to be "one off". When I click export to html it opens a filechooser and suggests the fileending ".odt". It still will export to html though.
Comment 1 Albert Astals Cid 2018-01-21 21:31:24 UTC
> Also the menu seems to be "one off". When I click export to html it opens a filechooser and suggests the fileending ".odt". It still will export to html though.

I don't know what that means, but since it obviously has nothing to do with "Export Markdown to PDF segfaults", open a new bug.
Comment 2 Albert Astals Cid 2018-01-21 21:47:00 UTC
Doesn't crash here, can you provide a better backtrace?
Comment 3 adarmalik 2018-01-22 16:43:21 UTC
(In reply to Albert Astals Cid from comment #2)
> Doesn't crash here, can you provide a better backtrace?

I installed debug symbols and got this from gdb:

#0  Okular::ExportFormat::mimeType (this=0x300000000) at /workspace/build/core/generator.cpp:667                                                                                                                  
#1  0x00007fffdad28657 in Okular::Part::slotExportAs (this=0x6ecc10, act=<optimized out>) at /workspace/build/part.cpp:3113                                                                                       
#2  0x00007ffff47f45a6 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5                                                                                     
#3  0x00007ffff592af12 in QMenu::triggered(QAction*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5                                                                                                         
#4  0x00007ffff592e341 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5                                                                                                                                 
#5  0x00007ffff59378e9 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5                                                                                                                                 
#6  0x00007ffff47f4279 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5                                                                                     
#7  0x00007ffff57aa6a2 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5                                                                                                           
#8  0x00007ffff57acdb0 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5                                                                                            
#9  0x00007ffff57ad37f in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5                                                                                                                                 
#10 0x00007ffff47f4279 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5                                                                                     
#11 0x00007fffe4f02655 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so                                                                                               
#12 0x00007fffe4f11bca in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so                                                                                               
#13 0x00007fffe4f12268 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so                                                                                               
#14 0x00007ffff4ca8683 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5                                                                                                                                    
#15 0x00007ffff4cad0f8 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5                                                                                                                                    
#16 0x00007ffff4cad84b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5                                                                                                                                    
#17 0x00007ffff4cb010e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5                                                                                                                                    
#18 0x00007ffff47f52b9 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5                                                                                                               
#19 0x00007ffff57b0b9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5                                                                              
#20 0x00007ffff57b85a7 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5                                                                                            
#21 0x00007ffff47c7df8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5                                                                                  
#22 0x00007ffff47ca5db in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5                                                                
#23 0x00007ffff481e0a3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5                                                                                                                                    
#24 0x00007fffeed45197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0                                                                                                                  
#25 0x00007fffeed453f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007fffeed4549c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007ffff481d6af in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007ffff47c5e2a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007ffff47ced64 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x000000000040c1a5 in main (argc=1, argv=<optimized out>) at /workspace/build/shell/main.cpp:83

Does it help?
Comment 4 Albert Astals Cid 2018-01-22 23:39:19 UTC
Yes, and now the comment about html make sense too, it's the same problem, no need to open a new bug, sorry i misunderstood.
Comment 5 Albert Astals Cid 2018-01-22 23:39:53 UTC
Git commit 4a80d3f963b9acf901ed98db7f24fd354e8e986f by Albert Astals Cid.
Committed on 22/01/2018 at 23:37.
Pushed by aacid into branch 'Applications/17.12'.

Fix crash when exporting

We had a off by one from when we removed the document archive option from the export menu.

M  +1    -1    part.cpp

https://commits.kde.org/okular/4a80d3f963b9acf901ed98db7f24fd354e8e986f
Comment 6 adarmalik 2018-01-23 13:48:55 UTC
*** Bug 389344 has been marked as a duplicate of this bug. ***