Skip to content

Crash on saving .tpproj file in a folder within the folder the .atlas file is exported to #126

@MoeruCore

Description

@MoeruCore

Hey, just started using this about 20 minutes ago and the program's exactly what I was hoping for, but I ran into a crash that's fortunately pretty easy to work around.

My folder structure looks like this:

model
| textures
| | .kra files
| | mouth

It's a bit wonky, but "textures" contains all of the exported textures the model uses, ".kra files" contains the source files the textures were exported from, and "mouth" contains a bunch of mouth image sprites that I was atlasing, which are the only images in the atlas. The resulting .atlas and .png files were saved in "textures". Attempting to save the .tpproj file in ".kra files" crashes the program, but saving it in "model" does not. I also tried saving it in a new folder in "textures" called "kra files" (without the period), and that also crashed, so the period in the folder name doesn't appear to be the issue.

You can see in the log that I also got an exception when I tried to pack the assets without setting an output folder, but the crash happens whether or not you do that first.

Application Log Version: 4.10.2 OS: Windows 10 10.0 x86 JRE: 1.8.0_301 Oracle Corporation GPU: Intel(R) HD Graphics 630 OpenGL vendor: Intel OpenGL version: 4.5.0 - Build 22.20.16.4749 [ExtensionModuleRepositoryService] Cached data is outdated. [ExtensionModuleRepositoryService] Requesting new data from remote server. [ConfigurationController] Incremental fonts are disabled [GlobalShortcutHandler] Parsing shortcut file: hotkeys_default.txt [SystemUtils] Recognized system configuration is Windows (Other) [ExtensionModuleRepositoryService] Data was loaded from remote server. [text-red]Exception occurred:[] Output directory is not specified [text-red]Stack trace:[] java.lang.IllegalStateException: Output directory is not specified at com.crashinvaders.texturepackergui.controllers.packing.processors.DataValidationProcessor.processPackage(DataValidationProcessor.java:22) at com.crashinvaders.texturepackergui.utils.packprocessing.CompositePackProcessor.processPackage(CompositePackProcessor.java:20) at com.crashinvaders.texturepackergui.utils.packprocessing.PackProcessingManager.lambda$execute$0(PackProcessingManager.java:60) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

Packing is started
PackingWriting 1960x1268: C:\Files\Code\Unity[Assets]\model\textures\Mouth.png
Packing is done
Total pack files size is 322648 bytes
1 pages
Total processing time: 2.41sec

Packing is started
PackingWriting 1960x1268: C:\Files\Code\Unity[Assets]\model\textures\Mouth.png
Packing is done
Total pack files size is 323457 bytes
1 pages
Total processing time: 2.28sec

Packing is started
PackingWriting 1960x1268: C:\Files\Code\Unity[Assets]\model\textures\Mouth.png
Packing is done
Total pack files size is 322648 bytes
1 pages
Total processing time: 2.31sec

java.lang.RuntimeException: Actor: VisTextButton: Save
at com.badlogic.gdx.scenes.scene2d.Actor.notify(Actor.java:192)
at com.badlogic.gdx.scenes.scene2d.Actor.fire(Actor.java:152)
at com.badlogic.gdx.scenes.scene2d.ui.Button.setChecked(Button.java:125)
at com.badlogic.gdx.scenes.scene2d.ui.Button$1.clicked(Button.java:93)
at com.badlogic.gdx.scenes.scene2d.utils.ClickListener.touchUp(ClickListener.java:88)
at com.badlogic.gdx.scenes.scene2d.InputListener.handle(InputListener.java:71)
at com.badlogic.gdx.scenes.scene2d.Stage.touchUp(Stage.java:355)
at com.crashinvaders.common.PrioritizedInputMultiplexer$Wrapper.touchUp(PrioritizedInputMultiplexer.java:136)
at com.crashinvaders.common.PrioritizedInputMultiplexer.touchUp(PrioritizedInputMultiplexer.java:83)
at com.badlogic.gdx.InputEventQueue.drain(InputEventQueue.java:70)
at com.badlogic.gdx.backends.lwjgl3.DefaultLwjgl3Input.update(DefaultLwjgl3Input.java:189)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:394)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:143)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.(Lwjgl3Application.java:116)
at com.crashinvaders.texturepackergui.desktop.ApplicationStarter.start(ApplicationStarter.java:57)
at com.crashinvaders.texturepackergui.desktop.ApplicationStarter.main(ApplicationStarter.java:35)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at com.crashinvaders.texturepackergui.utils.PathUtils.relativize(PathUtils.java:96)
at com.crashinvaders.texturepackergui.controllers.projectserializer.ProjectSerializer.serializePack(ProjectSerializer.java:127)
at com.crashinvaders.texturepackergui.controllers.projectserializer.ProjectSerializer.serializeProject(ProjectSerializer.java:94)
at com.crashinvaders.texturepackergui.controllers.projectserializer.ProjectSerializer.saveProject(ProjectSerializer.java:52)
at com.crashinvaders.texturepackergui.controllers.GlobalActions$5.selected(GlobalActions.java:254)
at com.kotcrab.vis.ui.widget.file.FileChooser.notifyListenerAndCloseDialog(FileChooser.java:727)
at com.kotcrab.vis.ui.widget.file.FileChooser.selectionFinished(FileChooser.java:689)
at com.kotcrab.vis.ui.widget.file.FileChooser.access$2200(FileChooser.java:76)
at com.kotcrab.vis.ui.widget.file.FileChooser$18.changed(FileChooser.java:618)
at com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.handle(ChangeListener.java:28)
at com.badlogic.gdx.scenes.scene2d.Actor.notify(Actor.java:188)
... 15 more

</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    crash reportCrash reports sent from a built-in issue constructor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions