GnuCash
Contact   Instructions
Bug 797550 - Crash when changing tab bar position while 'Open register in new window' is set
Summary: Crash when changing tab bar position while 'Open register in new window' is set
Status: VERIFIED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: General (show other bugs)
Version: 3.8
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: general
QA Contact: general
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-02 15:04 EST by Adrien
Modified: 2020-06-24 18:22 EDT (History)
4 users (show)

See Also:


Attachments
Crash Report (17.47 KB, text/plain)
2020-01-02 15:04 EST, Adrien
no flags Details

Description Adrien 2020-01-02 15:04:02 EST
Created attachment 373511 [details]
Crash Report

I was testing a crash condition pointed out by Stan Brown in this list thread:

https://lists.gnucash.org/pipermail/gnucash-user/2020-January/088503.html

I set the option to 'Open register in new window', then opened a register. I realized I had my tabs on the left already and wasn't testing Stan's workflow exactly, so I closed the extra window and tried to move them to the top. Then GnuCash crashed.

So the original tab bar position or having a currently open additional window doesn't matter. What seems to be the trigger so far is having the preference set with a register having been opened in a new window first and then trying to move the tab bar position.

I've also tried to see if I can crash it without having first opened a register in a separate window, but nothing happened. I can move the tab bar at will.

Steps to repeat:

1. Set Preferences > Register Defaults > Other Defaults > Open register in new window
2. Open a register
3. Change location of tab bar in Preferences > Windows > Tab position

I thought I had seen a bug some time ago about something similar but can't seem to find anything similar. Apologies if this is a dupe. Note that Stan is using 2.6.19, so it has been around for some time.
Comment 1 Bob 2020-01-03 07:34:24 EST
Tried this on my Linux VM and could not get it fail as described. I can get it to fail if after opening a register in a new window and I close it and then change the tab position. This is because the call backs are still connected for a non existent window which is fixed in master.

Looking at the crash report, gnc_main_window_update_tab_position is mentioned, ( not sure what the +215 refers to) but there is not a lot going on for it but it does rely on a valid GncMainWindow so maybe just protect the function with...

g_return_if_fail (GNC_IS_MAIN_WINDOW(user_data));
Comment 2 Bob 2020-01-09 10:22:14 EST
OK, I have pushed this change to maint and will be in version 3.9, I am not totally convinced this will fix this bug as I can not reproduce on my Linux VM or Windows but as stated above it does fix the issue if the window is closed as mentioned above.

Please test when 3.9 comes out and report back.
Comment 3 Adrien 2020-06-24 18:12:42 EDT
Sorry I didn't get to test with 3.9.

I can confirm this is fixed in 3.906 however. Both windows change the tab bar position per the preference.

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