Skip to content

[examples][models_decals][WEB] store bytes at global data seg#5708

Merged
raysan5 merged 1 commit intoraysan5:masterfrom
r3g492:examples_fix_models_decals
Mar 31, 2026
Merged

[examples][models_decals][WEB] store bytes at global data seg#5708
raysan5 merged 1 commit intoraysan5:masterfrom
r3g492:examples_fix_models_decals

Conversation

@r3g492
Copy link
Copy Markdown
Contributor

@r3g492 r3g492 commented Mar 31, 2026

Hello,

sure of:

  • the example must not store large bytes to Asyncify stack. the error is on Asyncify side.
  • making decalModels static, fix the issue.

not sure:

  • is using global data seg for the example OK?

thank you,

models_decals.html:246 Stack overflow detected.  You can try increasing -sSTACK_SIZE (currently set to 65536)
...
models_decals.js:229 Uncaught RuntimeError: memory access out of bounds
    at models_decals.wasm.stbi__parse_png_file (models_decals.wasm:0x3b0df)
    at models_decals.wasm.stbi__load_main (models_decals.wasm:0x30658)
    at models_decals.wasm.stbi__load_and_postprocess_8bit (models_decals.wasm:0x2f269)
    at models_decals.wasm.LoadImageFromMemory (models_decals.wasm:0x518e1)
    at models_decals.wasm.LoadImage (models_decals.wasm:0x512f0)
    at models_decals.wasm.LoadTexture (models_decals.wasm:0x5974d)
    at models_decals.wasm.__original_main (models_decals.wasm:0x491f)
    at models_decals.wasm.main (models_decals.wasm:0x1096c)
    at __asyncify_wrapper_303 (models_decals.js:9050:20)
    at models_decals.js:723:12

@r3g492 r3g492 changed the title [examples][models_decals] store bytes at global data seg [examples][models_decals][WEB] store bytes at global data seg Mar 31, 2026
@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Mar 31, 2026

@r3g492 Good catch! Thanks for this clean and simple fix!

@raysan5 raysan5 merged commit 7879775 into raysan5:master Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants