Skip to content

This bug when loading up a LDTK level into a game #27

Description

@jossse69

idk why but it does not load my game when i do this. i'm using the latest version and adding the LTDK file to the config corretly yet i still get this bug. can you fix it?
? ??·?·? TINY - The Tiny Virtual Gaming Console ? === Using provided game directory: C:\Users\Pichau\OneDrive\Documentos\TINYprojects\test-game\. === ? === Debug server started on port '8081' === ? === Debugger webapp: http://localhost:8081 === ? === Remote control: http://localhost:8081/control/keys === ? |- tiny-cli -| - [GAME_ENGINE] : Number of resources to load: 7 ? |- tiny-cli -| - [RESOURCE_FACTORY] : Loading script '_boot.lua' ? |- tiny-cli -| - [RESOURCE_FACTORY] : Loading script '_engine.lua' ? |- tiny-cli -| - [RESOURCE_FACTORY] : Loading script 'game.lua' ? |- tiny-cli -| - [RESOURCE_FACTORY] : Loading spritesheet '_boot.png' (BOOT_SPRITESHEET) ? |- tiny-cli -| - [RESOURCE_FACTORY] : Loading spritesheet 'sprites.png' (GAME_SPRITESHEET) ?? |- tiny-cli -| - [GAME_ENGINE] : Loaded _boot.lua BOOT_GAMESCRIPT (version: 0) ? |- tiny-cli -| - [RESOURCE_FACTORY] : Loading world 084d4420-48b0-11f1-8631-4dda5442c8bb with levels Level_0 Exception in thread "DefaultDispatcher-worker-19" java.lang.IllegalArgumentException: Path traversal detected: '../../../TINYprojects/test-game/sprites.png' resolves outside 'C:\Users\Pichau\OneDrive\Documentos\TINYprojects\test-game' at com.github.minigdx.tiny.platform.glfw.GlfwPlatform.safeResolve(GlfwPlatform.kt:76) at com.github.minigdx.tiny.platform.glfw.GlfwPlatform.createByteArrayStream(GlfwPlatform.kt:427) at com.github.minigdx.tiny.platform.glfw.GlfwPlatform$createImageStream$1.<init>(GlfwPlatform.kt:436) at com.github.minigdx.tiny.platform.glfw.GlfwPlatform.createImageStream(GlfwPlatform.kt:435) at com.github.minigdx.tiny.platform.Platform.createImageStream$default(Platform.kt:95) at com.github.minigdx.tiny.resources.ResourceFactory.gameLevel$getTilesets(ResourceFactory.kt:80) at com.github.minigdx.tiny.resources.ResourceFactory.access$gameLevel$getTilesets(ResourceFactory.kt:29) at com.github.minigdx.tiny.resources.ResourceFactory$gameLevel$$inlined$map$3$2.emit(Emitters.kt:51) at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit(Emitters.kt:51) at com.github.minigdx.tiny.resources.ResourceFactory$gameLevel$$inlined$map$2$2.emit(Emitters.kt:50) at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:33) at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl$FlowKt__ChannelsKt(Channels.kt:1) at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Channels.kt) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:820) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@478c5695, Dispatchers.IO] ? |- tiny-cli -| - [GAME_ENGINE] : Remaining resources to load: 6. (_engine.lua, _boot.png, testgame.ldtk, game.lua, sprites.png, default-sound.sfx) ?? |- tiny-cli -| - [GAME_ENGINE] : Loaded _engine.lua ENGINE_GAMESCRIPT (version: 0) ? |- tiny-cli -| - [GAME_ENGINE] : Remaining resources to load: 5. (_boot.png, testgame.ldtk, game.lua, sprites.png, default-sound.sfx) ?? |- tiny-cli -| - [GAME_ENGINE] : Loaded game.lua GAME_GAMESCRIPT (version: 0) ? |- tiny-cli -| - [GAME_ENGINE] : Remaining resources to load: 4. (_boot.png, testgame.ldtk, sprites.png, default-sound.sfx) ?? |- tiny-cli -| - [GAME_ENGINE] : Loaded _boot.png BOOT_SPRITESHEET (version: 0) ? |- tiny-cli -| - [GAME_ENGINE] : Remaining resources to load: 3. (testgame.ldtk, sprites.png, default-sound.sfx) ?? |- tiny-cli -| - [GAME_ENGINE] : Loaded sprites.png GAME_SPRITESHEET (version: 0) ? |- tiny-cli -| - [GAME_ENGINE] : Remaining resources to load: 2. (testgame.ldtk, default-sound.sfx) ?? Shutting down debug server... ? Debug server stopped. Exiting... ? See you soon!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions