It is currently 10 Jun 2025, 01:28
   
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 Hanmac » 13 Dec 2016, 18:51

Agetian wrote:r32683: Delve does not work on certain creatures (e.g. Tasigur, the Golden Fang; Necropolis Fiend); most likely on the ones that have a spell ability with mana cost on them.

EDIT: Tried to fix this in r32684, not sure if I'm correct though.
In particular, I'm not sure if it's worth breaking when a permanent SA is found (adding a "break" statement) - is it possible that something else can add on an alternative casting cost that should/should not be affected by Delve?

- Agetian
my fault again, while changing the part with unparsedAbilities i forgot that SpellPermanent should be first.

Updated the code, now it should work again even without your fix. (but you might leave it in if you want)
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 13 Dec 2016, 19:11

Hanmac wrote:
Agetian wrote:r32683: Delve does not work on certain creatures (e.g. Tasigur, the Golden Fang; Necropolis Fiend); most likely on the ones that have a spell ability with mana cost on them.

EDIT: Tried to fix this in r32684, not sure if I'm correct though.
In particular, I'm not sure if it's worth breaking when a permanent SA is found (adding a "break" statement) - is it possible that something else can add on an alternative casting cost that should/should not be affected by Delve?

- Agetian
my fault again, while changing the part with unparsedAbilities i forgot that SpellPermanent should be first.

Updated the code, now it should work again even without your fix. (but you might leave it in if you want)
I'll probably revert my part for the time being then (looks like things work fine without it after your change). Thanks! :)

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

Re: Bug Reports (snapshot builds)

Postby vinnie » 13 Dec 2016, 23:13

