Bug 22339 - Crash at getScreenSize()
Summary: Crash at getScreenSize()
Status: RESOLVED NOTOURBUG
Alias: None
Product: poppler
Classification: Unclassified
Component: splash backend (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high blocker
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-17 15:10 UTC by Mario Noriega
Modified: 2009-06-17 15:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Code to try to convert a PDF file into a PNM file. (4.76 KB, text/plain)
2009-06-17 15:10 UTC, Mario Noriega
Details

Description Mario Noriega 2009-06-17 15:10:54 UTC
Created attachment 26898 [details]
Code to try to convert a PDF file into a PNM file.

I've attached my code snippet to try to convert a PDF file into a PNM file. And here's the GDB backtrace when it crashes:

===========================================================================
START OF BACKTRACE
===========================================================================
Program received signal SIGSEGV, Segmentation fault.
0xb78e1e24 in pthread_mutex_lock () from /lib/tls/libpthread.so.0
(gdb) bt
#0  0xb78e1e24 in pthread_mutex_lock () from /lib/tls/libpthread.so.0
#1  0xb7bebba6 in pthread_mutex_lock () from /lib/tls/libc.so.6
#2  0xb7e1908b in GlobalParams::getScreenSize (this=0x0) at GlobalParams.cc:1404
#3  0xb7db7883 in SplashOutputDev::setupScreenParams (this=0x80527f0, hDPI=72, vDPI=72) at SplashOutputDev.cc:631
#4  0xb7dbc37b in SplashOutputDev (this=0x80527f0, colorModeA=splashModeRGB8, bitmapRowPadA=0, reverseVideoA=0, paperColorA=0xbff924e8 "���",
    bitmapTopDownA=1, allowAntialiasA=0) at SplashOutputDev.cc:607
#5  0x080490c2 in main (argc=1886216563, argv=0x702e656c) at test.cpp:64
(gdb)
===========================================================================
END OF BACKTRACE
===========================================================================
Comment 1 Albert Astals Cid 2009-06-17 15:17:50 UTC
You need two things:
 a) Learn to read backtraces ;-) It's not crashing at getScreenSize, it's crashing because it's calling getScreenSize over a null GlobalParams
 b) Create your global GlobalParams object like all poppler core using programs do.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.