Page 1 of 1

Sick and tired of broken match layouts

PostPosted: 03 Jun 2013, 20:34
by Max mtg
I have implemented 2 buttons to reset match and editor layout.

Please teach people to use these, add that to release notes.
Found under Game Settings -> Preferences -> Troubleshooting

Re: Sick and tired of broken match layouts

PostPosted: 03 Jun 2013, 21:42
by Chris H.
- Match and Deck Editor Layout problems -
The match and deck editor windows contain panels that can be moved and or resized. The changes that you make are saved to files that are named "editor.xml" and "match.xml". These files can be found in your userDir/preferences/ directory.

Sometimes people will decide that they do not like the changes that they made and wish to go back to the original layout.

These "editor.xml" and "match.xml" files at times can become corrupted. You may notice one or more panels/tabs are missing from the match and/or deck editor windows. Or Forge may crash when a match is started or when the deck editor is displayed. When this happens you will notice a crash report that starts with the following lines:

java.lang.NullPointerException
at forge.gui.framework.SLayoutIO.loadLayout(SLayoutIO.java:153)
at forge.gui.match.VMatchUI.populate(VMatchUI.java:57)

You can solve either of the two problems stated above by finding the "editor.xml" and/or "match.xml" files and then deleting them. Or you can go to the Game Settings -> Preferences -> Troubleshooting section. You will find at this location two buttons that will reset the match layout and the deck editor layouts.

Re: Sick and tired of broken match layouts

PostPosted: 03 Jun 2013, 21:45
by moomarc
Thanks Max! This is long overdue! There's still going to be an issue when forge won't start at all because of a corrupt layout. So is there any way to detect that crash and run the layout reset automatically? Alternatively, would it be viable/possible to make a Stanton alone cleanup utility that would be packaged with Forge releases?

Re: Sick and tired of broken match layouts

PostPosted: 03 Jun 2013, 22:00
by Max mtg
moomarc wrote:Thanks Max! This is long overdue! There's still going to be an issue when forge won't start at all because of a corrupt layout. So is there any way to detect that crash and run the layout reset automatically? Alternatively, would it be viable/possible to make a Stanton alone cleanup utility that would be packaged with Forge releases?
Won't Forge start at all because of a corrupt layout?

Never seen that. Is there a stack trace for that case?
They used to report black screens at match start (exception in worker thread), the very exceptions starting match or deck editor.


Yes, it's generally possible to detect the problem related to match layout. Surround with try-catch a block of code in FControl, and suggest layout reset under catch, the try again the layout. Let me do it now.

Re: Sick and tired of broken match layouts

PostPosted: 03 Jun 2013, 23:01
by Max mtg
Commited r21938-21940.
Now we need someone to test it on.
(this addresses only match start issues)

Chris, the actual notes should read (not literally) "if you have ui-related problems starting a match or opening editor, go to Home -> Game Settings -> Preferences -> Troubleshooting, press a button to reset corresponding layout"

These 'find and delete file' are too complicated.

Re: Sick and tired of broken match layouts

PostPosted: 04 Jun 2013, 05:37
by moomarc
Thanks again Max. The corrupt layout files is actually something I've never experienced myself, but occasionally a post will say that Forge won't start. So maybe I was just taking it too literally and they just meant that the match wouldn't start. Anyway, the catch block should still make life easier for those users that don't recognize the error and don't read the release notes.

Re: Sick and tired of broken match layouts

PostPosted: 04 Jun 2013, 16:37
by jeffwadsworth
I have seen it many times and it drove me bonkers. Finally a fix.

Re: Sick and tired of broken match layouts

PostPosted: 21 Jun 2013, 01:10
by Max mtg
Looking at first page of parent forum, I applied the same fix to deck editor layouts.
Hope players will be able to handle this sort of problems right from the game. (since they no longer complain on problems with match layout)