[Okular-devel] Review Request 118293: Make DocumentInfo not be XML based. Let users ask for only the keys they need.

Luigi Toscano luigi.toscano at tiscali.it
Tue Jun 17 22:59:15 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118293/#review60340
-----------------------------------------------------------


I tried the code and I found two issues

1) crash on document close/exit.

Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[KCrash Handler]
#5  deref (this=0x7f7080000068) at /usr/include/qt4/QtCore/qatomic_x86_64.h:133
#6  ~QMap (this=0x1c011c8, __in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qmap.h:185
#7  ~DocumentInfoPrivate (this=0x1c011c0, __in_chrg=<optimized out>) at /home/prova/kde-svn/git.kde.org/kde/kdegraphics/okular/core/document_p.h:274
#8  Okular::DocumentInfo::~DocumentInfo (this=0x1bf34a8, __in_chrg=<optimized out>) at /home/prova/kde-svn/git.kde.org/kde/kdegraphics/okular/core/document.cpp:4668
#9  0x00007f70e59dd4f4 in ~DocumentPrivate (this=0x1bf3310, __in_chrg=<optimized out>) at /home/prova/kde-svn/git.kde.org/kde/kdegraphics/okular/core/document_p.h:77
#10 Okular::Document::~Document (this=0x1be62f0, __in_chrg=<optimized out>) at /home/prova/kde-svn/git.kde.org/kde/kdegraphics/okular/core/document.cpp:2088
#11 0x00007f70e59dd899 in Okular::Document::~Document (this=0x1be62f0, __in_chrg=<optimized out>) at /home/prova/kde-svn/git.kde.org/kde/kdegraphics/okular/core/document.cpp:2089
#12 0x00007f70e5c9b565 in Okular::Part::~Part (this=0x1bba1a0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /home/prova/kde-svn/git.kde.org/kde/kdegraphics/okular/part.cpp:869
#13 0x00007f70e5c9b779 in Okular::Part::~Part (this=0x1bba1a0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /home/prova/kde-svn/git.kde.org/kde/kdegraphics/okular/part.cpp:880
#14 0x00007f70f4c93f98 in QObjectPrivate::deleteChildren() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#15 0x00007f70f5c124f7 in QWidget::~QWidget() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#16 0x00007f70f699d025 in KMainWindow::~KMainWindow (this=0x1b9d540, __in_chrg=<optimized out>) at /home/prova/kde-svn/git.kde.org/kde/kdelibs/kdeui/widgets/kmainwindow.cpp:467
#17 0x000000000040f519 in Shell::~Shell (this=0x1b9d540, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /home/prova/kde-svn/git.kde.org/kde/kdegraphics/okular/shell/shell.cpp:158
#18 0x000000000040f5b9 in Shell::~Shell (this=0x1b9d540, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /home/prova/kde-svn/git.kde.org/kde/kdegraphics/okular/shell/shell.cpp:170
#19 0x00007f70f4c95a88 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#20 0x00007f70f5c15d1b in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#21 0x00007f70f5fcce63 in QMainWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#22 0x00007f70f699e021 in KMainWindow::event (this=<optimized out>, ev=<optimized out>) at /home/prova/kde-svn/git.kde.org/kde/kdelibs/kdeui/widgets/kmainwindow.cpp:1084
#23 0x00007f70f69d59a9 in KXmlGuiWindow::event (this=0x1b9d540, ev=0x1be9fa0) at /home/prova/kde-svn/git.kde.org/kde/kdelibs/kdeui/xmlgui/kxmlguiwindow.cpp:126
#24 0x00007f70f5bc66cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#25 0x00007f70f5bcccfd in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#26 0x00007f70f68e983a in KApplication::notify (this=0x7fff178a5d80, receiver=0x1b9d540, event=0x1be9fa0) at /home/prova/kde-svn/git.kde.org/kde/kdelibs/kdeui/kernel/kapplication.cpp:311
#27 0x00007f70f4c7d41d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#28 0x00007f70f4c80a7d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#29 0x00007f70f4caad93 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#30 0x00007f70f0148e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f70f0149048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f70f01490ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007f70f4caa655 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#34 0x00007f70f5c647c6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#35 0x00007f70f4c7bfef in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#36 0x00007f70f4c7c2e5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#37 0x00007f70f4c81ab9 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#38 0x0000000000409436 in main (argc=<optimized out>, argv=<optimized out>) at /home/prova/kde-svn/git.kde.org/kde/kdegraphics/okular/shell/main.cpp:174




- Luigi Toscano


On May 24, 2014, 4:03 p.m., Albert Astals Cid wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118293/
> -----------------------------------------------------------
> 
> (Updated May 24, 2014, 4:03 p.m.)
> 
> 
> Review request for Okular.
> 
> 
> Repository: okular
> 
> 
> Description
> -------
> 
> DocumentInfo is now QMap based instead of XML based. Makes internal handling easier. The generators don't do any caching anymore since the Document was already doing caching, made no sense. Now we only ask for the keys we need (except the properties dialog) so the generators that are slow can decide to return only what was asked for. Some generators (i.e. unpluck, xps or the text based ones) will still return all the info since it's calculated on load time and it's not time consuming to return everything if we already have it.
> 
> 
> Diffs
> -----
> 
>   core/document.h 06bac8a 
>   core/document.cpp 504d07c 
>   core/document_p.h aabd192 
>   core/generator.h 506f8a8 
>   core/generator.cpp ec1d1f7 
>   core/script/kjs_document.cpp c3280cd 
>   core/textdocumentgenerator.h ec331d6 
>   core/textdocumentgenerator.cpp d598ccc 
>   generators/chm/generator_chm.h 5d97009 
>   generators/chm/generator_chm.cpp 84b9dde 
>   generators/djvu/generator_djvu.h 93ee4de 
>   generators/djvu/generator_djvu.cpp c506ce3 
>   generators/dvi/generator_dvi.h d7bf8fd 
>   generators/dvi/generator_dvi.cpp 0777af7 
>   generators/fax/generator_fax.h 1cb7d22 
>   generators/fax/generator_fax.cpp 38873ef 
>   generators/kimgio/generator_kimgio.h faebd85 
>   generators/plucker/generator_plucker.h 8dac4b8 
>   generators/plucker/generator_plucker.cpp 4ffdead 
>   generators/poppler/generator_pdf.h 1a34bb7 
>   generators/poppler/generator_pdf.cpp a363842 
>   generators/spectre/generator_ghostview.h ab9c33d 
>   generators/spectre/generator_ghostview.cpp 7b0146a 
>   generators/tiff/generator_tiff.h 9ad1de6 
>   generators/tiff/generator_tiff.cpp bc692de 
>   generators/xps/generator_xps.h 4c56e8c 
>   generators/xps/generator_xps.cpp 2399a96 
>   part.cpp 67440bd 
>   ui/presentationwidget.cpp 4aaec2a 
>   ui/propertiesdialog.cpp 485c2de 
> 
> Diff: https://git.reviewboard.kde.org/r/118293/diff/
> 
> 
> Testing
> -------
> 
> Opened a few files, works as it did. Added some extra debug, made sure that only the info we want is asked for, and that it's properly cached.
> 
> 
> Thanks,
> 
> Albert Astals Cid
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20140617/9965cce2/attachment.html>


More information about the Okular-devel mailing list