Re: seg fault on master

2015-07-06 Thread John Ralls

 On Jul 5, 2015, at 10:27 PM, John Ralls jra...@ceridwen.us wrote:
 
 
 On Jul 5, 2015, at 6:43 PM, Alex Aycinena alex.aycin...@gmail.com wrote:
 
 Program received signal SIGSEGV, Segmentation fault.
 0x72025cf2 in std::_Rb_treechar const*, std::pairchar const* 
 const, KvpValueImpl*, std::_Select1ststd::pairchar const* const, 
 KvpValueImpl* , KvpFrameImpl::cstring_comparer, 
 std::allocatorstd::pairchar const* const, KvpValueImpl*  
 ::_M_lower_bound (this=0x32069c0, __x=0x31, __y=0x3a286f8, 
__k=@0x7fffbda0: 0x33c16b8 Budgeting)
at /usr/include/c++/4.9.2/bits/stl_tree.h:1277
 
 This one is harder. I’ve found the cause, but it’s bedtime so I’ll have 
 figure out what to fix tomorrow. The fundamental problem is that when I call 
 “new KvpFrame” in sixtp-dom-parser.cpp, it’s allocating memory that libxml2 
 thinks belongs to it, so when the “data_for_children()” subtree is freed in 
 gnc_book_slots_end_handler(), the frame belonging to that KvpValue gets freed 
 and later overwritten by a call to g_log. When the optiondb tries to access 
 later, boom.

Alex,

Well, that was the wrong cause. The real one was that I didn’t delete the 
option slots the right way. That helped me notice that KvpFrameImpl needed a 
proper destructor. Both committed, book options work again.

Regards,
John Ralls
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: seg fault on master

2015-07-06 Thread Alex Aycinena
John,

On Mon, Jul 6, 2015 at 2:02 PM, John Ralls jra...@ceridwen.us wrote:


 Alex,

 Well, that was the wrong cause. The real one was that I didn’t delete the
 option slots the right way. That helped me notice that KvpFrameImpl needed
 a proper destructor. Both committed, book options work again.

 Regards,
 John Ralls



Well, make worked and when I installed it, the application started OK,
loaded a file OK, and the book options worked OK. But make check failedt:

