It is currently 28 Apr 2024, 16:14
   
Text Size

Developing Bugs

Post MTG Forge Related Programming Questions Here

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

Re: Developing Bugs

Postby Chris H. » 28 Sep 2012, 20:29

Max mtg wrote:Although errors are somehow related to predicates (that is my area of responsibility for now), I could not reproduce this problem.
Builds under eclipse work just fine.
Should I also try some command prompt build method?
 
I was able to do a build and run from within Eclipse. Using a Maven command to do a snapshot build and release which is uploaded to the CardForge site is giving me the error.

Dave left some instructions on the forge wiki that you could try:

http://www.slightlymagic.net/wiki/Forge_Maven_Build_System

No need to do a snapshot build with a deployment to the CardForge site. Try the local build command:

Code: Select all
mvn -U -B clean -P windows-linux install
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: Developing Bugs

Postby ArsenalNut » 28 Sep 2012, 23:43

Hellfish wrote:Yeah, r17167 seems the culprit. I couldn't tell you why for the life of me,though. :(
I concur. I reverted just the changes made in r17167 (which only touched one file) and Forge stopped having freezing issues.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Developing Bugs

Postby Max mtg » 29 Sep 2012, 00:01

Chris H. wrote:No need to do a snapshot build with a deployment to the CardForge site. Try the local build command:

Code: Select all
mvn -U -B clean -P windows-linux install
That's very strange.
I have reproduced the problem, but it sounds completelly idiotic to me. Looks like maven compiler cannot recognize a type parametrized predicate.

Code: Select all
        public static final Predicate<CardRules> IS_CREATURE_OR_LAND = Predicates.or(Presets.IS_CREATURE,Presets.IS_LAND);
        public static final Predicate<CardRules> IS_NON_CREATURE_SPELL = Predicates.not(IS_CREATURE_OR_LAND);
Gets compiled

Code: Select all
        public static final Predicate<CardRules> IS_NON_CREATURE_SPELL = Predicates.not(Predicates.or(Presets.IS_CREATURE,Presets.IS_LAND));
Brings us compilation error.

I have commited r17185 when my local mvn built .class files without errors. But the errors maven generated are the dumbest I've seen.
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: Developing Bugs

Postby friarsol » 29 Sep 2012, 00:15

Ok I seem to be having some serious issues in Forge right now. Playing Quest mode, I can't seem to get past one or two turns. Sometimes its the AIs turn, but I can't move onto the next phase. Sometimes it's my turn and I can't hit OK to resolve the stack.

Edit: Ok, resolving Evolving Wilds ability freezes Forge right now.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Developing Bugs

Postby Chris H. » 29 Sep 2012, 01:08

Max mtg wrote:I have commited r17185 when my local mvn built .class files without errors. But the errors maven generated are the dumbest I've seen.
 
Thank you Max for taking a look at this. I updated to rev 17186 and then ran the Maven command:

Code: Select all
mvn -U -B clean -P windows-linux install
and it looks like I have a hang.

org.apache.maven.surefire.booter.ForkedBooter is using 100% of my processor and has not moved forward for a number of minutes. I include the terminal log:
 
