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 changing sprite atlas and sprite has an invalid animation #7445

Closed
britzl opened this issue Mar 6, 2023 · 2 comments · Fixed by #7550
Closed

Crash when changing sprite atlas and sprite has an invalid animation #7445

britzl opened this issue Mar 6, 2023 · 2 comments · Fixed by #7550
Assignees
Labels
bug Something is not working as expected engine Issues related to the Defold engine sprite Issues related to sprites

Comments

@britzl
Copy link
Contributor

britzl commented Mar 6, 2023

Describe the bug (REQUIRED)
The engine crashes if the atlas/tilesource of a sprite is changed and the sprite uses an animation which doesn't exist in the new atlas/tilesource.

To Reproduce (REQUIRED)
See example project for steps to repro.

Assertion failed: (i < m_Count), function operator[], file texture_set_ddf.h, line 88.
INFO:CRASH: Successfully wrote Crashdump to file: /Users/bjornritzl/Library/Application Support/Defold/_crash
ERROR:CRASH: CALL STACK:

# 0 pc     0x2839c4 dmengine _ZN7dmCrashL7HandlerEiP9__siginfoPv+36
# 1 pc      0x69dfd libc++abi.dylib _sigtramp+29
# 2 pc      0x1e00f libc++abi.dylib __pthread_kill+11
# 3 pc      0x541ff libc++abi.dylib pthread_kill+263
# 4 pc     0x218d24 libxpc.dylib abort+123
# 5 pc     0x2180cb libxpc.dylib err+0
# 6 pc     0x2d6cf1 dmengine _ZN12dmGameSystemL27UpdateCurrentAnimationFrameEPNS_15SpriteComponentE.cold.1+33
# 7 pc      0x6088b dmengine _ZN12dmGameSystemL27UpdateCurrentAnimationFrameEPNS_15SpriteComponentE+299
# 8 pc      0x5d3cd dmengine _ZN12dmGameSystem16CompSpriteUpdateERKN12dmGameObject22ComponentsUpdateParamsERNS0_22ComponentsUpdateResultE+397
# 9 pc      0x1d307 dmengine _ZN12dmGameObject6UpdateEPNS_16CollectionHandleEPKNS_13UpdateContextE+503
#10 pc       0x74e9 dmengine _ZN8dmEngine4StepEPNS_6EngineE+1065
#11 pc       0x7b7a dmengine _Z14dmEngineUpdatePN8dmEngine6EngineE+26
#12 pc       0x868d dmengine _ZN8dmEngine7RunLoopEPKNS_13RunLoopParamsE+109
#13 pc       0x85f2 dmengine _Z11engine_mainiPPc+98

Expected behavior (REQUIRED)
It should not crash

Defold version (REQUIRED):

  • 1.4.4

Platforms (REQUIRED):

  • All platforms

Minimal repro case project (OPTIONAL):
See attached project

@britzl britzl added the bug Something is not working as expected label Mar 6, 2023
@britzl
Copy link
Contributor Author

britzl commented Mar 6, 2023

Archive.zip

@britzl britzl added sprite Issues related to sprites engine Issues related to the Defold engine labels Mar 6, 2023
@britzl
Copy link
Contributor Author

britzl commented Mar 6, 2023

Note that this doesn't happen in the most basic case of changing from an atlas with one image to an atlas with another image. There has to be some difference in the amount of animations in the two atlases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working as expected engine Issues related to the Defold engine sprite Issues related to sprites
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants