Bug Issue: Error when opening behaviors (b10751)


Pages: 1

soereide

  • Subscriber - Stencyl Studio
  • *
July 02, 2021, 04:08:19 am
I'm trying out the latest beta (b10751) and have found that certain behaviors just won't open.

This is running on macOS 11.4.

Quote
Level:     ERROR
When:      2021-07-02 13:01:24:158
From:      root

Unexpected problem on thread AWT-EventQueue-0: java.lang.ClassCastException: class stencyl.sw.data.EditableSprite cannot be cast to class stencyl.sw.data.EditableFont (stencyl.sw.data.EditableSprite and stencyl.sw.data.EditableFont are in unnamed module of loader 'app')

Throwable: java.lang.RuntimeException: java.lang.ClassCastException: class stencyl.sw.data.EditableSprite cannot be cast to class stencyl.sw.data.EditableFont (stencyl.sw.data.EditableSprite and stencyl.sw.data.EditableFont are in unnamed module of loader 'app')
   at stencyl.sw.app.tasks.StencylWorker.done(StencylWorker.java:74)
   at stencyl.sw.app.tasks.StencylWorker.done(StencylWorker.java:54)
   at stencyl.sw.app.tasks.OpenResourceTask.done(OpenResourceTask.java:81)
   at java.desktop/javax.swing.SwingWorker$5.run(Unknown Source)
   at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
   at java.desktop/sun.swing.AccumulativeRunnable.run(Unknown Source)
   at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
   at java.desktop/javax.swing.Timer.fireActionPerformed(Unknown Source)
   at java.desktop/javax.swing.Timer$DoPostEvent.run(Unknown Source)
   at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
   at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
   at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
   at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassCastException: class stencyl.sw.data.EditableSprite cannot be cast to class stencyl.sw.data.EditableFont (stencyl.sw.data.EditableSprite and stencyl.sw.data.EditableFont are in unnamed module of loader 'app')
   at stencyl.core.lib.resourcetype.FontRT.getImageForResource(FontRT.java:46)
   at stencyl.sw.editors.behavior.action.AbstractResourceAction.refresh(AbstractResourceAction.java:124)
   at stencyl.sw.editors.snippet.designer.block.GenericObjectChooser.update(GenericObjectChooser.java:274)
   at stencyl.sw.editors.snippet.designer.block.GenericObjectChooser.update(GenericObjectChooser.java:259)
   at stencyl.sw.editors.snippet.designer.block.GenericObjectChooser.setObject(GenericObjectChooser.java:239)
   at stencyl.core.lib.attribute.impl.helper.dm.DesignModeGOCField.initBlockFieldFromXML(DesignModeGOCField.java:51)
   at stencyl.core.lib.attribute.impl.helper.dm.DesignModeGOCField.initBlockFieldFromXML(DesignModeGOCField.java:25)
   at stencyl.sw.editors.snippet.designer.block.Block.fromXML(Block.java:2204)
   at stencyl.sw.editors.snippet.designer.block.Group.fromXML(Group.java:210)
   at stencyl.sw.editors.snippet.designer.block.Block.fromXML(Block.java:2191)
   at stencyl.sw.editors.snippet.designer.block.Group.fromXML(Group.java:210)
   at stencyl.sw.editors.snippet.designer.EditArea.loadSnippet(EditArea.java:599)
   at stencyl.sw.editors.snippet.designer.EditArea.<init>(EditArea.java:735)
   at stencyl.sw.editors.snippet.designer.SnippetDesigner.createEditArea(SnippetDesigner.java:618)
   at stencyl.sw.editors.snippet.designer.SnippetDesigner.<init>(SnippetDesigner.java:342)
   at stencyl.sw.editors.snippet.SnippetDesignTab.<init>(SnippetDesignTab.java:92)
   at stencyl.sw.app.doc.Workspace.fetchEditorForResource(Workspace.java:854)
   at stencyl.sw.app.doc.Workspace.finishOpenResource(Workspace.java:703)
   at stencyl.sw.app.tasks.OpenResourceTask.doInBackground(OpenResourceTask.java:72)
   at stencyl.sw.app.tasks.OpenResourceTask.doInBackground(OpenResourceTask.java:20)
   at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
   at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
   at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.base/java.lang.Thread.run(Unknown Source)


New attachment added by soereide - July 02, 2021, 04:09:48 am


New attachment added by soereide - July 02, 2021, 04:10:09 am


Justin

  • Master Stencyler
  • *
July 02, 2021, 07:22:55 am
Looks like this is caused by a resource dropdown being saved with a resource ID that corresponds to the wrong type of resource. For example, perhaps a resource was selected in a behavior, and then that resource was deleted, freeing up the ID, and a new resource of a different type was creating, claiming that ID.

Try 4.1.0-beta3-b10752.

If you still have an issue, a copy of one behavior that won't open ([game]/snippets/Design_X_X_BehaviorName.design) as well as your resource list ([game]/resources/data.xml) would be appreciated.
« Last Edit: July 02, 2021, 07:31:48 am by Justin »


Issue updated by Justin - July 02, 2021, 09:44:00 pm
  • Status changed from New to Need Info


soereide

  • Subscriber - Stencyl Studio
  • *
July 03, 2021, 02:46:43 am
That was fast! It's working perfectly now. Thanks!


Justin

  • Master Stencyler
  • *
July 03, 2021, 02:54:35 am
Glad to hear!
  • Status changed from Need Info to Resolved


Justin

  • Master Stencyler
  • *
July 03, 2021, 03:58:12 am
The fix here may cause a similar issue if an ID is chosen that doesn't correspond to any resource at all. Made some more changes to account for that in b10756.


Pages: 1

Details

  • Reported
    July 02, 2021, 04:08:19 am
  • Updated
    July 03, 2021, 03:58:12 am

  • View Status
    Public
  • Type
    Bug
  • Status
    Resolved
  • Priority
    Normal
  • Version
    (none)
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Engine

Tags


Attachments

* 2021-07-02_12-47-48.log (65.78 kB - downloaded 12 times.)
* SystemProperties.log (4.08 kB - downloaded 12 times.)