After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796256 - Main Window stays hidden when starting after closing main window while minimized
Main Window stays hidden when starting after closing main window while minimized
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: User Interface General
3.1
Other Windows
: Normal normal
: future
Assigned To: gnucash-ui-maint
gnucash-ui-maint
: 796473 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2018-05-19 09:04 UTC by Chris Good
Modified: 2018-06-30 00:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Original Bad .gcm (1.74 KB, application/octet-stream)
2018-05-19 09:04 UTC, Chris Good
Details
2nd .gcm created by GnuCash which also causes hidden main window (6.88 KB, text/plain)
2018-05-19 09:09 UTC, Chris Good
Details

Description Chris Good 2018-05-19 09:04:02 UTC
Created attachment 372209 [details]
Original Bad .gcm

Windows 10 1803.
While testing 3.1-3 Version: 3.1 Build ID: 3.0-118-gd2ef5fd0f+ (2018-04-28) for bug 795347 (Australian (GMT+10) OFX transactions imported have previous days date), I found when starting GnuCash that after it finishes loading user data and the splash screen disappears, the main windows remains hidden and I cannot get it to display.

Testing showed that after renaming the .gcm file, it would display again.
However, after I slightly modified the columns showing in the Accounts tab, exited GnuCash so new .gcm was created, and restarted GnuCash, same problem recurred. Please see attached .gcm files.
Note that somewhere along the way of testing various versions of 3.0/3.1, it seems most (all?) of the additional columns I usually show in the Accounts tab have been turned off.
Comment 1 Chris Good 2018-05-19 09:09:10 UTC
Created attachment 372210 [details]
2nd .gcm created by GnuCash which also causes hidden main window

This is the .gcm which was created by GnuCash after GnuCash was started without a .gcm file, and columns in Accounts tab were slightly modified.
Upon restarting GnuCash, this .gcm also causes the main window to stay hidden.
Comment 2 Geert Janssens 2018-05-19 09:43:28 UTC
Odd. Something causes the saved window position to become negative by a large amount (-32000).

Can you try to adjust the two -32000 values to something like 50 and see if the gcm file then works normally ? That is only as a workaround of course. We need to figure out where the negative setting comes from.
Comment 3 Chris Good 2018-05-19 21:30:41 UTC
Hi Geert,
Changing both the -32000 values to 50 enables the window to show.
I've done some testing adjusting the columns in the Accounts tab but have not been able to duplicate the problem. I'll restore data file and .gcm back to pre 3.0 and test the conversion.
Comment 4 Chris Good 2018-05-20 04:38:21 UTC
Unfortunately I cannot reproduce this error at will. There seems to be no problem with the conversion from 2.6.16 to 3.1-3.
Positioning the window with the left edge off the screen works OK and it doesn't seem possible to get the top of the screen above the top as it always repositions so that it is at the top.

I did get the error with WindowPosition=-32000;-32000; once but I was testing something else at the time (not the conversion from a lower version) and cannot reproduce.

I did see that WindowPosition=-9;-9; when exiting GnuCash when maximized which seems strange.
Comment 5 Chris Good 2018-05-25 01:24:21 UTC
Happened again today. Changing both the -32000 values to 50 enables the window to show. Maybe it is something to do with a window being put in front of GnuCash at some time critical time as I remember this time I was doing something else while it was starting but I cannot reproduce, even after restoring .gcm back to exactly how it was after last GnuCash session.

Maybe you could just change -32000 values to 50 when loading .gcm?
Comment 6 Geert Janssens 2018-05-25 15:52:14 UTC
I seem to read somewhere -32000 is used as window coordinates when a windows is hidden. I don't find that back right now.

Was this window minimized when you closed gnucash ?

Or it may be a timing issue on quitting here on quitting gtk hides the window before we can save its state.

But correcting improbable values when loading is certainly a practical workaround in code.
Comment 7 Chris Good 2018-05-26 05:34:15 UTC
Hi Geert, Bingo! You're right. I can replicate the problem by closing the window using right click on the app in the task bar when it is minimised.
[Book].gnucash.gcm is changed to:
WindowPosition=-32000;-32000;

There is WindowMaximized=true|false in the [Windows 1] section but no WindowMinimized=true|false, so I guess something is using -32000;-32000 to indicate minimized instead of recording the real position which is still valid even if minimized.

Maybe code should be changed to set WindowPosition=0;0; on loading .gcm
if WindowPosition=-32000;-32000; ? I have tested 0,0 works.
Comment 8 John Ralls 2018-05-26 14:23:31 UTC
I'd think it better that the code that changes the WindowPosition should check for -32000,-32000 and do nothing in that case, saving the WindowPosition from when the window was last displayed.
Comment 9 John Ralls 2018-05-31 15:21:45 UTC
*** Bug 796473 has been marked as a duplicate of this bug. ***
Comment 10 Bob 2018-06-01 08:25:45 UTC
I will have a go at this if no one is working on this...
Comment 11 Bob 2018-06-03 08:22:22 UTC
Hopefully fixed in PR 359
Comment 12 John Ralls 2018-06-03 18:34:47 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.
Comment 13 Chris Good 2018-06-03 22:04:13 UTC
Thanks very much Bob, John And Geert.
I have found a link that shows this problem has existed since at least 2009:
https://stackoverflow.com/questions/1478765/location-coordinates-on-computer-showing-x-32000-y-32000
Comment 14 John Ralls 2018-06-30 00:10:33 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=796256. Please update any external references or bookmarks.