Segfault when loading file on master

Matthew Forbis matthewdavidforbis1982 at yahoo.com
Sat Feb 25 13:32:16 EST 2017


I have compiled master and came across a segfault when loading my normal file that works fine on 2.6.15.  It happens during the loading of the file.  It looks like possibly the code no longer handles a / in certain places in the file.  I traced it to this section in my gnucash file (I cut it down to just show the tree in questions, out I can send more if needed).  If I removed the slot in section, the file loads just find.  The stack trace from the crash is at the end of the email. If this makes more sense to create a bug report out of, please let me know and I will do that.


Thanks,
Matt


<gnc:account version="2.0.0">
  <act:name>Capital One</act:name>
  <act:id type="guid">cb2525c09fbe0f791e01b4caa0fff869</act:id>
  <act:type>CREDIT</act:type>
  <act:commodity>
    <cmdty:space>ISO4217</cmdty:space>
    <cmdty:id>USD</cmdty:id>
  </act:commodity>
  <act:commodity-scu>100</act:commodity-scu>
  <act:slots>
    <slot>
      <slot:key>color</slot:key>
      <slot:value type="string">Not Set</slot:value>
    </slot>
    <slot>
      <slot:key>import-map-bayes</slot:key><slot>

           <slot:value type="frame">

           <slot>
          <slot:key>/</slot:key>
          <slot:value type="frame">
            <slot>
              <slot:key>Expenses:Vacation</slot:key>
              <slot:value type="integer">2</slot:value>
            </slot>
          </slot:value>
        </slot>


Thread 1 "gnucash" received signal SIGSEGV, Segmentation fault.
0x00007ffff12f32ab in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
   from /lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) st
Ambiguous command "st": stack, start, status, step, stepi, stepping, stop, strace.
(gdb) bt
#0  0x00007ffff12f32ab in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
   from /lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007ffff670380c in KvpFrameImpl::set (this=0x555558236820, 
    path=std::vector of length 0, capacity 0, value=0x555557be9190)
    at kvp_frame.cpp:128
#2  0x00007ffff6703579 in KvpFrameImpl::set (this=0x555558236820, 
    key=0x555557be90d0 "/", value=0x555557be9190) at kvp_frame.cpp:91
#3  0x00007ffff21200ba in dom_tree_to_kvp_frame_given (node=0x555557e467a0, 
    frame=0x555558236820) at sixtp-dom-parsers.cpp:443
#4  0x00007ffff2120161 in dom_tree_to_kvp_frame (node=0x555557e467a0)
    at sixtp-dom-parsers.cpp:465
#5  0x00007ffff211fe67 in dom_tree_to_frame_kvp_value (node=0x555557e467a0)
    at sixtp-dom-parsers.cpp:339
#6  0x00007ffff211ff43 in dom_tree_to_kvp_value (node=0x555557e467a0)
    at sixtp-dom-parsers.cpp:391
#7  0x00007ffff2120083 in dom_tree_to_kvp_frame_given (node=0x555557f822c0, 
    frame=0x555557f1f840) at sixtp-dom-parsers.cpp:429
#8  0x00007ffff21201cd in dom_tree_create_instance_slots (node=0x555557f822c0, 
    inst=0x555558012900) at sixtp-dom-parsers.cpp:476
#9  0x00007ffff20f594a in account_slots_handler (node=0x555557f822c0, 
    act_pdata=0x7fffffffb020) at gnc-account-xml-v2.cpp:365
#10 0x00007ffff2120ca1 in gnc_xml_set_data (tag=0x555557f85c90 "act:slots", 
    node=0x555557f822c0, item=0x7fffffffb020, 
    handlers=0x7ffff2342de0 <account_handlers_v2+192>)
    at sixtp-dom-parsers.cpp:858
#11 0x00007ffff2120d97 in dom_tree_generic_parse (node=0x555557f83cb0, 
    handlers=0x7ffff2342d20 <account_handlers_v2>, data=0x7fffffffb020)
    at sixtp-dom-parsers.cpp:889
#12 0x00007ffff20f5d2c in dom_tree_to_account (node=0x555557f83cb0, 
    book=0x555557c61880) at gnc-account-xml-v2.cpp:540
#13 0x00007ffff20f5c23 in gnc_account_end_handler (
    data_for_children=0x555557f83cb0, data_from_children=0x0, 
    sibling_data=0x555557c8fc30, parent_data=0x0, global_data=0x7fffffffb420, 
    result=0x555557c95fc0, tag=0x555557f9cf20 "gnc:account")
    at gnc-account-xml-v2.cpp:491
#14 0x00007ffff2123b44 in sixtp_sax_end_handler (user_data=0x555557c01c40, 
    name=0x555557c68e03 "gnc:account") at sixtp.cpp:539
#15 0x00007ffff1d43df5 in ?? () from /lib/x86_64-linux-gnu/libxml2.so.2
#16 0x00007ffff1d4ce3b in xmlParseElement ()
   from /lib/x86_64-linux-gnu/libxml2.so.2
#17 0x00007ffff1d4c0e2 in xmlParseContent ()
   from /lib/x86_64-linux-gnu/libxml2.so.2
#18 0x00007ffff1d4ca33 in xmlParseElement ()
   from /lib/x86_64-linux-gnu/libxml2.so.2
---Type <return> to continue, or q <return> to quit---
#19 0x00007ffff1d4c0e2 in xmlParseContent ()
   from /lib/x86_64-linux-gnu/libxml2.so.2
#20 0x00007ffff1d4ca33 in xmlParseElement ()
   from /lib/x86_64-linux-gnu/libxml2.so.2
#21 0x00007ffff1d4d3bb in xmlParseDocument ()
   from /lib/x86_64-linux-gnu/libxml2.so.2
#22 0x00007ffff2124009 in sixtp_parse_file_common (sixtp=0x555557bf5430, 
    xml_context=0x555557ce8a60, data_for_top_level=0x0, 
    global_data=0x7fffffffb420, parse_result=0x7fffffffb438) at sixtp.cpp:717
#23 0x00007ffff21241c3 in sixtp_parse_fd (sixtp=0x555557bf5430, 
    fd=0x555557c01800, data_for_top_level=0x0, global_data=0x7fffffffb420, 
    parse_result=0x7fffffffb438) at sixtp.cpp:793
#24 0x00007ffff210a820 in gnc_xml_parse_fd (top_parser=0x555557bf5430, 
    fd=0x555557c01800, 
    callback=0x7ffff2110dad <generic_callback(char const*, gpointer, gpointer)>, parsedata=0x555557c0c320, bookdata=0x555557c61880) at io-gncxml-gen.cpp:60
#25 0x00007ffff21115d1 in qof_session_load_from_xml_file_v2_full (xml_be=
    0x555557c7e800, book=0x555557c61880, push_handler=0x0, push_user_data=0x0, 
    type=GNC_BOOK_XML2_FILE) at io-gncxml-v2.cpp:809
#26 0x00007ffff2111840 in qof_session_load_from_xml_file_v2 (
    xml_be=0x555557c7e800, book=0x555557c61880, type=GNC_BOOK_XML2_FILE)
    at io-gncxml-v2.cpp:871
#27 0x00007ffff2107399 in GncXmlBackend::load (this=0x555557c7e800, 
    book=0x555557c61880, loadType=LOAD_TYPE_INITIAL_LOAD)
    at gnc-xml-backend.cpp:252
#28 0x00007ffff67391df in QofSessionImpl::load (this=0x555557e45570, 
    percentage_func=0x7ffff7468689 <gnc_window_show_progress>)
    at qofsession.cpp:229
#29 0x00007ffff673a92d in qof_session_load (session=0x555557e45570, 
    percentage_func=0x7ffff7468689 <gnc_window_show_progress>)
    at qofsession.cpp:630
#30 0x00007ffff73fb4cc in gnc_post_file_open (
    filename=0x555557e44bc0 "file:///home/mdforbis/Accounting.gnucash", 
    is_readonly=0) at gnc-file.c:873
