Game Attributes can't be made when multiple resources are open [FIXED]

jsblack

  • Posts: 117
Title pretty much says it all. I can make global attributes but when I do, I must save and restart each time. Below is the error code that I get. If you need more detail or a video of the error let me know, I am happy to reproduce.

Code: [Select]
Unexpected problem on thread AWT-EventQueue-0: null
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
at java.util.ArrayList$Itr.next(ArrayList.java:851)
at stencyl.sw.editors.snippet.designer.palette.tree.TreeBranch.replace(TreeBranch.java:83)
at stencyl.sw.editors.snippet.designer.palette.listproviders.GameVarListProvider$GameVarListSection.refresh(GameVarListProvider.java:141)
at stencyl.sw.editors.snippet.designer.palette.listproviders.GameVarListProvider$GameVarListSection.mapChanged(GameVarListProvider.java:68)
at stencyl.sw.util.NotifierHashMap.put(NotifierHashMap.java:72)
at stencyl.sw.editors.snippet.designer.Definitions.createGetGameVariableBlock(Definitions.java:926)
at stencyl.sw.editors.snippet.designer.SnippetDesigner.createGameVarGetter(SnippetDesigner.java:957)
at stencyl.sw.editors.game.attributes.AttributesPage.addAddon(AttributesPage.java:106)
at stencyl.sw.editors.game.GameSettingsDialog.showNewGameAttributeDialog(GameSettingsDialog.java:528)
at stencyl.sw.editors.snippet.designer.palette.Palette$5.actionPerformed(Palette.java:854)
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.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)

Thanks.

« Last Edit: October 03, 2015, 04:17:10 pm by Jon »

gurigraphics

  • Posts: 690
Global attribute appears the error and not appear getters and/or setters blocks.

Jon

  • *
  • Posts: 17524
I can't reproduce this on my end. Does it happen each time?

Could you be explicit about exactly what steps you are taking to reproduce this? (tell us how you are creating them, what kind of game attribute you are making, etc.)

gurigraphics

  • Posts: 690
OK.

1. Create a new blank project.
2. Create one Scene.
3. Open Scene -> Events -> Add Event -> When Creating
4. Attributes -> Game Attributes -> Create New Game Attribute -> xxx: number -> ok

Results: Global attributes works.
-----------------------------------------------------
5.Create Actor Types -> name -> ok

Leave the page Actor Types open

6- return to scene -> Attributes -> Game Attributes -> Create New Game Attribute -> yyy: number -> ok

Results: Global attributes not works.
Message: Ouch, this should not have happened! Please generate your logs and post then on the forum.
-----------------------------------------------------
Close page Actor Types

7- return to scene -> Attributes -> Game Attributes -> Create New Game Attribute -> zzz: number -> ok

Results: Global attributes works.

« Last Edit: October 02, 2015, 12:48:28 pm by gurigraphics »

jsblack

  • Posts: 117
I can't reproduce this on my end. Does it happen each time?

Could you be explicit about exactly what steps you are taking to reproduce this? (tell us how you are creating them, what kind of game attribute you are making, etc.)

Hi Jon,

Thanks for the reply. I'll try to be as specific as possible. This is most often how I get the bug:

1) I have a behaviour attached to an actor
2) I open the behaviour and start editing its events
3) I click on "Attributes -> Game Attributes -> Create New Game Attribute" and the window opens up
4) I give the attribute a name.
5) I leave the category to "Default"
6) I give it type, let's say "Number"
7) And finally I leave the initial value at zero

Once I click OK, I get the error.

Sometimes, the attribute is visible from the "Show Attributes" list, but at the same time is not visible when I go to search for it in the search box.  In order to then actually access the variable in my code, I need to reboot Stencyl.

Other times, the variable will be both visible in the "Show Attributes" list and also searchable, and if that is the case I can use the variable in my code without having to reboot. Stencyl still throws the initial error, but I just ignore it in these cases.

Hopefully this help.

Cheers

J

Jon

  • *
  • Posts: 17524
Thanks. I was able to reproduce the error using @gurigraphics's steps but was unable to do it via yours. I think that it's being tripped off by having multiple resources open.

This is now fixed in the latest private release. We're waiting a little bit more to push out the next public release, so it'll be at least a few more days before that happens.

jsblack

  • Posts: 117
w00t! Thanks Jon, you are the best :)

Looking forward to the public release.