Skip to content

[HTML5]: Loading a JPG image causes runtime freeze and “function signature mismatch” error #875

@AleCGames

Description

@AleCGames

In the latest Solar2D version, loading JPG images in HTML5 causes the app to freeze with a runtime error.
I confirmed this using a minimal blank project that only loads a single JPG image. The issue happens consistently in HTML5, while the same code works correctly in the Solar2D simulator.

To Reproduce

  1. Create a new blank Solar2D project
  2. Add any JPG image
  3. Load it using:
    display.newImageRect("image.jpg", width, height)
  4. Build and run for HTML5

Expected behavior:
The image loads and the app continues normally.

Actual behavior:

  • App freezes after splash screen
  • Loading bar stuck
  • Screen visually corrupted
  • Chrome console shows:
    Uncaught RuntimeError: function signature mismatch

Additional notes

  • Works correctly in the Solar2D simulator
  • Reproducible in a minimal project
  • Replacing the image with display.newRect avoids the issue
  • Appears to be a regression in the current HTML5 runtime

I’ve attached a minimal test project that reproduces the issue from a clean Solar2D setup.
The project does nothing else besides loading a JPG image using display.newImageRect, and it fails consistently when built for HTML5.

test2.zip

UPDATE:
I have tested Solar2D 2025.3726, and the issue also persists in this version.
The last version I was using before testing 2026.3727 and 2025.3726 was 2025.3724, and this bug did not occur in that version.
I only need to test 3725 to determine whether this is the version in which the bug was introduced.

Tested with version 3725, and the bug occurs there as well.

I’m not sure what is happening, but currently it’s not possible to display a JPG image even in the version where this issue did not occur before (2025.3724). I don’t know how the Corona software update process works internally. Every time I update to a newer version, I always uninstall the previous one first; I do this because on one occasion, when I updated in the conventional way (without uninstalling the previous version), I encountered an error.

Before trying newer versions, version 3724 was able to correctly display one of my games that loads a JPG image. However, after testing the three subsequent versions and being unable to get it to work, I reverted to version 3724, and now the same bug is also present in that version.

Metadata

Metadata

Assignees

No one assigned

    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