vinnie wrote:Description: Ok, after some test I understood when the problem happens.
The save gets corrupt when I change the world through travel.
At the first travels doesn't seem that it happens but after more trips it seems inevitable.
To understand this I made a script that backup each new save and when the problem occurred I repeated some actions on old save to trigger the bug (It wasn't enough the previous save that forge creates in automatic, because in the meantime the game is saved several times and then even backup save is corrupted).
I'm attaching the save where i can still play duel in the same world without forge crash and the next one where forge crashed after changing world and win a duel.
For convenience the first have prefix [before] and the second [after], but this prefix must be removed so the game can load the quest (I also include the .bak always prefixed with [after], for convenience.)


NullPointerException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r-1
Operating System: Linux 3.13.0-103-generic i386
Java Version:     1.8.0_91 Oracle Corporation

java.lang.NullPointerException
   at forge.screens.home.quest.PnlEvent.<init>(PnlEvent.java:49)
   at forge.screens.home.quest.CSubmenuChallenges.update(CSubmenuChallenges.java:166)
   at forge.screens.match.QuestWinLose.actionOnQuit(QuestWinLose.java:74)
   at forge.screens.match.ControlWinLose$3.actionPerformed(ControlWinLose.java:54)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
   at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
   at java.awt.Component.processMouseEvent(Component.java:6535)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
   at java.awt.Component.processEvent(Component.java:6300)
   at java.awt.Container.processEvent(Container.java:2236)
   at java.awt.Component.dispatchEventImpl(Component.java:4891)
   at java.awt.Container.dispatchEventImpl(Container.java:2294)
   at java.awt.Component.dispatchEvent(Component.java:4713)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
   at java.awt.Container.dispatchEventImpl(Container.java:2280)
   at java.awt.Window.dispatchEventImpl(Window.java:2750)
   at java.awt.Component.dispatchEvent(Component.java:4713)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
   at java.awt.EventQueue$4.run(EventQueue.java:731)
   at java.awt.EventQueue$4.run(EventQueue.java:729)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
r32675
Description: Same problem with more recent snapshot and another linux/java version

NullPointerException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r32675
Operating System: Linux 4.4.0-31-generic amd64
Java Version:     1.8.0_03-Ubuntu Oracle Corporation

java.lang.NullPointerException
   at forge.screens.home.quest.PnlEvent.<init>(PnlEvent.java:49)
   at forge.screens.home.quest.CSubmenuChallenges.update(CSubmenuChallenges.java:166)
   at forge.screens.match.QuestWinLose.actionOnQuit(QuestWinLose.java:74)
   at forge.screens.match.ControlWinLose$3.actionPerformed(ControlWinLose.java:54)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
   at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
   at java.awt.Component.processMouseEvent(Component.java:6535)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
   at java.awt.Component.processEvent(Component.java:6300)
   at java.awt.Container.processEvent(Container.java:2236)
   at java.awt.Component.dispatchEventImpl(Component.java:4891)
   at java.awt.Container.dispatchEventImpl(Container.java:2294)
   at java.awt.Component.dispatchEvent(Component.java:4713)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
   at java.awt.Container.dispatchEventImpl(Container.java:2280)
   at java.awt.Window.dispatchEventImpl(Window.java:2750)
   at java.awt.Component.dispatchEvent(Component.java:4713)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
   at java.awt.EventQueue$4.run(EventQueue.java:731)
   at java.awt.EventQueue$4.run(EventQueue.java:729)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
User avatar
vinnie
 
Posts: 111
Joined: 21 Dec 2015, 14:03
Has thanked: 23 times
Been thanked: 6 times

Re: Bug Reports (snapshot builds)

Postby stormcat » 14 Dec 2016, 02:56

:r32688
When I start 4 player Commander game, this error occur sometimes.

Description: [describe what you were doing when the crash occurred]

StringIndexOutOfBoundsException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r32688
Operating System: Windows 10 10.0 x86
Java Version:     1.8.0_111 Oracle Corporation

java.lang.StringIndexOutOfBoundsException: String index out of range: 80
   at java.lang.AbstractStringBuilder.insert(Unknown Source)
   at java.lang.StringBuilder.insert(Unknown Source)
   at forge.game.card.Card.abilityTextInstantSorcery(Card.java:1890)
   at forge.game.card.Card.getAbilityText(Card.java:1633)
   at forge.game.card.CardView$CardStateView.updateAbilityText(CardView.java:971)
   at forge.game.card.Card.addSpellAbility(Card.java:2029)
   at forge.game.card.CardFactoryUtil.addAbilityFactoryAbilities(CardFactoryUtil.java:2018)
   at forge.game.card.CardFactory.readCardFace(CardFactory.java:479)
   at forge.game.card.CardFactory.readCard(CardFactory.java:407)
   at forge.game.card.CardFactory.getCard(CardFactory.java:260)
   at forge.game.card.CardFactory.getCard(CardFactory.java:255)
   at forge.game.card.Card.fromPaperCard(Card.java:6926)
   at forge.game.Match.preparePlayerLibrary(Match.java:193)
   at forge.game.Match.prepareAllZones(Match.java:257)
   at forge.game.Match.startGame(Match.java:83)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
stormcat
 
Posts: 361
Joined: 17 Jun 2015, 05:32
Has thanked: 0 time
Been thanked: 6 times

Re: Bug Reports (snapshot builds)

Postby stormcat » 14 Dec 2016, 03:08

:r32688
I reported same problem ago.
When Kalitas, Traitor of Ghet and other non token creatures dies same time, the creatures should be exiled and created zombie tokens.
stormcat
 
Posts: 361
Joined: 17 Jun 2015, 05:32
Has thanked: 0 time
Been thanked: 6 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 14 Dec 2016, 04:28

stormcat wrote::r32688
When I start 4 player Commander game, this error occur sometimes.

Description: [describe what you were doing when the crash occurred]

StringIndexOutOfBoundsException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r32688
Operating System: Windows 10 10.0 x86
Java Version:     1.8.0_111 Oracle Corporation

java.lang.StringIndexOutOfBoundsException: String index out of range: 80
   at java.lang.AbstractStringBuilder.insert(Unknown Source)
   at java.lang.StringBuilder.insert(Unknown Source)
   at forge.game.card.Card.abilityTextInstantSorcery(Card.java:1890)
   at forge.game.card.Card.getAbilityText(Card.java:1633)
   at forge.game.card.CardView$CardStateView.updateAbilityText(CardView.java:971)
   at forge.game.card.Card.addSpellAbility(Card.java:2029)
   at forge.game.card.CardFactoryUtil.addAbilityFactoryAbilities(CardFactoryUtil.java:2018)
   at forge.game.card.CardFactory.readCardFace(CardFactory.java:479)
   at forge.game.card.CardFactory.readCard(CardFactory.java:407)
   at forge.game.card.CardFactory.getCard(CardFactory.java:260)
   at forge.game.card.CardFactory.getCard(CardFactory.java:255)
   at forge.game.card.Card.fromPaperCard(Card.java:6926)
   at forge.game.Match.preparePlayerLibrary(Match.java:193)
   at forge.game.Match.prepareAllZones(Match.java:257)
   at forge.game.Match.startGame(Match.java:83)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Fixed (r32689).

stormcat wrote::r32688
I reported same problem ago.
When Kalitas, Traitor of Ghet and other non token creatures dies same time, the creatures should be exiled and created zombie tokens.
This would be really nice to fix, I think other similar timing issues were reported a long time ago (when a creature with a trigger leaves the battlefield with other creatures at the same time, the said trigger doesn't fire if it involves those other creatures that left the battlefield simultaneously). Does anyone have any ideas how to best approach this?

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

Re: Bug Reports (snapshot builds)

Postby stormcat » 14 Dec 2016, 04:43

@Agetian
Maybe, Flusterstorm.
stormcat
 
Posts: 361
Joined: 17 Jun 2015, 05:32
Has thanked: 0 time
Been thanked: 6 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 14 Dec 2016, 05:19

vinnie wrote:
vinnie wrote:Description: Ok, after some test I understood when the problem happens.
The save gets corrupt when I change the world through travel.
At the first travels doesn't seem that it happens but after more trips it seems inevitable.
To understand this I made a script that backup each new save and when the problem occurred I repeated some actions on old save to trigger the bug (It wasn't enough the previous save that forge creates in automatic, because in the meantime the game is saved several times and then even backup save is corrupted).
I'm attaching the save where i can still play duel in the same world without forge crash and the next one where forge crashed after changing world and win a duel.
For convenience the first have prefix [before] and the second [after], but this prefix must be removed so the game can load the quest (I also include the .bak always prefixed with [after], for convenience.)


NullPointerException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r-1
Operating System: Linux 3.13.0-103-generic i386
Java Version:     1.8.0_91 Oracle Corporation

java.lang.NullPointerException
   at forge.screens.home.quest.PnlEvent.<init>(PnlEvent.java:49)
   at forge.screens.home.quest.CSubmenuChallenges.update(CSubmenuChallenges.java:166)
   at forge.screens.match.QuestWinLose.actionOnQuit(QuestWinLose.java:74)
   at forge.screens.match.ControlWinLose$3.actionPerformed(ControlWinLose.java:54)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
   at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
   at java.awt.Component.processMouseEvent(Component.java:6535)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
   at java.awt.Component.processEvent(Component.java:6300)
   at java.awt.Container.processEvent(Container.java:2236)
   at java.awt.Component.dispatchEventImpl(Component.java:4891)
   at java.awt.Container.dispatchEventImpl(Container.java:2294)
   at java.awt.Component.dispatchEvent(Component.java:4713)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
   at java.awt.Container.dispatchEventImpl(Container.java:2280)
   at java.awt.Window.dispatchEventImpl(Window.java:2750)
   at java.awt.Component.dispatchEvent(Component.java:4713)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
   at java.awt.EventQueue$4.run(EventQueue.java:731)
   at java.awt.EventQueue$4.run(EventQueue.java:729)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
r32675
Description: Same problem with more recent snapshot and another linux/java version

NullPointerException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r32675
Operating System: Linux 4.4.0-31-generic amd64
Java Version:     1.8.0_03-Ubuntu Oracle Corporation

java.lang.NullPointerException
   at forge.screens.home.quest.PnlEvent.<init>(PnlEvent.java:49)
   at forge.screens.home.quest.CSubmenuChallenges.update(CSubmenuChallenges.java:166)
   at forge.screens.match.QuestWinLose.actionOnQuit(QuestWinLose.java:74)
   at forge.screens.match.ControlWinLose$3.actionPerformed(ControlWinLose.java:54)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
   at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
   at java.awt.Component.processMouseEvent(Component.java:6535)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
   at java.awt.Component.processEvent(Component.java:6300)
   at java.awt.Container.processEvent(Container.java:2236)
   at java.awt.Component.dispatchEventImpl(Component.java:4891)
   at java.awt.Container.dispatchEventImpl(Container.java:2294)
   at java.awt.Component.dispatchEvent(Component.java:4713)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
   at java.awt.Container.dispatchEventImpl(Container.java:2280)
   at java.awt.Window.dispatchEventImpl(Window.java:2750)
   at java.awt.Component.dispatchEvent(Component.java:4713)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
   at java.awt.EventQueue$4.run(EventQueue.java:731)
   at java.awt.EventQueue$4.run(EventQueue.java:729)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Can you please provide your quest save file? I'll take a look and see if I can fix this.

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

Re: Bug Reports (snapshot builds)

Postby vinnie » 14 Dec 2016, 09:33

Agetian wrote:
vinnie wrote:Can you please provide your quest save file? I'll take a look and see if I can fix this.
This time I did not backup of all saves, so it only those created by forge. In case you need also a "uncorrupted" saves, I have to start the quest over again :oops:
Attachments
saves.zip
(5.22 KiB) Downloaded 237 times
User avatar
vinnie
 
Posts: 111
Joined: 21 Dec 2015, 14:03
Has thanked: 23 times
Been thanked: 6 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 14 Dec 2016, 10:40

vinnie wrote:
Agetian wrote:
vinnie wrote:Can you please provide your quest save file? I'll take a look and see if I can fix this.
This time I did not backup of all saves, so it only those created by forge. In case you need also a "uncorrupted" saves, I have to start the quest over again :oops:
Ok, this should be fixed in r32691, and the good news is that you should be able to continue your quest without having to do anything manually or start it over. ;)

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

Re: Bug Reports (snapshot builds)

Postby vinnie » 14 Dec 2016, 13:28

Agetian wrote:Ok, this should be fixed in r32691, and the good news is that you should be able to continue your quest without having to do anything manually or start it over. ;)
for curiosity I looked at the code, the problem happened because it was loaded a challenge from another world?
User avatar
vinnie
 
Posts: 111
Joined: 21 Dec 2015, 14:03
Has thanked: 23 times
Been thanked: 6 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 14 Dec 2016, 13:32

vinnie wrote:
Agetian wrote:Ok, this should be fixed in r32691, and the good news is that you should be able to continue your quest without having to do anything manually or start it over. ;)
for curiosity I looked at the code, the problem happened because it was loaded a challenge from another world?
Something like that, I think that somehow a challenge from the previous world lingered in the game data, which caused the game to crash looking for the said challenge in your current world. :/ I couldn't yet track why exactly it happens, so for now I coded a "preventive measure" to at least stop the game from crashing.

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

