Page 106 of 487

Re: Bug Reports (snapshot builds)

PostPosted: 20 Mar 2013, 16:26
by myk
Chris H. wrote:Looks like we are attempting to assign an Image via it's key to a BufferedImage object. If the BufferedImage object is null we then are putting the key + a null into the CACHE.
A note on this -- if we cache an image (null, or a default) when the file is not found, then newly downloaded images may not show up until Forge is reloaded. On the other hand, if a file is not found once, it is likely to not be found again. How about if we clear the cache after any GuiDownloader run so new images show up properly, yet we prevent hammering the file system looking for missing files?

Re: Bug Reports (snapshot builds)

PostPosted: 20 Mar 2013, 16:58
by Chris H.
myk wrote:A note on this -- if we cache an image (null, or a default) when the file is not found, then newly downloaded images may not show up until Forge is reloaded. On the other hand, if a file is not found once, it is likely to not be found again. How about if we clear the cache after any GuiDownloader run so new images show up properly, yet we prevent hammering the file system looking for missing files?
 
Sounds like a good idea.

Re: Bug Reports (snapshot builds)

PostPosted: 20 Mar 2013, 17:13
by myk
done. r20502

Re: Bug Reports (snapshot builds)

PostPosted: 20 Mar 2013, 22:20
by myk
Max mtg wrote:I suggest to download a single image and filp these cards programmatically.
Was this implemented? I notice there are now errors after import because of files being left behind, which all seem to be flip cards. Remember that any changes to how cards are mapped to images will require corresponding changes to the MigrationSourceAnalyzer class. If there are images that will not be needed in the new code (such as the alternate sides of flip cards, if that is what we want), add them to the cruftFile list at FView:165 so they get deleted.

Re: Bug Reports (snapshot builds)

PostPosted: 20 Mar 2013, 22:46
by Max mtg
Ok, myk, if both CCGHQ and Wizards provide separate pictures for flipped cards, let's just use them.

Commited 20510 - that's the only change needed.

Have looked though a fewcards... Marc has hosted their fliped pictures, fine then, good to use them.

Re: Bug Reports (snapshot builds)

PostPosted: 20 Mar 2013, 23:54
by myk
Cool, thx. I just implemented flipping of the flippable cards in VPicture and VDetail too, so now both sides can be seen and examined.

Re: Bug Reports (snapshot builds)

PostPosted: 21 Mar 2013, 01:51
by swordshine
I cannot start a match since r20488, quite weird.

Re: Bug Reports (snapshot builds)

PostPosted: 21 Mar 2013, 02:07
by goonjamin
swordshine wrote:I cannot start a match since r20488, quite weird.
What kind of match are you trying to start? I just played a 2 colour random constructed game without issue here on r20515.

Re: Bug Reports (snapshot builds)

PostPosted: 21 Mar 2013, 04:58
by swordshine
swordshine wrote:I cannot start a match since r20488, quite weird.
I updated java version to java7, and it worked in r20488-20491(my local version using Java6 cannot pass r20488). But in r20492, I could start a game again. Maybe some of my local preferences files are broken and I don't know how to restore them.

Re: Bug Reports (snapshot builds)

PostPosted: 21 Mar 2013, 11:44
by Chris H.
swordshine wrote:
swordshine wrote:I cannot start a match since r20488, quite weird.
I updated java version to java7, and it worked in r20488-20491(my local version using Java6 cannot pass r20488). But in r20492, I could start a game again. Maybe some of my local preferences files are broken and I don't know how to restore them.
 
Our user data has been moved to a new location recently.

Code: Select all
For reference, here is the full list of moved directories:

Old location      New location
----------------  ----------------------
res/decks/        <userDir>/decks/
res/gauntlet/     <userDir>/gauntlet/
res/layouts/      <userDir>/preferences/
res/preferences/  <userDir>/preferences/
res/quest/data/   <userDir>/quest/saves/
res/pics/         <cacheDir>/pics/
 
My <userDir>/preferences/ directory contains these four files:

editor.preferences
editor.xml
forge.preferences
match.xml

I would guess that the last one might be what you are looking for. You could try moving the /preferences/ dir out of the <userDir> dir and then restart forge. forge might detect the missing /preferences/ dir and would write the missing files into the missing /preferences/ dir.

If this works you might then be able to move the first three files back into the /preferences/ dir and this would then give you back your settings for these three files.

Re: Bug Reports (snapshot builds)

PostPosted: 21 Mar 2013, 12:09
by swordshine
Thanks Chris, I recreated a local version of forge and it works now.

Re: Bug Reports (snapshot builds)

PostPosted: 22 Mar 2013, 02:26
by friarsol
r20535

When casting Painter's Servant after choosing the color as it ETB I get this crash:

java.lang.RuntimeException: CardUtil : getShortColor() invalid argument - ChosenColor
at forge.CardUtil.getShortColor(CardUtil.java:56)
at forge.CardUtil.getShortColorsString(CardUtil.java:77)
at forge.StaticEffects.removeStaticEffect(StaticEffects.java:156)
at forge.StaticEffects.clearStaticEffects(StaticEffects.java:63)
at forge.game.GameAction.checkStaticAbilities(GameAction.java:873)
at forge.game.GameAction.checkStateEffects(GameAction.java:948)
at forge.game.zone.MagicStack.finishResolving(MagicStack.java:984)

Re: Bug Reports (snapshot builds)

PostPosted: 22 Mar 2013, 03:56
by sidereal
swordshine wrote:I cannot start a match since r20488, quite weird.
I had the same problem at HEAD after having my data migrated. I ran it through the debugger and found it was crashing in ImageCache's static initialization when it tries to load up the default image (no_card.jpg). There's a catch there for IOException but it actually throws an IllegalArgumentException if it can't find it. Might be worth catching Exception there instead so it doesn't just silently kill the thread. I'm not sure why it isn't finding no_card.jpg. It's in my resources. For now I'm just logging the exception and ignoring it. Here's the stack trace:

Code: Select all
java.lang.IllegalArgumentException: input == null!
   at javax.imageio.ImageIO.read(ImageIO.java:1322)
   at forge.ImageCache.<clinit>(ImageCache.java:80)
   at forge.gui.match.CMatchUI.getPlayerAvatar(CMatchUI.java:59)
   at forge.gui.match.CMatchUI.initMatch(CMatchUI.java:107)

Re: Bug Reports (snapshot builds)

PostPosted: 22 Mar 2013, 18:56
by storms
when ai use lord of the void ability forge crashes often

angel of serenity ability when she is removed from the field sometimes it causes forge to hang and when u push ok nothing happens

Re: Bug Reports (snapshot builds)

PostPosted: 23 Mar 2013, 01:42
by 7543021
Painter's Servant seems don’t effect your hand zone.I want him to combo with Chandra Ablaze.My Painter's Servant on the field(naming red),but activating Chandra Ablaze 's +1ability didn't deal any damage unless you discard a card that is original red.I'm using forge r20541.