This is a stress book. It has: * customers in USD AUD GBP * bank acc in USD AUD GBP * AR acc in USD AUD GBP * income acc in AUD I am creating invoices in multiple commodities. I create a new invoice for the customer GBP. The invoice detail dropdown for "Income Account" shows Income-AUD and then spikes to 100% CPU leading to out-of-memory. This does not consistently happen. In anycase the GBP customer shouldn't allow AUD Income accounts in the drop down shouldn't it?
Created attachment 373306 [details] test business book with multicommodity customers
*** Bug 797289 has been marked as a duplicate of this bug. ***
I tried three times on MacOS, no problem any time. On what OS did you test on and how often do you get the crash?
Ubuntu 19.04. The UI would become unresponsive then top indicates heavy memory spike. Can't always reproduce. My assumption invoice currency = income currency isn't correct; an exchange-rate does get called for invoice<->foreign transfer. Ok I've reproduced on maint: - create new book - open business / customers / customer-overview - create new customer default currency - create new invoice using same customer - enter minimal data and click Income dropdown - freeze ^C then backtrace from gdb, if this helps #0 0x00007ffff6caa729 in __GI___poll (fds=0x555555911410, nfds=3, timeout=9591) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007ffff7c70cb6 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007ffff7c71042 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007ffff7769e75 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 #4 0x00007ffff7251a28 in gnc_ui_start_event_loop () at /home/chris/sources/gnucash/maint/gnucash/gnome-utils/gnc-gnome-utils.c:671 #5 0x000055555555b031 in inner_main (closure=0x0, argc=1, argv=0x7fffffffdfb8) at /home/chris/sources/gnucash/maint/gnucash/gnucash-bin.c:680 #6 0x00007ffff7d98f0d in () at /usr/lib/x86_64-linux-gnu/libguile-2.2.so.1 #7 0x00007ffff7d7b7ea in () at /usr/lib/x86_64-linux-gnu/libguile-2.2.so.1 #8 0x00007ffff7df9f3f in () at /usr/lib/x86_64-linux-gnu/libguile-2.2.so.1 #9 0x00007ffff7dff78f in scm_call_n () at /usr/lib/x86_64-linux-gnu/libguile-2.2.so.1 #10 0x00007ffff7dee184 in () at /usr/lib/x86_64-linux-gnu/libguile-2.2.so.1 #11 0x00007ffff7d7bdd0 in () at /usr/lib/x86_64-linux-gnu/libguile-2.2.so.1 #12 0x00007ffff7d7be65 in scm_c_with_continuation_barrier () at /usr/lib/x86_64-linux-gnu/libguile-2.2.so.1 #13 0x00007ffff7decd96 in () at /usr/lib/x86_64-linux-gnu/libguile-2.2.so.1 #14 0x00007ffff62d1ca5 in GC_call_with_stack_base () at /usr/lib/x86_64-linux-gnu/libgc.so.1 #15 0x00007ffff7ded128 in scm_with_guile () at /usr/lib/x86_64-linux-gnu/libguile-2.2.so.1 #16 0x00007ffff7d990a2 in scm_boot_guile () at /usr/lib/x86_64-linux-gnu/libguile-2.2.so.1 #17 0x000055555555b55d in main (argc=1, argv=0x7fffffffdfb8) at /home/chris/sources/gnucash/maint/gnucash/gnucash-bin.c:938
That backtrace doesn't reflect unresponsive, it reflects waiting for input from a modal dialog box. Maybe it's hidden behind another window.
No other window that I can see unfortunately
*** Bug 797314 has been marked as a duplicate of this bug. ***
My mistake, it's the main loop. It's just sitting there waiting for an event. Is this still a problem with a recent build?
Still happens using the exact steps in comment 4 from a brand new book. Any other tool I can use to assist?
or, what's the widget used for the account dropdown?
To clarify: the steps above -- clicking the income drop-down in the invoice editor-- cause the drop-down icon to "pressed" state without any drop-down items (because there are no income accounts yet). Gnucash CPU usage jumps to 50%. On clicking the activated drop-down icon to deactivate it, the CPU usage reverts to low.
(In reply to Christopher Lam from comment #10) > or, what's the widget used for the account dropdown? gnucash/register/register-gnome/combocell-gnome.c (In reply to Christopher Lam from comment #9) > Still happens using the exact steps in comment 4 from a brand new book. Any > other tool I can use to assist? A profiler, but Linux doesn't have anything that's reasonably usable AFAIK. I just tried on Fedora33, the list appeared instantly. (In reply to Christopher Lam from comment #11) > To clarify: the steps above -- clicking the income drop-down in the invoice > editor-- cause the drop-down icon to "pressed" state without any drop-down > items (because there are no income accounts yet). Gnucash CPU usage jumps to > 50%. > > On clicking the activated drop-down icon to deactivate it, the CPU usage > reverts to low. Ah, that explains why the list appeared instantly: I used a template with income accounts. What template are you using?
As comment4, an empty book:)
Oh! I took empty to mean no transactions, not no accounts.
Interesting. I don't see any evidence of a freeze, the UI responds instantly when I poke something. However, when run under the profiler one can see the CPU load going from 0 to ~70% when the account list is "displayed" and back to 0 when it's concealed. It doesn't do that when there are accounts matching the filter, so possibly the search function that's trying to fill the combo doesn't know how to terminate when there's nothing to find.
Should we close this as dup of 797621 since that's where the patches landed?
*** This bug has been marked as a duplicate of bug 797621 ***