openframeworks / openframeworks/openFrameworks

particleExample runtime error: integer overflow (Compiled for WebAssembly)

Open
#5,702 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

Hey,

many examples and all my own projects run perfectly when compiled for WebAssembly but in some example projects e.g "particleExample" I get this exception:

Chrome:
exception thrown: RuntimeError: integer result unrepresentable

Firefox:
exception thrown: RuntimeError: integer overflow,wasm-function

Seems like Unity had the same problem but somehow they managed to fix it: https://forum.unity3d.com/threads/integer-overflow-integer.468203/

(I add PROJECT_LDFLAGS=-s WASM=1 to the config.make file to compile to wasm)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by compiling the particleExample with PROJECT_LDFLAGS=-s WASM=1 in config.make and reproduce the browser-specific integer overflow in Chrome or Firefox. Inspect the particleExample and its WebAssembly build configuration; done means the example runs without the reported integer overflow in both browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, wasm
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.