processing / processing/p5.js-web-editor

Using DOM.js library kills console.log

Open
#3,386 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
JavaScript
Stars
1.7k
Forks
1.7k
Avg merge
3d 4h
Merged PRs (30d)
8

Description

p5.js version

1.11.1

What is your operating system?

Mac OS

Web browser and version

133.0.6943.127 (Official Build) (arm64)

Actual Behavior
  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"
Expected Behavior
  1. comment out DOM.js include in index.html
  2. run script and console now shows expected messages:
pre setup 
in setup 
in draw 

Steps to reproduce
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"
Snippet:

Just the include of lenincompres/DOM.js causes simple console.log fails, eg:

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

DOM.js is a library by lenincompres included in the index.html
<script src="https://cdn.jsdelivr.net/gh/lenincompres/DOM.js@latest/DOM.js"></script>
Issue is also logged on his repo for the library:
lenincompres/DOM.js - console.log failure issue

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

Reproduce the failure from the linked p5.js Editor sketch, then inspect the DOM.js script include in index.html and compare the console behavior with that include removed. Review the linked lenincompres/DOM.js issue for context; done means the sketch can run and console.log produces the expected messages without a stack overflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.