Eclipse Console Log | Open
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Forge 1.2.15-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ forge ---
[INFO] Deleting /Users/chrish/Workspace_SVN/ForgeSVN/target
[INFO]
[INFO] --- buildnumber-maven-plugin:1.1:create (default) @ forge ---
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Checking for local modifications: skipped.
[INFO] Updating project files from SCM: skipped.
[INFO] Executing: /bin/sh -c cd /Users/chrish/Workspace_SVN/ForgeSVN && svn --non-interactive info
[INFO] Working directory: /Users/chrish/Workspace_SVN/ForgeSVN
[INFO] Storing buildNumber: 16084 at timestamp: 1348879553139
[INFO] Executing: /bin/sh -c cd /Users/chrish/Workspace_SVN/ForgeSVN && svn --non-interactive info
[INFO] Working directory: /Users/chrish/Workspace_SVN/ForgeSVN
[INFO] Storing buildScmBranch: trunk
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:released-version (released-version) @ forge ---
[INFO] artifact forge:forge: checking for updates from arcane-maven-repo
[INFO] artifact forge:forge: checking for updates from central
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:parse-version (parse-version) @ forge ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ forge ---
[debug] execute contextualize
[INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ forge ---
[INFO] Compiling 616 source files to /Users/chrish/Workspace_SVN/ForgeSVN/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ forge ---
[debug] execute contextualize
[INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/chrish/Workspace_SVN/ForgeSVN/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ forge ---
[INFO] Compiling 23 source files to /Users/chrish/Workspace_SVN/ForgeSVN/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12:test (default-test) @ forge ---
[INFO] Surefire report directory: /Users/chrish/Workspace_SVN/ForgeSVN/target/surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNGMapConfigurator@57bcc0bc
[white, red, blue]
failed : 0.9
failed : 0.91
failed : 38.0
failed : 41.0
failed : 42.0
failed : 43.0
ManaCost : addMana() error, mana not needed - 1
failed : 45.1
2
failed : 46.1
2

I waited for ten minutes or so and then force quit the org.apache.maven.surefire.booter.ForkedBooter process.
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: Developing Bugs

Postby ArsenalNut » 29 Sep 2012, 01:16

friarsol wrote:Ok I seem to be having some serious issues in Forge right now. Playing Quest mode, I can't seem to get past one or two turns. Sometimes its the AIs turn, but I can't move onto the next phase. Sometimes it's my turn and I can't hit OK to resolve the stack.

Edit: Ok, resolving Evolving Wilds ability freezes Forge right now.
Sorry, I should have been more clear above. Hellfish tracked the freezing issue back to r17167. This change only touched one file, CMessage.java. When I revert this file back to the prior version,
Forge stopped having freezing issues. I don't know what caused the problem though it looked like I had more threads going in the debug pane with the changed version. Debugging thread issues is beyond my current skill level. I would suggest we reverting back to the prior version until someone can figure why the change causes an issue.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Developing Bugs

Postby Doublestrike » 29 Sep 2012, 01:22

ArsenalNut wrote:
Hellfish wrote:Yeah, r17167 seems the culprit. I couldn't tell you why for the life of me,though. :(
I concur. I reverted just the changes made in r17167 (which only touched one file) and Forge stopped having freezing issues.
Thanks guys, I'll have to look at this some more.

The EDT is "Event Dispatching Thread" which is there to hold UI operations, nearly all of which are not "thread-safe". This means two operations might be thrown to two separate threads, and they potentially could finish at different times (a "race condition").

This results in things repainting at strange times or not at all, etc. By assigning all UI stuff to the EDT, things happen in a predictable order.

The slow performance in the match UI is because ALL of the processing is happening on the EDT - all AI calculations, all game state changes, etc. The card animations, for instance, hang a bit since the thread is busy processing something else.

I was hoping r17167 could remedy this - it certainly gave an instant performance kick - but looks like there's other non-thread-safe operations that are racing eachother and throwing bugs. So, rats. But at least we know where the problem lies, which is a big part of the battle.
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

Re: Developing Bugs

Postby friarsol » 29 Sep 2012, 02:33

ArsenalNut wrote:Sorry, I should have been more clear above. Hellfish tracked the freezing issue back to r17167. This change only touched one file, CMessage.java. When I revert this file back to the prior version,
Forge stopped having freezing issues.
Ahh I thought someone committed the revert, but I don't actually see it committed, so that's probably what my confusion stemmed from. Alright now that I'm caught up, there's nothing to see here.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Developing Bugs

Postby ArsenalNut » 29 Sep 2012, 04:31

friarsol wrote:
ArsenalNut wrote:Sorry, I should have been more clear above. Hellfish tracked the freezing issue back to r17167. This change only touched one file, CMessage.java. When I revert this file back to the prior version,
Forge stopped having freezing issues.
Ahh I thought someone committed the revert, but I don't actually see it committed, so that's probably what my confusion stemmed from. Alright now that I'm caught up, there's nothing to see here.
I have now committed my reverted version of the file.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Developing Bugs

Postby Max mtg » 29 Sep 2012, 09:03

Chris H. wrote:
Max mtg wrote:I have commited r17185 when my local mvn built .class files without errors. But the errors maven generated are the dumbest I've seen.
 
Thank you Max for taking a look at this. I updated to rev 17186 and then ran the Maven command:

Code: Select all
mvn -U -B clean -P windows-linux install
and it looks like I have a hang.

org.apache.maven.surefire.booter.ForkedBooter is using 100% of my processor and has not moved forward for a number of minutes. I include the terminal log.

I waited for ten minutes or so and then force quit the org.apache.maven.surefire.booter.ForkedBooter process.
I get absolutelly the same output.
Have changed the compiler to groovy - the compilation does not break on the quoted example any longer, but the tests set still hangs dead
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: Developing Bugs

Postby RumbleBBU » 30 Sep 2012, 04:07

Unfortunately, the Fireball infinite loop crash (see previous page, my Sep 27 post) still exists.

It works in the current beta (1.2.14) but not in the SVN. I don't know who changed the relevant code and I'm wary of 'stepping on other programmer's toes', so to speak.

But it definitely should be fixed before the next beta. Fireball is a fairly standard Card in a number of decks.
User avatar
RumbleBBU
 
Posts: 394
Joined: 18 Aug 2012, 04:24
Has thanked: 29 times
Been thanked: 66 times

Re: Developing Bugs

Postby RumbleBBU » 30 Sep 2012, 11:19

more: the current SVN hangs when you try to build a new Draft or Sealed Deck game. (I know it worked perfectly fine on Friday when I added the Gauntlet-mode to Draft and tested it extensively, so this is fairly new.)

Houston, we have a problem.

Addendum. Some extra info:

For Sealed Deck games, the line that seems to hang in CSubmenuSealed.java is this:
Code: Select all
sealed.addAiDeck(new SealedDeck(aiDecks.toFlatList()).buildDeck());
For Draft games, it seems to be this, in CSubmenuDraft.java:
Code: Select all
draft.showGui(new BoosterDraft(CardPoolLimitation.Full));
(The above example is, of course, from "Full Cardpool" draft.)

So far, I've been unable to track it any further than that. Because the game hangs... :( But it seems that the constructors for SealedDeck and BoosterDraft never execute.
User avatar
RumbleBBU
 
Posts: 394
Joined: 18 Aug 2012, 04:24
Has thanked: 29 times
Been thanked: 66 times

Re: Developing Bugs

Postby Max mtg » 01 Oct 2012, 05:21

RumbleBBU wrote:more: the current SVN hangs when you try to build a new Draft or Sealed Deck game. (I know it worked perfectly fine on Friday when I added the Gauntlet-mode to Draft and tested it extensively, so this is fairly new.)

Houston, we have a problem.

Addendum. Some extra info:

For Sealed Deck games, the line that seems to hang in CSubmenuSealed.java is this:
Code: Select all
sealed.addAiDeck(new SealedDeck(aiDecks.toFlatList()).buildDeck());
For Draft games, it seems to be this, in CSubmenuDraft.java:
Code: Select all
draft.showGui(new BoosterDraft(CardPoolLimitation.Full));
(The above example is, of course, from "Full Cardpool" draft.)

So far, I've been unable to track it any further than that. Because the game hangs... :( But it seems that the constructors for SealedDeck and BoosterDraft never execute.
Sorry, that was my bad while refactoring.
There was an endless loop in the read draft rankings routine. fix commited in 17243.

Chris, this also fixed the hanging tests problem. However the tests still massively fail
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: Developing Bugs

Postby RumbleBBU » 01 Oct 2012, 11:32

Excellent, thank you, Max mtg! I'm happy to confirm that the fix works.

Now there's still (at least) one we need to nail before the next beta, the Fireball bug. I've really no clue about that one. The only thing I know is that I have a completely working checkout (date Sep 25th) without the bug, and I originally observed it on Sep 27th, so it must have been caused by something that was committed between those two dates (probably towards the latter).
In SVN terminology, that would mean that the Fireball problem was introduced somewhere between versions 17061 - 17145. Nearly a hundred to choose from, oh well...
Last edited by RumbleBBU on 01 Oct 2012, 11:38, edited 1 time in total.
User avatar
RumbleBBU
 
Posts: 394
Joined: 18 Aug 2012, 04:24
Has thanked: 29 times
Been thanked: 66 times

Re: Developing Bugs

Postby Chris H. » 01 Oct 2012, 11:34

Max mtg wrote:There was an endless loop in the read draft rankings routine. fix commited in 17243.

Chris, this also fixed the hanging tests problem. However the tests still massively fail
 
Thank you Max for fixing this.

I was able to do a snapshot build today and I guess that removing Braid's portion of the tests took care of the test failures.
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

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 82 guests


Who is online

In total there are 82 users online :: 0 registered, 0 hidden and 82 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 82 guests

Login Form