make[6]: Entering directory
'/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/engine/test'
PASS: test-link
PASS: test-load-engine
PASS: test-guid
PASS: test-numeric
PASS: test-date
PASS: test-object
PASS: test-commodities
*** Error in
`/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/engine/test/.libs/lt-test-engine':
free(): invalid size: 0x0217ab40 ***
=== Backtrace: =
/lib64/libc.so.6(+0x77d9e)[0x7faecfaa2d9e]
/lib64/libc.so.6(cfree+0x5b5)[0x7faecfaae9f5]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(guid_free+0x30)[0x7faed270293e]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(_ZN14delete_visitorclIP8_gncGuidEEvRT_+0x1f)[0x7faed270e67d]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(_ZN5boost6detail7variant14invoke_visitorI14delete_visitorE14internal_visitIP8_gncGuidEEvRT_i+0x29)[0x7faed271b6d1]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(_ZN5boost6detail7variant27visitation_impl_invoke_implINS1_14invoke_visitorI14delete_visitorEEPvP8_gncGuidEENT_11result_typeEiRS9_T0_PT1_N4mpl_5bool_ILb1EEE+0x3a)[0x7faed27191a5]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(_ZN5boost6detail7variant22visitation_impl_invokeINS1_14invoke_visitorI14delete_visitorEEPvP8_gncGuidNS_7variantIld12_gnc_numericPKcS8_10timespec64P6_GListP12KvpFrameImpl6_GDateNS1_5void_ESJ_SJ_SJ_SJ_SJ_SJ_SJ_SJ_SJ_SJ_E18has_fallback_type_EEENT_11result_typeEiRSM_T0_PT1_T2_i+0x37)[0x7faed271609f]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(_ZN5boost6detail7variant15visitation_implIN4mpl_4int_ILi0EEENS1_20visitation_impl_stepINS_3mpl6l_iterINS7_6l_itemINS3_5long_ILl9EEElNS9_INSA_ILl8EEEdNS9_INSA_ILl7EEE12_gnc_numericNS9_INSA_ILl6EEEPKcNS9_INSA_ILl5EEEP8_gncGuidNS9_INSA_ILl4EEE10timespec64NS9_INSA_ILl3EEEP6_GListNS9_INSA_ILl2EEEP12KvpFrameImplNS9_INSA_ILl1EEE6_GDateNS7_5l_endENS8_ISV_NS1_14invoke_visitorI14delete_visitorEEPvNS_7variantIldSE_SH_SK_SM_SP_SS_SU_NS1_5void_ES1D_S1D_S1D_S1D_S1D_S1D_S1D_S1D_S1D_S1D_E18has_fallback_type_EEENT1_11result_typeEiiRS1G_T2_NS3_5bool_ILb0EEET3_PT_PT0_+0x137)[0x7faed2712908]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(_ZN5boost7variantIld12_gnc_numericPKcP8_gncGuid10timespec64P6_GListP12KvpFrameImpl6_GDateNS_6detail7variant5void_ESE_SE_SE_SE_SE_SE_SE_SE_SE_SE_E27internal_apply_visitor_implINSD_14invoke_visitorI14delete_visitorEEPvEENT_11result_typeEiiRSL_T0_+0x3b)[0x7faed2710e16]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(_ZN5boost7variantIld12_gnc_numericPKcP8_gncGuid10timespec64P6_GListP12KvpFrameImpl6_GDateNS_6detail7variant5void_ESE_SE_SE_SE_SE_SE_SE_SE_SE_SE_E22internal_apply_visitorINSD_14invoke_visitorI14delete_visitorNT_11result_typeERSK_+0x46)[0x7faed27104f8]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(_ZN5boost7variantIld12_gnc_numericPKcP8_gncGuid10timespec64P6_GListP12KvpFrameImpl6_GDateNS_6detail7variant5void_ESE_SE_SE_SE_SE_SE_SE_SE_SE_SE_E13apply_visitorI14delete_visitorEENT_11result_typeERSI_+0x36)[0x7faed270fab8]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(_ZN5boost13apply_visitorI14delete_visitorNS_7variantIld12_gnc_numericPKcP8_gncGuid10timespec64P6_GListP12KvpFrameImpl6_GDateNS_6detail7variant5void_ESG_SG_SG_SG_SG_SG_SG_SG_SG_SG_NT_11result_typeERSI_RT0_+0x23)[0x7faed270f2f3]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(_ZN12KvpValueImplD1Ev+0x2b)[0x7faed270e6df]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(+0x137df6)[0x7faed2705df6]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(+0x1397f7)[0x7faed27077f7]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(_ZN12KvpFrameImplD1Ev+0x3b)[0x7faed2705e43]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(+0x16107b)[0x7faed272f07b]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/libqof/qof/.libs/libgnc-qof.so.1(+0x16094a)[0x7faed272e94a]
/home/gnucash-dev/gitcheckouts/gnucash-clean-build/src/engine/.libs/libgncmod-engine.so(+0x7013a)[0x7faed20c513a]

Re: seg fault on master

2015-07-06 Thread John Ralls

 On Jul 6, 2015, at 5:08 PM, Alex Aycinena alex.aycin...@gmail.com wrote:
 
 John,
 
 On Mon, Jul 6, 2015 at 2:02 PM, John Ralls jra...@ceridwen.us wrote:
 
 Alex,
 
 Well, that was the wrong cause. The real one was that I didn’t delete the 
 option slots the right way. That helped me notice that KvpFrameImpl needed a 
 proper destructor. Both committed, book options work again.
 
 Regards,
 John Ralls
 
 
 Well, make worked and when I installed it, the application started OK, loaded 
 a file OK, and the book options worked OK. But make check failedt:
 

Yes, and there are no doubt others. Cleaning up the destructor blows up several 
cases where tests try to reuse frames without taking back ownership from the 
enclosing values. It’ll take a day or so to clean all of those up.

Regards,
John Ralls



___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel