Crash when importing a custom type with list<enum>
Open
@bjorn is already working on this.
Since Jul 19, 2026.
- Dominant language
- C++
- Stars
- 12.9k
- Forks
- 2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 8
Description
Describe the bug
Tiled crashes when loading an external custom types export which contains a type with:
- an enumerate
- a list containing the same enumerate
- a boolean
- a list of boolean
(not sure about the exact combination though)
Steps to reproduce
- Create new Tiled project
- Open custom types editor and create a new custom type like so:
- Export custom types to an external file (reference_export.json)
- Close Tiled
- Open Tiled and create a new project
- Load the custom types export (reference_export.json)
- It loads fine, custom types editor is still open
- In custom types editor, click on "TopLevelType" definition
- Tiled application crashes
- Re-open the same Tiled project
- A warning is displayed saying there is a circular reference
- Open custom types editor and navigate to "TopLevelType" definition again
- It does not crash but "list_of_enums" field does not contain anything
For reference, here is the export file causing the issue: reference_export.json
For reproduction, I believe you can start at step n°5 and just load the export file.
Expected behavior
We should be able to load this kind of file.
At least, application should not crash.
OS version
Windows 11
Tiled version
1.12.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.