It is currently 24 May 2025, 14:43
   
Text Size

Bug Reports (snapshot builds)

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Bug Reports (snapshot builds)

Postby friarsol » 08 Mar 2013, 01:57

r20163
Just played a Quest game where after Sideboarding (where I didn't even sideboard anything). The Input is stuck on Combat Damage phase instead of prompting me to mulligan. I had to use Dev mode to add a card to play to get the Combat Damage prompt to be cleared out so it would show me the InputMulligan.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 08 Mar 2013, 02:43

r20163

Is Flash working for anyone else? I activate it on a creature I can't afford (full well knowing it'll be sacrificed), but I never get a "pay this cost" input. Flash still appears to be on the Stack and I don't seem to be able to actually do anything. The Input that's displayed still shows me the Phase and State I was in before that.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Bug Reports (snapshot builds)

Postby RumbleBBU » 08 Mar 2013, 10:20

Problem: general slowness during a match.

(This might not be very new since I hadn't checked out the latest svn for a while until today - but it's fairly new anyway, at least it wasn't in the 1.3.8 beta.)

The problem seems to be somehow related to the auto-updating/scrolling log pane.

This is how it happens (to me):
In the middle of a phase, typically the combat phases (especially when there's something on the stack), the Log pane empties itself. Then, after a loooooooooooooooooooooooong pause, it starts filling itself again. Then it empties itself again and repeats the whole slow process again. And again. And again. Wait, wait, wait. What's up?

How bad is it? Well, the log phenomenon is currently going on in my game. It started updating when I started writing this message. It isn't done yet.

Even worse, I hit Space reflexively to skip through phases when it looks like a phase is finished, and then press Space again if the phase didn't change - resulting in several excess Space presses in the buffer that resolve when the log-updating is finished, causing me to skip my next main phase, and so on.

I'm afraid this makes the game totally unplayable on at least this particular computer (2 years old WXP laptop, 3GB RAM), and the other computers I have are even older.

Addendum: Well, I've written the complete message now. And that single combat still isn't over!

Epilogue: After 30 minutes of a single game in a single match, I gave up. I killed the process in Eclipse. Going back to the last 'working' version of Forge. :(
User avatar
RumbleBBU
 
Posts: 394
Joined: 18 Aug 2012, 04:24
Has thanked: 29 times
Been thanked: 66 times

Re: Bug Reports (snapshot builds)

Postby swordshine » 08 Mar 2013, 14:19

r20178
The game hanged when I was playing multiplayer mode and AI started first.
Edit: Also happened in a second game when I started a random constructed game. It showed a "OK" button when the game started but did not ask if you want to mulligan.
Last edited by swordshine on 08 Mar 2013, 14:34, edited 1 time in total.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Bug Reports (snapshot builds)

Postby Chris H. » 08 Mar 2013, 14:32

RumbleBBU wrote:Problem: general slowness during a match.
 
Using today's snapshot build and it runs fine on my several year old computer.

Can you try the Eclipse -> Project -> Clean... command and see it it helps?
User avatar
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: Bug Reports (snapshot builds)

Postby Max mtg » 08 Mar 2013, 16:12

I know how to generate high CPU load in a match - you should just move mouse over cards in battlefield - note how CPU load rises at that time!


Have also wrapped isGameOver into a syncronized block. That should start second match correctlty after sideboarding
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: Bug Reports (snapshot builds)

Postby Agetian » 08 Mar 2013, 18:33

For some reason, in duels between matches I have to click the OK button to get to the question about whether I want to mulligan or not (and before I click OK it shows the phase text as if I were still in the previous game or something)... Pretty sure it used to jump straight to mulligan before.

- Agetian
Agetian
Programmer
 
Posts: 3486
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Corwin72 » 08 Mar 2013, 19:04

@Agetian If you X out of the stuck window you will lose that match but the next match will be fine. This may be an issue with games won in the combat phase only.
User avatar
Corwin72
 
Posts: 793
Joined: 15 Sep 2009, 13:26
Location: Grayson, Ga
Has thanked: 25 times
Been thanked: 9 times

Re: Bug Reports (snapshot builds)

Postby Max mtg » 08 Mar 2013, 19:06

Agetian wrote:For some reason, in duels between matches I have to click the OK button to get to the question about whether I want to mulligan or not (and before I click OK it shows the phase text as if I were still in the previous game or something)... Pretty sure it used to jump straight to mulligan before.

- Agetian
Looks like new game routine is missing a reset input statement
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: Bug Reports (snapshot builds)

Postby Corwin72 » 09 Mar 2013, 14:38

forge-1.3.10-20130309.133718-8

Land search is broken. Terramorphic Expanse or the sac,pay 1 life lands.
The second window to select the land to put into play does not show any lands to select.
User avatar
Corwin72
 
Posts: 793
Joined: 15 Sep 2009, 13:26
Location: Grayson, Ga
Has thanked: 25 times
Been thanked: 9 times

Re: Bug Reports (snapshot builds)

Postby swordshine » 09 Mar 2013, 14:57

friarsol wrote:r20163

Is Flash working for anyone else? I activate it on a creature I can't afford (full well knowing it'll be sacrificed), but I never get a "pay this cost" input. Flash still appears to be on the Stack and I don't seem to be able to actually do anything. The Input that's displayed still shows me the Phase and State I was in before that.
Same thing happened to me when I wanted to pay some unless cost.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 09 Mar 2013, 15:53

r20205 stock trunk build (Clean/Build) plays a bit slower than the yesterday builds and hangs for me on both Java 6 (6u30) and Java 7 (7u15) if I, for instance, skip the phases too quickly (easily reproduced by just mashing space like mad to skip phases - within a few turns the game hangs and I have to kill the process). At first I thought it might have been my AIPersonalities branch changes, but I tried this on stock trunk and it's exactly the same. :\

EDIT: It seems that r20184 is the culprit, reverting it stops the hanging (but the game still 'lags' a bit). I did not revert it though (on SVN) because I know that the changes in r20184 were intentional and I believe that the hanging can just be fixed. Please look into it when possible.

- Agetian
Agetian
Programmer
 
Posts: 3486
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Max mtg » 09 Mar 2013, 21:05

Do you have any chance to collect the code locations which consume most time?

I used TPTP on Eclipse 3.7 to get some profiling reports, but it isn't confirmed to work in Eclipse Indigo.


As for solution to this problem: the culprit is the thread I made to minimize stack depth, so that input.showMessage is mostly called from that thread meanwhile phasehandler, stack and inputcontrol's updateObservers method just sets a variable in InputProxy class and returns instead of actually evaluating and setting the new input and calling its showMessage. If the input belonged to AI or didn't suppose player to have priority, the same thread came to updating input again and so the stack could reach about hundred calls deep... yet it was never seen overflow, because human got priority relativelly soon.

At the moment when it comes to update of input, a flag is raised and it's GameInputUpdatesThread's responsilibity to update input and call showMessage() method.
Looks like a good step in evolution to me, since UI and game get even their own thread so once they might get into different applications. But it didn't work right as soon as I set them up.

So possible solutions are:
1. If you say r20184 decreased performance, try removing "syncronized" keyword from GameState methods (isgameover, setgameover) and mark member isGameOver as volatile. (and revert similiar changes in InputProxy)

2. Add ButtonUtil.disableAll() to forge.gui.InputProxy.update(Observable, Object) - If they were madly hitting space, that may have made a no-longer-valid input trigger 'ok' button press several times.

3. Remove the very thread guided input change for the time being (revert the whole scheme for the next beta or until that thread becomes more reliable)
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: Bug Reports (snapshot builds)

Postby myk » 09 Mar 2013, 22:47

Max mtg wrote:2. Add ButtonUtil.disableAll() to forge.gui.InputProxy.update(Observable, Object) - If they were madly hitting space, that may have made a no-longer-valid input trigger 'ok' button press several times.
As an extension to this idea, perhaps we could call Buttonutil.disableAll() directly from inside the ok/cancel button ActionListener to ensure they only get clicked once before they get reset with the next message. I fear doing it from anywhere else might let the action events queue up and execute before disableAll() is called. We might have to add some re-enabling calls in cancel/error paths, but if this kind of change will solve the problem, this is a relatively easy way to do it.
myk
 
Posts: 439
Joined: 17 Jan 2013, 02:39
Location: California
Has thanked: 38 times
Been thanked: 57 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 10 Mar 2013, 04:23

I'm probably not the best person to handle this, if anyone can assist, I'd appreciate your help. :) I'm not sure what NetBeans uses for profiling, haven't tried profiling things on Java yet (I'm still relatively new to the IDEs for the language) but I'll look into it. ;)

As far as performance goes, reverting r20184 might reduce the lag a bit or maybe even not, I'm not sure, to be honest... I compared the two versions side by side and they seem to have roughly the same performance. I think the lag was introduced by something else.

EDIT: r20215: As a temporary measure, I applied the change per the original Max's suggestion (added ButtonUtil.disableAll() to the update part of InputProxy - seems to do the job and not have any side-effects). Didn't do anything with the performance aspect of changes yet. Feel free to expand on it and modify in any way that you think may be beneficial.

- Agetian
Last edited by Agetian on 10 Mar 2013, 05:11, edited 3 times in total.
Agetian
Programmer
 
Posts: 3486
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 21 guests


Who is online

In total there are 21 users online :: 0 registered, 0 hidden and 21 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 21 guests

Login Form