Sick and tired of broken match layouts
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
8 posts
• Page 1 of 1
Sick and tired of broken match layouts
by Max mtg » 03 Jun 2013, 20:34
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
Please teach people to use these, add that to release notes.
Found under Game Settings -> Preferences -> Troubleshooting
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Sick and tired of broken match layouts
by Chris H. » 03 Jun 2013, 21:42
- 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.
-

Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Sick and tired of broken match layouts
by moomarc » 03 Jun 2013, 21:45
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?
-Marc
-

moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Sick and tired of broken match layouts
by Max mtg » 03 Jun 2013, 22:00
Won't Forge start at all because of a corrupt layout?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?
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.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Sick and tired of broken match layouts
by Max mtg » 03 Jun 2013, 23:01
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.
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.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Sick and tired of broken match layouts
by moomarc » 04 Jun 2013, 05:37
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.
-Marc
-

moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Sick and tired of broken match layouts
by jeffwadsworth » 04 Jun 2013, 16:37
I have seen it many times and it drove me bonkers. Finally a fix.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Sick and tired of broken match layouts
by Max mtg » 21 Jun 2013, 01:10
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)
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)
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 19 guests