Page 1 of 1

compiled code cache?

PostPosted: 25 Nov 2016, 01:16
by MTGfan
So I believe I am on to something with why I have an issue with old code executing with a couple of the cards I implemented. After trying a variety of searches on google I finally thought of using phrasing of netbeans running old code of something like that. to find reference to recommendations of deleting all the caches. I know of a netbeans cache and a maven cache but there must be another cache somewhere that is retaining files that are holding some old code. Even after deleting the folder my clone was in, both those caches, and even my github fork and starting fresh several times since implementing the cards for some reason my end keeps executing the nonworking code version of the cards. So I'm hoping that someone knows anywhere else that I can delete stuff to see if it clears up the issue. I'm hoping to avoid the problem in the future as I'm sure I'll be adding quite a lot more cards.

Re: compiled code cache?

PostPosted: 25 Nov 2016, 08:31
by LevelX
Just to be sure: You did a "Clean and Build" on the main project?

Re: compiled code cache?

PostPosted: 25 Nov 2016, 20:51
by MTGfan
Yep that is what is strange. I've ran that from within netbeans and also used mvn clean install -DskipTests from the command line in windows command prompt. So far both Gaea's Liege and Veteran Bodyguard are both executing old replaced code from netbeans no matter what I do. Both as far as I figure are confirmed working since they have been merged. I haven't tried testing them again with this last removal of everything since my last current pull request I messed up my local repo and started with everything removed to fix it.

Re: compiled code cache?

PostPosted: 02 Dec 2016, 02:23
by MTGfan
The problem I was having with Gaea's Liege running xmage from netbeans is also happening when I play a match against myself on the release version of xmage. Which indicates to me there is something somewhere on my pc outside of the folders I previously mentioned that is causing it. Is the client and server storing data anywhere else outside of the folder they are installed in? For example I clone to C:\netbeans\MyRepo and the release version is located in a folder on my desktop named xmage.

Re: compiled code cache?

PostPosted: 02 Dec 2016, 11:13
by LevelX
No, there is no code stored outside of that folder.

A "Clean and build" does always replace the old code.

Can you set breakpoints at the new code to check what's happening?
If old code is executed, normally the breakpoints can't be set in netbeans.

Re: compiled code cache?

PostPosted: 03 Dec 2016, 04:59
by MTGfan
LevelX wrote:No, there is no code stored outside of that folder.

A "Clean and build" does always replace the old code.

Can you set breakpoints at the new code to check what's happening?
If old code is executed, normally the breakpoints can't be set in netbeans.
That's why I tested it in the release version when I saw it was included in the new update. Since it is happening when running the release version we download from the main xmage site I came to the conclusion this is something outside of the development environment causing the issue on my pc. Since Dilnu confirmed the card functions on his PC and the xmage test file we made confirms it works it is something specific on my pc. I have as far as I can tell deleted everything development environment and xmage release install related including keyword searching the system registry and I can't isolate the issue.

I submitted code for two cards. Animate artifacts is suffering from the same issue I have with Gaea's Liege on my pc. If I hard code the power and toughness for the artifact being turned into a creature it stays on the battlefield with the enchantment attached. If I change it to receive the power and toughness from a variable it instantly goes to the graveyard along with the enchantment since the artifact is no longer in play. I'm awaiting response to the two cards. Animate artifact should just need independent testing to confirm it works since the code works with hard coded power and toughness my only conclusion can be that whatever is causing the Gaea's Liege problem on my pc is also causing the same problem with animate artifact.

Re: compiled code cache?

PostPosted: 25 Dec 2016, 18:40
by MTGfan
Turns out the issue with Gaea's Liege was not what I was suspecting after google searching for answers to why I was having the problem. I had a random thought today that what if I reversed the ability to the inverse condition and changed places of the effect and otherwise effect to match, since the ability text has as long as not attacking first and as long as attacking second why not match the order in the ability itself. What I figure is there must be an anomaly with certain systems (such as mine) where having the ability the other way was causing the different result. Since as far as I understood the problem I was having was not occurring on the others systems. I'll commit the change shortly after posting this.