Comment 7 for bug 1053616

Paul Menzel (pm-debian) wrote :

Here is the backtrace from my original report. `self-priv = NULL` causes the segmentation fault. Has that been addressed in more recent versions?

 Core was generated by `simple-scan'.
 Program terminated with signal 11, Segmentation fault.
 #0 page_view_page_size_changed_cb (p=<optimized out>, self=0x265a430) at page-view.c:4089
 4089 self->priv->update_image = TRUE;
 (gdb) l
 4084
 4085
 4086 static void page_view_page_size_changed_cb (PageView* self, Page* p) {
 4087 g_return_if_fail (self != NULL);
 4088 g_return_if_fail (p != NULL);
 → 4089 self->priv->update_image = TRUE;
 4090 g_signal_emit_by_name (self, "size-changed");
 4091 g_signal_emit_by_name (self, "changed");
 4092 }
 4093
 (gdb) bt f
 #0 page_view_page_size_changed_cb (p=<optimized out>, self=0x265a430) at page-view.c:4089
 No locals.
 #1 _page_view_page_size_changed_cb_page_size_changed (_sender=<optimized out>, self=0x265a430) at page-view.c:224
 No locals.
 #2 0x00007ffb85d766e0 in g_closure_invoke (closure=0x2622200, return_value=0x0, n_param_values=1, param_values=0x7fff47dbab00,
     invocation_hint=0x7fff47dbaaa0) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c:777
  marshal = 0x40d470 <g_cclosure_marshal_VOID__VOID@plt>
  marshal_data = 0x0
  in_marshal = 0
  real_closure = 0x26221e0
  __PRETTY_FUNCTION__ = "g_closure_invoke"
 #3 0x00007ffb85d87750 in signal_emit_unlocked_R (node=node@entry=0x23c6760, detail=detail@entry=0, instance=instance@entry=0x265a4c0,
     emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fff47dbab00)
     at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3551
  tmp = <optimized out>
  handler = 0x222be70
  accumulator = 0x0
  emission = {next = 0x7fff47dbb0b0, instance = 0x265a4c0, ihint = {signal_id = 243, detail = 0, run_type = G_SIGNAL_RUN_FIRST},
    state = EMISSION_RUN, chain_type = 4}
  class_closure = 0x0
  hlist = 0x2658d00
  handler_list = 0x2658d00
  return_accu = 0x0
  accu = {g_type = 0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0,
        v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0,
        v_double = 0, v_pointer = 0x0}}}
  signal_id = 243
  max_sequential_handler_number = 4079
  return_value_altered = 1
 #4 0x00007ffb85d8f6bc in g_signal_emit_valist (instance=instance@entry=0x265a4c0, signal_id=signal_id@entry=243, detail=detail@entry=0,
     var_args=var_args@entry=0x7fff47dbad98) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3300
  instance_and_params = 0x7fff47dbab00
  signal_return_type = 4
  param_values = 0x7fff47dbab18
  node = 0x23c6760
  i = <optimized out>
  n_params = 0
  __PRETTY_FUNCTION__ = "g_signal_emit_valist"
 #5 0x00007ffb85d8fd60 in g_signal_emit_by_name (instance=instance@entry=0x265a4c0,
     detailed_signal=detailed_signal@entry=0x42e94a "size-changed") at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3393
  var_args = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7fff47dbaed0, reg_save_area = 0x7fff47dbade0}}
  detail = 0
  signal_id = 243
  __PRETTY_FUNCTION__ = "g_signal_emit_by_name"
 #6 0x0000000000413ef8 in page_set_page_info (self=self@entry=0x265a4c0, info=info@entry=0x24d7240) at page.c:410
  _tmp0_ = 0x24d7240
  _tmp1_ = <optimized out>
  _tmp2_ = 0x24d7240
  _tmp3_ = <optimized out>
  _tmp4_ = 0x24d7240
  _tmp5_ = <optimized out>
  _tmp6_ = 0x24d7240
  _tmp7_ = <optimized out>
  _tmp8_ = <optimized out>
  _tmp11_ = <optimized out>
  _tmp13_ = <optimized out>
  _tmp14_ = <optimized out>
  _tmp15_ = <optimized out>
  _tmp16_ = <optimized out>
  _tmp17_ = <optimized out>
  _tmp18_ = <optimized out>
  _tmp19_ = 8606250
  _tmp20_ = <optimized out>
  _tmp20__length1 = <optimized out>
  _tmp21_ = <optimized out>
  __PRETTY_FUNCTION__ = "page_set_page_info"
 #7 0x000000000041a4e7 in application_scanner_page_info_cb (info=<optimized out>, scanner=<optimized out>, self=<optimized out>)
     at simple-scan.c:1154
  _tmp1_ = <optimized out>
  _tmp4_ = 0x24d7240
  _tmp7_ = 0x24d7240
  _tmp11_ = <optimized out>
  _tmp5_ = <optimized out>
  _tmp2_ = 0x24d7240
  page = 0x265a4c0
  _tmp8_ = <optimized out>
  _tmp3_ = <optimized out>
  _tmp6_ = 0x265a4c0
  _tmp9_ = <optimized out>
  _tmp10_ = 0x0
  _tmp0_ = 0x24d7240
 #8 _application_scanner_page_info_cb_scanner_got_page_info (_sender=<optimized out>, info=0x24d7240, self=<optimized out>)
     at simple-scan.c:459
 No locals.
 #9 0x00007ffb85d766e0 in g_closure_invoke (closure=0x23ccb60, return_value=0x0, n_param_values=2, param_values=0x7fff47dbb120,
     invocation_hint=0x7fff47dbb0c0) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c:777
  marshal = 0x41e980 <g_cclosure_user_marshal_VOID__SCAN_PAGE_INFO>
  marshal_data = 0x0
  in_marshal = 0
  real_closure = 0x23ccb40
  __PRETTY_FUNCTION__ = "g_closure_invoke"
 #10 0x00007ffb85d87750 in signal_emit_unlocked_R (node=node@entry=0x23cb5c0, detail=detail@entry=0, instance=instance@entry=0x237b3e0,
     emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fff47dbb120)
     at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3551
  tmp = <optimized out>
  handler = 0x23cb160
  accumulator = 0x0
  emission = {next = 0x0, instance = 0x237b3e0, ihint = {signal_id = 252, detail = 0, run_type = G_SIGNAL_RUN_FIRST},
    state = EMISSION_RUN, chain_type = 4}
  class_closure = 0x0
  hlist = 0x23cb160
  handler_list = 0x23cb160
  return_accu = 0x0
  accu = {g_type = 0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0,
        v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0,
        v_double = 0, v_pointer = 0x0}}}
  signal_id = 252
  max_sequential_handler_number = 4079
  return_value_altered = 0
 #11 0x00007ffb85d8f6bc in g_signal_emit_valist (instance=instance@entry=0x237b3e0, signal_id=signal_id@entry=252, detail=detail@entry=0,
     var_args=var_args@entry=0x7fff47dbb3c8) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3300
  instance_and_params = 0x7fff47dbb120
  signal_return_type = 4
  param_values = 0x7fff47dbb138
  node = 0x23cb5c0
  i = <optimized out>
  n_params = 1
  __PRETTY_FUNCTION__ = "g_signal_emit_valist"
 #12 0x00007ffb85d8fd60 in g_signal_emit_by_name (instance=0x237b3e0, detailed_signal=0x43049e "got-page-info")
     at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3393
  var_args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7fff47dbb500, reg_save_area = 0x7fff47dbb410}}
  detail = 0
  signal_id = 252
  __PRETTY_FUNCTION__ = "g_signal_emit_by_name"
 #13 0x0000000000421b51 in scanner_notify_idle_cb (self=0x237b3e0) at scanner.c:3108
  _tmp1_ = 0x2709d20
  _tmp0_ = <optimized out>
  notification = 0x2709d20
 #14 _scanner_notify_idle_cb_gsource_func (self=0x237b3e0) at scanner.c:3122
 No locals.
 #15 0x00007ffb85ab7355 in g_main_dispatch (context=0x2219b90) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:2539
  dispatch = 0x7ffb85ab5070 <g_idle_dispatch>
  was_in_call = 0
  user_data = 0x237b3e0
  callback = 0x421b20 <_scanner_notify_idle_cb_gsource_func>
  cb_funcs = 0x7ffb85d639c0
  cb_data = 0x7ffb78692e00
  current_source_link = {data = 0x7ffb7826bd90, next = 0x0}
  need_destroy = <optimized out>
  source = 0x7ffb7826bd90
  current = 0x23e43c0
  i = <optimized out>
 #16 g_main_context_dispatch (context=context@entry=0x2219b90) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:3075
 No locals.
 #17 0x00007ffb85ab7688 in g_main_context_iterate (context=0x2219b90, block=block@entry=1, dispatch=dispatch@entry=1,
     self=<error reading variable: Unhandled dwarf expression opcode 0xfa>) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:3146
  max_priority = 2147483647
  timeout = 144
  some_ready = 1
  nfds = <optimized out>
  allocated_nfds = <optimized out>
  fds = 0x26ec740
 #18 0x00007ffb85ab7a82 in g_main_loop_run (loop=0x2468770) at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:3340
  __PRETTY_FUNCTION__ = "g_main_loop_run"
 #19 0x00007ffb870433b5 in gtk_main () at /tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkmain.c:1161
  loop = 0x2468770
 #20 0x000000000041c6b5 in application_main (args=0x7fff47dbb748, args_length1=1) at simple-scan.c:2440
  result = 0
  _tmp0_ = <optimized out>
  _tmp1_ = 0x2218570
  c = 0x2218570
  _tmp2_ = 0x2218570
  _tmp3_ = 0x2218570
  _tmp4_ = <optimized out>
  _tmp14_ = <optimized out>
  _tmp16_ = <optimized out>
  device = 0x0
  _tmp29_ = <optimized out>
  _tmp29__length1 = <optimized out>
  _tmp39_ = <optimized out>
  _tmp40_ = <optimized out>
  _tmp41_ = <optimized out>
  path = 0x22188c0 "/home/paul/.cache/simple-scan/simple-scan.log"
  _tmp42_ = <optimized out>
  _tmp43_ = <optimized out>
  _tmp44_ = 0x22188c0 "/home/paul/.cache/simple-scan/simple-scan.log"
  _tmp45_ = 0x22188c0 "/home/paul/.cache/simple-scan/simple-scan.log"
  _tmp46_ = <optimized out>
  _tmp47_ = <optimized out>
  _tmp48_ = 0x0
  _tmp49_ = 0x21f6000
  app = 0x21f6000
  _tmp50_ = 0x21f6000
  _inner_error_ = 0x0
 #21 0x00007ffb84bfaead in __libc_start_main (main=<optimized out>, argc=<optimized out>, ubp_av=<optimized out>, init=<optimized out>,
     fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff47dbb738) at libc-start.c:228
  result = <optimized out>
  unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -1426006794154566420, 4250432, 140734398969664, 0, 0, 1426306099471949036,
          1423919368694111468}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x42db60, 0x7fff47dbb748}, data = {prev = 0x0,
        cleanup = 0x0, canceltype = 4381536}}}
  not_first_call = <optimized out>
 #22 0x000000000040db69 in _start ()
 (gdb) p* self
 $1 = {parent_instance = {g_class = 0x22590e0}, ref_count = 1, priv = 0x0}