Custom Blocks Disappear When Game is Closed and Reopened [SERIOUS BUG]

Epic428

  • Posts: 1118
You can find more information here: http://community.stencyl.com/index.php/topic,253.0.html

Anyway, where to start? OK So Ethan was having a similar problem with the falling/animation behaviors as I was having in another thread of mine. So I told him to send me his game and i would implement everything for him to make it easier. Fine.

To make a long story short I ended up having the exact same problem with his game as I did in the thread linked above. I download a behavior that is privately available on forge into the game, and then when the game is closed and reopened all the custom blocks disappear.

I have been experiencing this bug for some time now and at first I thought it was a just a glitch or something. However, that does not appear to be the case.

Here is what I did:

  • I downloaded the lates ZIP build of SW
  • I extracted the file into a new directory so I can start from scratch.
  • I opened Stencyl Forge and downloaded the Jump and Run (Lite) kit
  • I created a brand new game using the Kit Called "Test Game 1"
  • I then Uploaded the Animation Manager Behavior to forge as a private resource, using "Creative Commons" as the license
  • I then Saved and Closed the Game
  • I then Created a new BLANK game called "Test Game 2"
  • I then Opened SF and downloaded the behavior I just Uploaded.
  • I then Saved the game and closed the game.
  • I then Reopened the game and Opened the animation manager behavior
  • Upon Opening the behavior I saw that all custom blocks did not exist.

I have included screenshots  of the behavior before and after saving and closing the game. I am also including the Logs for this version of SW. I am also willing to provide a ZIP of this StencylWorks Directory Containing everything to person I can trust with my sensitive data (i.e. my password) to examine everything in detail.

I have no clue if this is due to a Permissions issue on Windows 7 Ultimate, The fact that the directory is on a non primary HDD, or my account altogether.

However, I am able to consistently reproduce this issue without fail on any behavior containing a Custom Block.

As a side note: when I was trying to produce different experiments I noticed that Scoring Pack V5, in the behavior "Score Calculator V2" there are two missing blocks in the beginning of the behavior, which I cannot tell if it is related to this or not.

Anyway, because I can consistently reproduce this issue, I think this is something that seriously needs to be looked at before we launch as I feel it could have a devastating effect on the community.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Epic428

  • Posts: 1118
Adding Screen shot of Score Calculator
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Greg

  • *
  • Posts: 1260
I agree that this is a serious issue -- for me in particular since most of the work I create (for sharing purposes) uses custom blocks.  This has cropped up for a few other users as well.  I'll have to test to see if I can get it to happen using your steps.

I wonder if the issue is in the upload process to Forge, or if the resource is intact on Forge and is being corrupted when downloaded again. 

I have not worked with the Forge code before so I doubt I will have time to look into this one, but I hope another one of the developers has a chance.

Epic428

  • Posts: 1118
Yeah the weird part is the behavior appears intact once it has been downloaded from forge. However when the game is saved, closed, and reopened and then you check the behavior again, the blocks are gone.

So I'm not sure if the saving/closing part affects it, or like you stated if it is during the up/download process.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Epic428

  • Posts: 1118
I was thinking, and it is just a theory, considering what we know of this problem, could it be at all possible that what is causing this problem could be linked to the Missing Graphic Bug?

My knowledge of the inner workings of Stencyl is very limited, however, from what I was able to comb through, and understand, part of me wonders if the bug that would cause these blocks to go missing would have a similar partner that would cause graphics to go missing.

I just think if it is related to resources disappearing upon saving/loading, it might somehow have cousin that extends itself to the MGB.

If anything, once this problem is solved, I'm sure a similar approach to the other bug could at least be looked at. It is just a theory, though, so perhaps someone with greater knowledge could bust this.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Joe

  • *
  • Posts: 2480
I'm pretty sure the missing graphics bug is unrelated. It has to do with loading resources at run-time rather than with saving/loading.

Jon

  • *
  • Posts: 17529
I'm seeing this a lot in the logs.

Code: [Select]
[ERR] Can't write out resource. Unsupported type.

java.lang.NullPointerException

at stencyl.sw.editors.snippet.designer.codemap.BasicCodeMap.getCode(BasicCodeMap.java:35)

at stencyl.sw.io.write.resource.CustomBlockWriter.write(CustomBlockWriter.java:95)

at stencyl.core.lib.io.IO.write(IO.java:223)

at stencyl.sw.io.write.ResourcePackWriter.writeResourcesFile(ResourcePackWriter.java:127)

at stencyl.sw.io.write.ResourcePackWriter.write(ResourcePackWriter.java:36)

at stencyl.sw.io.write.MasterWriter.saveGame(MasterWriter.java:137)

at stencyl.sw.app.tasks.SaveGameTask.doInBackground(SaveGameTask.java:60)

at stencyl.sw.app.tasks.SaveGameTask.doInBackground(SaveGameTask.java:18)

at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

This means that it's not able to write out and is consistent with the report that they no longer show up. I'm surprised that the behavior opens at all.

Jon

  • *
  • Posts: 17529
The culprit seems to be unimplemented code?!

If so, this has been the case for over a month, and possibly longer when Matt and I were refactoring the code to support multiple output languages.


root
.setAttribute("code"s.getSpec().codeGenerator.getCode(null"AS3"));

Jon

  • *
  • Posts: 17529
Fixed pretty trivially. Patch coming.

Epic428

  • Posts: 1118
Great! I can't wait to test out the patch. Lol it has been a thorn in my side for a little while now and I'm glad it was a relatively easy fix.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Jon

  • *
  • Posts: 17529
Patched in the usual place.

Matt_S

  • Posts: 46
Hmm, this is something that only affects custom blocks which used a BasicCodeMap, which apparently do result from downloaded custom blocks.  There was a similar bug a while back that involved loading these sorts of blocks, though I don't recall specifically what the issue was.