GnuCash
Contact   Instructions
Bug 797169 - GnuCash hangs loading XML file
Summary: GnuCash hangs loading XML file
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Backend - XML (show other bugs)
Version: 3.5
Hardware: PC All
: Normal normal
Target Milestone: ---
Assignee: core
QA Contact: core
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-02 18:29 EDT by Juraj Svec
Modified: 2019-04-03 10:16 EDT (History)
3 users (show)

See Also:


Attachments
Patch (523 bytes, text/plain)
2019-04-02 18:29 EDT, Juraj Svec
jralls: committed+
Details

Description Juraj Svec 2019-04-02 18:29:29 EDT
Created attachment 373232 [details]
Patch

When loading XML file GnuCash hangs in g_hash_table_destroy.
This is caused by gxi_ambiguous_info_destroy not setting data->ambiguous_ht variable to NULL.
Comment 1 John Ralls 2019-04-02 19:57:45 EDT
Good catch, thanks. Your patch is committed. I'm surprised that it hung instead of crashing.
Comment 2 Juraj Svec 2019-04-03 01:31:43 EDT
(In reply to John Ralls from comment #1)
> Good catch, thanks. Your patch is committed. I'm surprised that it hung
> instead of crashing.

I think it was hang in some cases and crash in others.
When in hangs it spins in g_hash_table_resize:

  * frame #0: 0x0000000100470c9c libglib-2.0.0.dylib`g_hash_table_resize + 268
    frame #1: 0x0000000100470030 libglib-2.0.0.dylib`g_hash_table_maybe_resize + 112
    frame #2: 0x000000010046f6f4 libglib-2.0.0.dylib`g_hash_table_remove_all + 116
    frame #3: 0x000000010046f669 libglib-2.0.0.dylib`g_hash_table_destroy + 73
    frame #4: 0x000000010345cf80 libgncmod-gnome-utils.dylib`gxi_ambiguous_info_destroy(data=0x00000001070694e0) at assistant-xml-encoding.c:535
Comment 3 John Ralls 2019-04-03 10:16:08 EDT
Ah, probably on a second call where the memory now points to something else entirely.

Note You need to log in before you can comment on or make changes to this bug.