godotengine / godotengine/godot
Basis Universal texture compression causes "null function or function signature mismatch" error in HTML5 exports
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in: v4.4.1.stable.official, v4.4.stable.official, v4.4.beta4.official [93d270693], v4.4.beta2.official [a013481b0], v4.4.beta1.official [d33da79d3]
- Not reproducible in: v4.4.dev7.official [46c8f8c5c], v4.3.stable.official
### System information
Godot v4.4.1.stable - Windows 10 (build 19045) - Single-window, 2 monitors - OpenGL 3 (Compatibility) - NVIDIA GeForce GTX 1660 Ti (NVIDIA; 31.0.15.5176) - AMD Ryzen 5 4600H with Radeon Graphics (12 threads) - Google Chrome Version 138.0.7204.184 (Official Build) (64-bit)
### Issue description
When exporting a project to HTML5, when it tries to load a texture with Basis Universal compression, it causes a "null function or function signature mismatch" error to display. In the browser console, the following appears:
```
Loading resource: res://.godot/exported/133200997/export-6581cd44ca730c421bddc3302d6ce6cc-root.scn
tmp_js_export.js:459 Loading resource: res://.godot/exported/133200997/export-a5f7b278be0b8ccb4b547c783b83de4e-CheckerMaterial.res
tmp_js_export.js:459 Loading resource: res://BWTiles.png
tmp_js_export.js:459 Loading resource: res://.godot/imported/BWTiles.png-1b119c177f699c45bd74865cf6e3cac7.ctex
tmp_js_export.html:153 RuntimeError: null function or function signature mismatch
at 0c665d2e:0x9c7e6d
at 0c665d2e:0x9c76a2
at 0c665d2e:0x29549c5
at 0c665d2e:0xc7d326
at 0c665d2e:0x20266bb
at 0c665d2e:0xc7d326
at 0c665d2e:0x925e4d
at 0c665d2e:0x6ac42c
at 0c665d2e:0xc7edea
at 0c665d2e:0x203ec1e
```
If the texture is set to any other compression mode, the project will run in browser without issue. Tested on PNG and JPG formats, the issue persists with both.
### Steps to reproduce
- Create a 3D scene, add a MeshInstance3D, add any texturable mesh.
- Drag an image from the filesystem to the mesh Material property.
- Go to the Import tab with that image selected, set Compress>Mode to Basis Universal, then Reimport.
- Set up HTML5 export, then Remote Deploy>Run in Browser.
- Project should display "null function or function signature mismatch" error, open developer console to see the error.
### Minimal reproduction project (MRP)
[BasisUniversalMRP.zip](https://github.com/user-attachments/files/21603288/BasisUniversalMRP.zip)
Contributor guide
Research direction
Start with BasisUniversalMRP.zip and reproduce the HTML5 export using the listed steps, then inspect the browser console around the imported .ctex texture and the null function error. Compare the Basis Universal path with PNG, JPG, and other compression modes; done means the HTML5 project loads the texture and runs without that error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, html
- Domain
- game-dev, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100