UnderwaterApps / overlap2d

Overlap2D Game development toolkit for UI and Level design
Other
780 stars 224 forks source link

Imported an image it crashed and won't open that file. #258

Open lilrichy opened 9 years ago

lilrichy commented 9 years ago

I have many of hours of work into this game and I recently imported a new image and the program crashed and now when ever I try to open the file that this is saved to it crashes immediately.

Any help retrieving my work would be appreciated.

Below is crash log from console.

VisUI: Warning, using default favorites preference name for file chooser! (see FileChooser.setFavoritesPrefsName(String)) VisUI: Warning, using default favorites preference name for file chooser! (see FileChooser.setFavoritesPrefsName(String)) java.lang.NullPointerException at com.uwsoft.editor.renderer.factory.component.SimpleImageComponentFactory.createDimensionsComponent(SimpleImageComponentFactory.java:78) at com.uwsoft.editor.renderer.factory.component.ComponentFactory.createCommonComponents(ComponentFactory.java:64) at com.uwsoft.editor.renderer.factory.component.SimpleImageComponentFactory.createComponents(SimpleImageComponentFactory.java:49) at com.uwsoft.editor.renderer.factory.EntityFactory.createEntity(EntityFactory.java:82) at com.uwsoft.editor.renderer.factory.EntityFactory.initAllChildren(EntityFactory.java:235) at com.uwsoft.editor.renderer.SceneLoader.loadScene(SceneLoader.java:123) at com.uwsoft.editor.view.SceneControlMediator.initScene(SceneControlMediator.java:90) at com.uwsoft.editor.view.stage.Sandbox.initData(Sandbox.java:229) at com.uwsoft.editor.view.stage.Sandbox.loadScene(Sandbox.java:246) at com.uwsoft.editor.view.stage.Sandbox.loadCurrentProject(Sandbox.java:235) at com.uwsoft.editor.view.stage.Sandbox.loadCurrentProject(Sandbox.java:240) at com.uwsoft.editor.proxy.ProjectManager.openProjectFromPath(ProjectManager.java:1040) at com.uwsoft.editor.view.menu.Overlap2DMenuBarMediator.recentProjectItemClicked(Overlap2DMenuBarMediator.java:246) at com.uwsoft.editor.view.menu.Overlap2DMenuBarMediator.handleFileMenuNotification(Overlap2DMenuBarMediator.java:157) at com.uwsoft.editor.view.menu.Overlap2DMenuBarMediator.handleNotification(Overlap2DMenuBarMediator.java:100) at com.puremvc.patterns.observer.BaseObserver.notifyObserver(BaseObserver.java:82) at com.puremvc.core.CoreView.notifyObservers(CoreView.java:128) at com.puremvc.patterns.facade.SimpleFacade.notifyObservers(SimpleFacade.java:361) at com.puremvc.patterns.facade.SimpleFacade.sendNotification(SimpleFacade.java:323) at com.uwsoft.editor.event.MenuItemListener.changed(MenuItemListener.java:44) at com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.handle(ChangeListener.java:28) at com.badlogic.gdx.scenes.scene2d.Actor.notify(Actor.java:181) at com.badlogic.gdx.scenes.scene2d.Actor.fire(Actor.java:146) at com.badlogic.gdx.scenes.scene2d.ui.Button.setChecked(Button.java:123) at com.badlogic.gdx.scenes.scene2d.ui.Button$1.clicked(Button.java:91) at com.badlogic.gdx.scenes.scene2d.utils.ClickListener.touchUp(ClickListener.java:89) at com.badlogic.gdx.scenes.scene2d.InputListener.handle(InputListener.java:58) at com.badlogic.gdx.scenes.scene2d.Stage.touchUp(Stage.java:348) at com.badlogic.gdx.InputMultiplexer.touchUp(InputMultiplexer.java:96) at com.badlogic.gdx.backends.lwjgl.LwjglInput.processEvents(LwjglInput.java:306) at com.badlogic.gdx.backends.lwjgl.LwjglCanvas$3.run(LwjglCanvas.java:234) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: No OpenGL context found in the current thread. at org.lwjgl.opengl.GLContext.getCapabilities(GLContext.java:124) at org.lwjgl.opengl.GL11.glDeleteTextures(GL11.java:732) at com.badlogic.gdx.backends.lwjgl.LwjglGL20.glDeleteTexture(LwjglGL20.java:248) at com.badlogic.gdx.graphics.GLTexture.delete(GLTexture.java:170) at com.badlogic.gdx.graphics.Texture.dispose(Texture.java:194) at com.badlogic.gdx.graphics.g2d.TextureAtlas.dispose(TextureAtlas.java:418) at com.badlogic.gdx.scenes.scene2d.ui.Skin.dispose(Skin.java:389) at com.kotcrab.vis.ui.VisUI.dispose(VisUI.java:65) at com.uwsoft.editor.Overlap2D.dispose(Overlap2D.java:92) at com.badlogic.gdx.backends.lwjgl.LwjglCanvas$4.run(LwjglCanvas.java:309) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

Pawnkly commented 9 years ago

Hello, I managed to solve a similar problem to yours, tried to load a resource, overlap2d crashed and the project crashed overlap2d everytime I tried to open it.

In my case some files went missing after the program crashed, the files that suppose to be located at Documents/Overlap2D/_projectname/assets/orig/pack/. Probably got deleted when overlap2d tried to add the new resource to the atlas or something (just an assumption - didn't actually check it).

(The files that are missing are your resources packed with an atlas)

Fortunately, when you export your project these files should be exported too. So to solve my problem I just copied the files from Documents/Overlap2D/_projectname/export/orig/ to here Documents/Overlap2D/_projectname/assets/orig/pack/ Reopened the project and it worked!

NOTICE:

If that doesn't work maybe you can try to pack all your resources to the atlas manually with TexturePacker.

azakhary commented 9 years ago

That's a valid way to fix it yes. I do the same procedure if pack file gets missing.

dsaltares commented 9 years ago

Overlap2D should be more robust and try to handle this scenario, or at least provide a meaningful error message.

azakhary commented 9 years ago

This is a huge chunk that is missing in overlao2d, a proper error handling in terms of messages. That is a big something that is not there I admit. But as we are all developers using it so far, it seems "manageable" so far.

dsaltares commented 9 years ago

In my opinion, there should be a stability focus before new features are implemented. I can see a lot of crashes in the issue tracker.

I think people prefer a reliable tool that doesn't have bugs and doesn't crash than a feature rich one. Especially when it comes to serious/commercial games.

Ideally Overlap2D should be fully usable by artists and designers, not just programmers that know how to troubleshoot this. I'm sure you agree!

azakhary commented 9 years ago

Yes I do! It should be good teams to use it where overlapped is mainly in artists hand. And stability is important. It was a bigger issue before, but now that everything is better structured, fixing issues should not be hard. It's reproducing is what is hard sometimes.

dsaltares commented 9 years ago

I think I'm going to be looking at bugs from the issue tracker whenever I can and fix those I can find the solution for. That way I'll learn my way around the codebase for the future.

azakhary commented 9 years ago

Thank you so much for spending your time on overlap! It's really cool, and I am sure as you get more familiar you will be able to point some crazily bad things that we probably did and didn't notice.