Re: Bug Reports (snapshot builds)

Postby Agetian » 14 Dec 2016, 13:38

stormcat wrote::r32688
I reported same problem ago.
When Kalitas, Traitor of Ghet and other non token creatures dies same time, the creatures should be exiled and created zombie tokens.
Ok, so let's talk a bit more about this bug. :)
I started looking at the relevant code and came to a conclusion that this issue ensues because the game thinks that Kalitas is already in the graveyard by the time the replacement effect fires, which *looks* like it may be calling for some LKI utilization.

Now, there *is* actually a way to get this to work using the last known information. Here's an example of an experimental tweak that works for this case.
First we need the LKI to actually preserve information about the last zone the card was known to be in (it currently doesn't, and LKI zone is always set to "null", not sure if it's intentional or not):

CardUtil.java around line 322 in getLKICopy()
Code: Select all
newCopy.setZone(in.getZone());
And then we need to make the replacement event handler actually use that information to detect where the card was last known to be:

ReplacementHandler.java at line 118 in run()
Code: Select all
                for (final ReplacementEffect replacementEffect : crd.getReplacementEffects()) {
                    if (!replacementEffect.hasRun()
                            && replacementEffect.getLayer() == layer
                            && replacementEffect.requirementsCheck(game)
                            && replacementEffect.canReplace(runParams)
                            && !possibleReplacers.contains(replacementEffect)
                            && replacementEffect.zonesCheck(game.getZoneOf(game.getChangeZoneLKIInfo(crd)))) {
                        possibleReplacers.add(replacementEffect);
                    }
                }
(note using game.getChangeZoneLKIInfo(crd) instead of just crd)

With these changes, Kalitas, Traitor of Ghet will correctly fire even on a mass removal event such as Wrath of God, and it works correctly in the standard "creatures dying one by one" event. However, this has a really big potential for, you know, breaking all sorts of things, which is why I don't yet want to go for it (and it looks too simple to be true).

Please let me know what you think about this change. If it's not viable to do it this way, am I at least on to something here, is it possible to somehow expand/change this idea to get this to work correctly without potentially breaking half the game? :)

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

Re: Bug Reports (snapshot builds)

Postby Hanmac » 14 Dec 2016, 13:49

Hm I remember doing something similar before and reverting it because it did break something. But I can't remember what or if it does still happen.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 14 Dec 2016, 13:49

Hanmac wrote:Hm I remember doing something similar before and reverting it because it did break something. But I can't remember what or if it does still happen.
Hmm, OK, I might set it up on my experimental installation and play a bit with it, see how it behaves. :/

- Agetian
Agetian
Programmer
 
Posts: 3487
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 33 guests


Who is online

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

Login Form