processing / processing/p5.js

Using DOM.js library kills console.log

Open
#7,610 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:DOM Bug
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Most appropriate sub-area of p5.js?
  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)
p5.js version

p5.js/1.11.1

Web browser and version

133.0.6943.127 (Official Build) (arm64)

Operating system

macosx

Steps to reproduce this
Steps:
  1. open https://editor.p5js.org/jht9629-nyu/sketches/VY-KQxJkA
  2. run
  3. error appears in console:
  4. "RangeError: Maximum call stack size exceeded"
  5. comment out DOM.js include in index.html
  6. run script and console now shows expected messages

-Also logged as issue on DOM.js:

Snippet:

// https://editor.p5js.org/jht9629-nyu/sketches/VY-KQxJkA
// DOM.js console.log bug
// run this sketch and get error:
//   "RangeError: Maximum call stack size exceeded"
// disable DOM.js include and console.log works
//
function setup() {
 console.log('in setup');
}

function draw() {
 console.log('in draw'); 
}

console.log('pre setup');

index.html scripts
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/p5.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/addons/p5.sound.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/lenincompres/DOM.js@latest/DOM.js"></script>

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 reproducing the p5.js Editor sketch VY-KQxJkA with the scripts listed in index.html, especially p5.js 1.11.1 and the DOM.js include. Compare console.log behavior with DOM.js enabled and disabled; done means the reproduced RangeError is resolved or clearly isolated, with the expected setup and draw messages appearing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.