Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when loading .tbin map with missing tilesheet in some cases #2106

Pathoschild opened this issue Apr 12, 2019 · 1 comment


2 participants
Copy link

commented Apr 12, 2019

When you open a Stardew Valley .tbin map, some missing tilesheets cause a crash to desktop before it's done opening. This only happens for some tilesheets, but it's consistent when it does happen.

Let me know if you need any other info!

Repro steps

(See optional video showing the issue.)

  1. Download this map + tilesheets.
  2. Enable the tbin plugin in Tiled.
  3. Open SmallBeachFarm.tbin. It should load fine with no missing tilesheets.
  4. Exit Tiled.
  5. Delete or rename spring_beach.png so Tiled doesn't find it.
  6. Open SmallBeachFarm.tbin. Tiled crashes to desktop.

Behavior for that map's tilesheets:

tilesheet behavior if not found
tilesheets/* ✓ missing-tilesheet dialogue shown
paths.png ✓ missing-tilesheet dialogue shown
spring_beach.png ✘ crash to desktop
spring_outdoorsTilesheet.png ✘ crash to desktop
spring_town.png ✓ missing-tilesheet dialogue shown


Reproduced on Windows 10 (Home 1809 build 17763.437) with Tiled 1.2.3 and Tiled snapshot 2019.04.03 (all 64-bit). Several other Stardew Valley modders ran into the issue, so it's not specific to my computer (though I only tested these repro steps on my computer).

Event viewer data

The Windows event viewer shows this info for the Tiled crash (where exception code 0xc0000005 is apparently Access Violation).

Faulting application name: tiled.exe, version:, time stamp: 0x5c87c76d
Faulting module name: tiled.dll, version:, time stamp: 0x5c87c727
Exception code: 0xc0000005
Fault offset: 0x0000000000047736
Faulting process id: 0x359c
Faulting application start time: 0x01d4f14b3d14679f
Faulting application path: C:\Program Files\Tiled\tiled.exe
Faulting module path: C:\Program Files\Tiled\tiled.dll
Report Id: 84697a4e-4642-4e00-954d-7445056f273a
Faulting package full name: 
Faulting package-relative application ID: 

@bjorn bjorn added the bug label Apr 18, 2019


This comment has been minimized.

Copy link

commented Apr 18, 2019

This only happens with some maps because it's a crash while reading animated tiles from a tileset for which the image failed to load. I'll look into fixing this soon.

Thanks for the detailed report and the files for reproducing this!

@bjorn bjorn added this to Tiled 1.2 (bugfixes) in Roadmap Apr 18, 2019

@bjorn bjorn closed this in 3f22f00 Apr 19, 2019

Roadmap automation moved this from Tiled 1.2 (bugfixes) to Recently Completed Apr 19, 2019

Ruin0x11 added a commit to Ruin0x11/tiled that referenced this issue May 15, 2019

tBIN plugin: Fixed possible crash when images can't be found
A crash would occur when a tileset image failed to load and the map
contained animated tiles from the affected tileset.

This change also makes a few small optimizations (avoiding copying and
length calculations in some places) and improves the rendering of
missing tiles in case those tiles had properties or an animation
associated with them.

Also fixed saving of tileset properties.

Closes bjorn#2106
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.