Bug 11023

Summary: Crash with on assert index < poppler_document_get_n_pages
Product: poppler Reporter: Nickolay V. Shmyrev <nshmyrev>
Component: glib frontendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: carlosgc
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch that fixes the crash

Description Nickolay V. Shmyrev 2007-05-21 13:19:03 UTC
(gdb) thread apply all  bt

Thread 2 (Thread -1210688624 (LWP 2297)):
#0  0x00c75402 in ?? ()
#1  0x00416cbb in __waitpid_nocancel () from /lib/libpthread.so.0
#2  0x0581ea46 in gnome_gtk_module_info_get () from /usr/lib/libgnomeui-2.so.0
#3  <signal handler called>
#4  dest_new_goto (document=0x0, link_dest=0x83fb130) at ../poppler/Page.h:121
#5  0x00475527 in _poppler_action_new (document=0x834ab50, link=0x8260e60, 
    title=0x0) at poppler-action.cc:332
#6  0x0047a0b3 in poppler_page_get_link_mapping (page=0x83465c0)
    at poppler-page.cc:975
#7  0x0809d76b in pdf_document_links_get_links (document_links=0x832e340, 
    page=0) at ev-poppler.cc:1077
#8  0x0809a41a in ev_document_links_get_links (document_links=0x832e340, 
    page=0) at ev-document-links.c:77
#9  0x08066ee1 in ev_job_render_run (job=0x8310a60) at ev-jobs.c:330
#10 0x080657b9 in handle_job (job=0x8310a60) at ev-job-queue.c:133
#11 0x08065d2c in ev_render_thread (data=0x0) at ev-job-queue.c:255
#12 0x0078549f in g_thread_create_proxy (data=0x81e30d8) at gthread.c:591
#13 0x0040f3db in start_thread () from /lib/libpthread.so.0
#14 0x0036906e in clone () from /lib/libc.so.6

Thread 1 (Thread -1208322336 (LWP 2296)):
---Type <return> to continue, or q <return> to quit---
#0  0x00c75402 in ?? ()
#1  0x0041598e in __lll_mutex_lock_wait () from /lib/libpthread.so.0
#2  0x004117fc in _L_mutex_lock_85 () from /lib/libpthread.so.0
#3  0x0041133d in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x08098f36 in ev_document_fc_mutex_lock () at ev-document.c:105
#5  0x08078a8a in draw_loading_text (view=0x830b030, page_area=0xbffd2a60, 
    expose_area=Variable "expose_area" is not available.
) at ev-view.c:2825
#6  0x08079760 in ev_view_expose_event (widget=0x830b030, event=0xbffd3014)
    at ev-view.c:2963
#7  0x077fcc40 in _gtk_marshal_BOOLEAN__BOXED (closure=0x81d8ce8, 
    return_value=0xbffd2c40, n_param_values=2, param_values=0xbffd2d1c, 
    invocation_hint=0xbffd2c2c, marshal_data=0x8078be0) at gtkmarshalers.c:84
#8  0x007e4589 in g_type_class_meta_marshal (closure=0x81d8ce8, 
    return_value=0xbffd2c40, n_param_values=2, param_values=0xbffd2d1c, 
    invocation_hint=0xbffd2c2c, marshal_data=0xc8) at gclosure.c:567
#9  0x007e5d9b in IA__g_closure_invoke (closure=0x81d8ce8, 
    return_value=0xbffd2c40, n_param_values=2, param_values=0xbffd2d1c, 
    invocation_hint=0xbffd2c2c) at gclosure.c:490
#10 0x007f6a83 in signal_emit_unlocked_R (node=0x81d8c78, detail=0, 
    instance=0x830b030, emission_return=0xbffd2edc, 
    instance_and_params=0xbffd2d1c) at gsignal.c:2478
#11 0x007f771f in IA__g_signal_emit_valist (instance=0x830b030, signal_id=58, 
    detail=0, var_args=Variable "var_args" is not available.
) at gsignal.c:2209
---Type <return> to continue, or q <return> to quit---
#12 0x007f7b19 in IA__g_signal_emit (instance=0x830b030, signal_id=58, 
    detail=0) at gsignal.c:2243
#13 0x07911b48 in gtk_widget_event_internal (widget=0x830b030, 
    event=0xbffd3014) at gtkwidget.c:3915
#14 0x077f7424 in IA__gtk_main_do_event (event=0xbffd3014) at gtkmain.c:1533
#15 0x0098d65f in gdk_window_process_updates_internal (window=0x8328730)
    at gdkwindow.c:2338
#16 0x0098d897 in IA__gdk_window_process_all_updates () at gdkwindow.c:2401
#17 0x077666c2 in gtk_container_idle_sizer (data=0x0) at gtkcontainer.c:1113
#18 0x007658c1 in g_idle_dispatch (source=0x82f0950, 
    callback=0x7766670 <gtk_container_idle_sizer>, user_data=0x0)
    at gmain.c:3928
#19 0x00767622 in IA__g_main_context_dispatch (context=0x81cddd0)
    at gmain.c:2045
#20 0x0076a5ff in g_main_context_iterate (context=0x81cddd0, block=1, 
    dispatch=1, self=0x81aa670) at gmain.c:2677
#21 0x0076a9a9 in IA__g_main_loop_run (loop=0x81d80f8) at gmain.c:2881
#22 0x077f7684 in IA__gtk_main () at gtkmain.c:1154
#23 0x0808af20 in main (argc=2, argv=Cannot access memory at address 0x4
) at main.c:361
(gdb) q

** (evince:2406): WARNING **: Unimplemented action: POPPLER_ACTION_UNKNOWN, please post a bug report with a testcase.
(00:13:30) nsh: (evince:2406): Poppler-CRITICAL **: int poppler_document_get_n_pages(PopplerDocument*): assertion `POPPLER_IS_DOCUMENT (document)' failed
(00:13:30) nsh: (evince:2406): Poppler-CRITICAL **: PopplerPage* poppler_document_get_page(PopplerDocument*, int): assertion `0 <= index && index < poppler_document_get_n_pages (document)' failed
Comment 1 Carlos Garcia Campos 2007-05-21 13:55:53 UTC
Created attachment 10063 [details] [review]
Patch that fixes the crash

Ups, that's my fault indeed. This patch fixes it. Sorry.
Comment 2 Albert Astals Cid 2007-05-21 14:42:21 UTC
it's in

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.