#31 0x00007ffff73fb96c in gnc_file_open_file (
    newfile=0x555557e44bc0 "file:///home/mdforbis/Accounting.gnucash", 
    open_readonly=0) at gnc-file.c:1068
#32 0x00007ffff73c58c6 in gnc_ui_file_access_response_cb (
    dialog=0x555557db90a0, response=-5, unused=0x0) at dialog-file-access.c:147
#33 0x00007ffff73c575c in gnc_ui_file_access_file_activated_cb (
    chooser=0x555557d13230, faw=0x555557db3370) at dialog-file-access.c:109
#34 0x00007ffff3c80f75 in g_closure_invoke ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#35 0x00007ffff3c92f82 in ?? () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#36 0x00007ffff3c9bbcc in g_signal_emit_valist ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#37 0x00007ffff3c9c45b in g_signal_emit_by_name ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#38 0x00007ffff3c80f75 in g_closure_invoke ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#39 0x00007ffff3c92f82 in ?? () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#40 0x00007ffff3c9bbcc in g_signal_emit_valist ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#41 0x00007ffff3c9c45b in g_signal_emit_by_name ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#42 0x00007ffff53baea1 in ?? () from /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#43 0x00007ffff3c80f75 in g_closure_invoke ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#44 0x00007ffff3c92f82 in ?? () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#45 0x00007ffff3c9bbcc in g_signal_emit_valist ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#46 0x00007ffff3c9bfaf in g_signal_emit ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#47 0x00007ffff550acd9 in ?? () from /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#48 0x00007ffff540b7bc in ?? () from /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#49 0x00007ffff3c80f75 in g_closure_invoke ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#50 0x00007ffff3c9337d in ?? () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#51 0x00007ffff3c9b66f in g_signal_emit_valist ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#52 0x00007ffff3c9bfaf in g_signal_emit ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#53 0x00007ffff55238ac in ?? () from /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#54 0x00007ffff5409f84 in gtk_propagate_event ()
   from /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#55 0x00007ffff540a33b in gtk_main_do_event ()
   from /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#56 0x00007ffff507fcbc in ?? () from /lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#57 0x00007ffff39a77f7 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#58 0x00007ffff39a7a60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#59 0x00007ffff39a7d82 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#60 0x00007ffff54093b7 in gtk_main ()
   from /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#61 0x00007ffff740153a in gnc_ui_start_event_loop () at gnc-gnome-utils.c:622
#62 0x0000555555559ec7 in inner_main (closure=0x0, argc=1, argv=0x7fffffffe2b8)
    at gnucash-bin.c:671
#63 0x00007ffff6043dd3 in ?? () from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#64 0x00007ffff600fadc in ?? () from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#65 0x00007ffff60bfe36 in ?? () from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#66 0x00007ffff6091ca0 in ?? () from /lib/x86_64-linux-gnu/libguile-2.0.so.22
---Type <return> to continue, or q <return> to quit---
#67 0x00007ffff60ca4f3 in ?? () from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#68 0x00007ffff60eaf08 in ?? () from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#69 0x00007ffff601a5ab in scm_call_4 ()
   from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#70 0x00007ffff60bfc8c in scm_catch_with_pre_unwind_handler ()
   from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#71 0x00007ffff60bff0e in scm_c_catch ()
   from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#72 0x00007ffff600f92b in ?? () from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#73 0x00007ffff600fbf4 in scm_c_with_continuation_barrier ()
   from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#74 0x00007ffff60bcbea in ?? () from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#75 0x00007ffff5d443c2 in GC_call_with_stack_base ()
   from /lib/x86_64-linux-gnu/libgc.so.1
#76 0x00007ffff60bccd3 in ?? () from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#77 0x00007ffff60bcd13 in scm_with_guile ()
   from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#78 0x00007ffff6043d64 in scm_boot_guile ()
   from /lib/x86_64-linux-gnu/libguile-2.0.so.22
#79 0x000055555555a347 in main (argc=1, argv=0x7fffffffe2b8)
    at gnucash-bin.c:826


More information about the gnucash-devel mailing list