It is currently 24 Aug 2025, 19:52
   
Text Size

[Bug] Crash when starting game with very large deck

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

[Bug] Crash when starting game with very large deck

Postby UnderFlow » 30 Aug 2013, 02:25

Hi!

I have been experimenting with creating a deck that contains all cards available in Forge, plus a corresponding amount of basic lands (17962 cards total). Using the deck causes the game to crash in the starting player's upkeep. Mulliganing works. The following report was generated in a game where the AI started, but it also happens when the human player starts.

NullPointerException | Open
Code: Select all
Forge Version:    1.4.5-r22726
Operating System: Windows 7 6.1 x86
Java Version:     1.7.0_25 Oracle Corporation

java.lang.NullPointerException
   at forge.card.ability.AbilityUtils.getDefinedPlayers(AbilityUtils.java:709)
   at forge.card.TriggerReplacementBase.meetsCommonRequirements(TriggerReplacementBase.java:284)
   at forge.card.trigger.Trigger.requirementsCheck(Trigger.java:265)
   at forge.card.trigger.TriggerHandler.canRunTrigger(TriggerHandler.java:288)
   at forge.card.trigger.TriggerHandler.runNonStaticTriggersForPlayer(TriggerHandler.java:261)
   at forge.card.trigger.TriggerHandler.runWaitingTrigger(TriggerHandler.java:232)
   at forge.card.trigger.TriggerHandler.runTrigger(TriggerHandler.java:168)
   at forge.game.phase.PhaseHandler.onPhaseBegin(PhaseHandler.java:408)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:960)
   at forge.game.GameAction.startGame(GameAction.java:1515)
   at forge.game.Match$1.run(Match.java:103)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Using a 2000 card deck does not cause the crash.

Link to the deck: https://dl.dropboxusercontent.com/u/5988273/AllCards.zip
UnderFlow
 
Posts: 51
Joined: 17 Feb 2011, 17:49
Has thanked: 0 time
Been thanked: 1 time

Re: [Bug] Crash when starting game with very large deck

Postby gos » 30 Aug 2013, 09:01

. Thoughtbound Primoc causes this behavior. Possibly other cards may as well, but you can start by removing that card and see if it fixes things.
gos
 
Posts: 4369
Joined: 03 Mar 2011, 15:21
Location: Reykjavík, Iceland
Has thanked: 231 times
Been thanked: 232 times

Re: [Bug] Crash when starting game with very large deck

Postby UnderFlow » 30 Aug 2013, 16:20

Thanks! I don't have time right now, but I will try to get it working and report back next week.
UnderFlow
 
Posts: 51
Joined: 17 Feb 2011, 17:49
Has thanked: 0 time
Been thanked: 1 time

Re: [Bug] Crash when starting game with very large deck

Postby Zirbert » 30 Aug 2013, 20:17

I just wanted to thank you specifically for posting a link to the deck! I've occasionally started to compile such a beast in the deck editor, but always got bored partway though clicking "Add 4" 10,000+ times, and never quite figured out an easier way.

-Zirbert, Frequent Overlooker of the Obvious
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: [Bug] Crash when starting game with very large deck

Postby UnderFlow » 01 Sep 2013, 22:17

The cause of the bug indeed appears to be Thoughtbound Primoc, along with Wild Mammoth that seems to use the same code. I have updated the downloadable version (https://dl.dropboxusercontent.com/u/5988273/AllCards.zip) to not include them. I have also removed Safe Haven (triggers from the library) and added the Java source code for generating the deck to the zip file for the interested (very Quick and Dirty, may cause eye-bleeding in seasoned programmers).


Zirbert wrote:I've occasionally started to compile such a beast in the deck editor, but always got bored partway though clicking "Add 4" 10,000+ times, and never quite figured out an easier way.
I got all the way to D until I noticed that I could write a program. :D
UnderFlow
 
Posts: 51
Joined: 17 Feb 2011, 17:49
Has thanked: 0 time
Been thanked: 1 time

Re: [Bug] Crash when starting game with very large deck

Postby gos » 02 Sep 2013, 15:19

. Thoughtbound Primoc fixed in 1.4.7 :)
gos
 
Posts: 4369
Joined: 03 Mar 2011, 15:21
Location: Reykjavík, Iceland
Has thanked: 231 times
Been thanked: 232 times

Re: [Bug] Crash when starting game with very large deck

Postby cliffburton18 » 08 Sep 2013, 16:28

Description: [Yup, I also was trying to start a game with all cards in the game on both decks. Also, for those getting bored selecting all the cards, try holding "shift" while selecting the first and last line (just like in excel) :D

OutOfMemoryError | Open
Code: Select all
Forge Version:    1.4.6-r22922
Operating System: Windows 7 6.1 x86
Java Version:     1.7.0_15 Oracle Corporation

java.lang.OutOfMemoryError: Java heap space
   at java.util.ArrayList.<init>(Unknown Source)
   at java.util.ArrayList.<init>(Unknown Source)
   at forge.Card.<init>(Card.java:115)
   at forge.card.cardfactory.CardFactory.readCard(CardFactory.java:362)
   at forge.card.cardfactory.CardFactory.getCard(CardFactory.java:236)
   at forge.card.cardfactory.CardFactory.getCard(CardFactory.java:231)
   at forge.item.PaperCard.toForgeCard(PaperCard.java:211)
   at forge.game.GameNew.preparePlayerLibrary(GameNew.java:130)
   at forge.game.GameNew.newGame(GameNew.java:253)
   at forge.game.Match.startGame(Match.java:90)
   at forge.control.FControl.startGameWithUi(FControl.java:397)
   at forge.gui.home.sanctioned.CSubmenuConstructed$6.run(CSubmenuConstructed.java:135)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$200(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
cliffburton18
 
Posts: 2
Joined: 08 Sep 2013, 13:28
Has thanked: 0 time
Been thanked: 0 time


Return to Forge

Who is online

Users browsing this forum: No registered users and 32 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 32 users online :: 0 registered, 0 hidden and 32 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 32 guests

Login Form