Menu

#1235 Internal PDF viewer crashes when including specific .eps file as graphic

None
fixed
nobody
None
3
2017-12-17
2015-02-11
No

Using TeXstudio 2.8.8 on Windows 7 x64 (full details:
TeXstudio 2.8.8 (hg 4828+:0a999280f5cb+)
Using Qt Version 5.3.1, compiled with Qt 5.3.1 R
)

Including a specific fairly large .eps file causes the internal PDF viewer to crash. This displays OK in Adobe PDF reader.

I've attached the bare minimum test case - compiling this .tex and viewing the result will cause TeXstudio to crash. Let me know if there is more details I can provide.

1 Attachments

Related

Bugs: #1724

Discussion

  • Benito van der Zander

    Poppler kills it because some memory check fails:

    if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
        fprintf(stderr, "Bogus memory allocation size\n");
         ...
         exit(1);
            }
    }
    

    Stacktrace is

        #9  0x00007ffff4db7935 in exit () from /lib64/libc.so.6
        #10 0x00007ffff4a9ccee in greallocn () from /usr/lib64/libpoppler.so.25
        #11 0x00007ffff4acc8b8 in SplashXPathScanner::addIntersection(double, double, unsigned int, int, int, int) () from /usr/lib64/libpoppler.so.25
        #12 0x00007ffff4acd25a in SplashXPathScanner::computeIntersections() () from /usr/lib64/libpoppler.so.25
        #13 0x00007ffff4acd72b in SplashXPathScanner::SplashXPathScanner(SplashXPath*, bool, int, int) () from /usr/lib64/libpoppler.so.25
        #14 0x00007ffff4ab327c in Splash::fillWithPattern(SplashPath*, bool, SplashPattern*, double) () from /usr/lib64/libpoppler.so.25
        #15 0x00007ffff4ac1b1d in Splash::strokeWide(SplashPath*, double) () from /usr/lib64/libpoppler.so.25
        #16 0x00007ffff4ac1ea5 in Splash::stroke(SplashPath*) () from /usr/lib64/libpoppler.so.25
        #17 0x00007ffff49e43bc in SplashOutputDev::stroke(GfxState*) () from /usr/lib64/libpoppler.so.25
        #18 0x00007ffff4a26e73 in Gfx::opStroke(Object*, int) () from /usr/lib64/libpoppler.so.25
        #19 0x00007ffff4a228d4 in Gfx::go(bool) () from /usr/lib64/libpoppler.so.25
        #20 0x00007ffff4a22d40 in Gfx::display(Object*, bool) () from /usr/lib64/libpoppler.so.25
        #21 0x00007ffff4a230ec in Gfx::drawForm(Object*, Dict*, double*, double*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) () from /usr/lib64/libpoppler.so.25
        #22 0x00007ffff4a2409d in Gfx::doForm(Object*) () from /usr/lib64/libpoppler.so.25
        #23 0x00007ffff4a26b93 in Gfx::opXObject(Object*, int) () from /usr/lib64/libpoppler.so.25
        #24 0x00007ffff4a228d4 in Gfx::go(bool) () from /usr/lib64/libpoppler.so.25
        #25 0x00007ffff4a22d40 in Gfx::display(Object*, bool) () from /usr/lib64/libpoppler.so.25
        #26 0x00007ffff4a62e54 in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*) () from /usr/lib64/libpoppler.so.25
        #27 0x00007ffff7991bb1 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation) const () from /usr/lib64/libpoppler-qt4.so.4
        #28 0x00000000007ac757 in PDFRenderEngine::run() ()
    
     
  • Colin O'Flynn

    Colin O'Flynn - 2015-02-11

    Thanks for the quick note!

    Should I move the bug report to the Poppler library then it sounds like? The specific .eps file is vector source, so it might have too many paths or similar causing some memory error.

     
  • Tim Hoffmann

    Tim Hoffmann - 2015-02-11

    Probably. The only issue is that we are not using the newest version of poppler on win (0.24.5) because it's quite complicated to get it compiled there.

    @Benito: I assume you checked on Linux: Which poppler version were you using?

     
  • Benito van der Zander

    Even older: 0.20.0-2.13.1

     
  • Benito van der Zander

    Should I move the bug report to the Poppler library then it sounds like?

    Probably.

    They probably need the arguments for the call of renderToImage: xres = 384, yres = 384, x = -1, y = -1, w = -1, h = -1, rotate = Poppler::Page::Rotate0

    @Benito: I assume you checked on Linux: Which poppler version were you using?

    With 0.24.5-4 it happens, too

     
  • Tim Hoffmann

    Tim Hoffmann - 2015-05-16

    Crash still present in poppler 0.32.0

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2016-03-14

    rendering is slow, but does not crash on linux (anymore?).

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2016-03-14
    • status: open --> works-for-me
    • Group: -->
     
  • Colin O'Flynn

    Colin O'Flynn - 2016-03-14

    I'm away from Linux box to check with latest build (reliant on Windows build right now), but it used to very reliably crash with that test-case, so if it works for you I'd call that fixed!

     
  • Tim Hoffmann

    Tim Hoffmann - 2016-03-15

    Still crashes on windows when zooming into the pdf. When there's time, I'll update to a newer poppler version. Let's see then if this is fixed.

     
  • Tim Hoffmann

    Tim Hoffmann - 2016-03-15
    • status: works-for-me --> open
     
  • Tim Hoffmann

    Tim Hoffmann - 2016-03-22

    Crash still present in poppler 0.39.0

     
  • Tim Hoffmann

    Tim Hoffmann - 2016-06-11
    • status: open --> pending
     
  • Jonas Stein

    Jonas Stein - 2017-07-20

    Could not reproduce this. The .tex file compiled and the .pdf was visible. Texstudio was compiled with the following dependencies:

     * dependency graph for app-office/texstudio-2.12.4
     `--  app-office/texstudio-2.12.4  ~amd64 
       `--  app-text/hunspell-1.6.1-r1  (app-text/hunspell) amd64 
       `--  app-text/poppler-0.56.0  (app-text/poppler) ~amd64  [qt5]
       `--  dev-libs/quazip-0.7.2-r1  (>=dev-libs/quazip-0.7.2) ~amd64  [qt5]
       `--  dev-qt/designer-5.7.1  (dev-qt/designer) ~amd64 
       `--  dev-qt/qtcore-5.7.1-r3  (dev-qt/qtcore) ~amd64 
       `--  dev-qt/qtconcurrent-5.7.1  (dev-qt/qtconcurrent) ~amd64 
       `--  dev-qt/qtgui-5.7.1-r1  (dev-qt/qtgui) ~amd64 
       `--  dev-qt/qtnetwork-5.7.1  (dev-qt/qtnetwork) ~amd64 
       `--  dev-qt/qtprintsupport-5.7.1  (dev-qt/qtprintsupport) ~amd64 
       `--  dev-qt/qtscript-5.7.1  (dev-qt/qtscript) ~amd64 
       `--  dev-qt/qtsingleapplication-2.6.1_p20150629  (dev-qt/qtsingleapplication) amd64  [qt5 X]
       `--  dev-qt/qtsvg-5.7.1  (dev-qt/qtsvg) ~amd64 
       `--  dev-qt/qttest-5.7.1  (dev-qt/qttest) ~amd64 
       `--  dev-qt/qtwidgets-5.7.1  (dev-qt/qtwidgets) ~amd64 
       `--  dev-qt/qtxml-5.7.1  (dev-qt/qtxml) ~amd64 
       `--  sys-libs/zlib-1.2.11  (sys-libs/zlib) amd64 
       `--  x11-libs/libX11-1.6.5  (x11-libs/libX11) amd64 
       `--  x11-libs/libXext-1.3.3  (x11-libs/libXext) amd64 
       `--  media-libs/phonon-4.9.1-r1  (media-libs/phonon) amd64  [qt5]
       `--  virtual/pkgconfig-0-r1  (virtual/pkgconfig) amd64 
       `--  sys-apps/sed-4.2.2  (>=sys-apps/sed-4) amd64 
       `--  app-text/ghostscript-gpl-9.21  (app-text/ghostscript-gpl) ~amd64 
       `--  app-text/psutils-1.17-r3  (app-text/psutils) amd64 
       `--  media-libs/netpbm-10.70.00  (media-libs/netpbm) amd64 
       `--  virtual/latex-base-1.0  (virtual/latex-base) amd64 
    [ app-office/texstudio-2.12.4 stats: packages (26), max depth (1) ]
    
     
  • Tim Hoffmann

    Tim Hoffmann - 2017-12-17
    • status: pending --> fixed
     

Log in to post a comment.