Skip to content

Conversation

@tstarling
Copy link

In Chromium 108.0.5359.124 I saw infinite recursion in maybeResize/resize/onBeforeFrame. So I added a recursion guard to maybeResize.

In Chromium 108.0.5359.124 I saw infinite recursion in
maybeResize/resize/onBeforeFrame. So I added a recursion guard to
maybeResize.
@jlfwong
Copy link
Owner

jlfwong commented Dec 16, 2022

Thanks for the contributions! In the case of this one, I'm reluctant to merge this without understanding first why there's infinite recursion. I generally bias heavily towards fixing causes rather than symptoms, and this sounds like a symptom of a logic error to me (probably one I wrote).

@tstarling
Copy link
Author

I can reproduce it by just going to https://www.speedscope.app/ and loading the example profile.

@jlfwong
Copy link
Owner

jlfwong commented Dec 24, 2022

@tstarling Interesting! Can you say more about exactly what you're doing? When I load up https://www.speedscope.app/ and loading the example profile and try zooming around and resizing the window, I'm not able to create a crash

@tstarling
Copy link
Author

No interaction, it fails to even show the profile. Actually, it's logging an exception when the page loads, before I even try to load the profile. Here's the console log after opening the page:

speedscope.tsx:5 speedscope v1.15.0
canvas-context.ts:34 WebGL initialized. renderer: ANGLE (NVIDIA Corporation, NVIDIA GeForce GTX 1650 with Max-Q Design/PCIe/SSE2, OpenGL 4.5.0), vendor: Google Inc. (NVIDIA Corporation), version: WebGL 1.0 (OpenGL ES 2.0 Chromium)
canvas-context.ts:57 Uncaught RangeError: Maximum call stack size exceeded
    at onBeforeFrame (canvas-context.ts:57:10)
    at graphics.ts:497:46
    at Set.forEach (<anonymous>)
    at a.resize (graphics.ts:497:32)
    at maybeResize (application.tsx:101:33)
    at onBeforeFrame (canvas-context.ts:63:7)
    at graphics.ts:497:46
    at Set.forEach (<anonymous>)
    at a.resize (graphics.ts:497:32)
    at maybeResize (application.tsx:101:33)
canvas-context.ts:57 Uncaught RangeError: Maximum call stack size exceeded
    at onBeforeFrame (canvas-context.ts:57:10)
    at graphics.ts:497:46
    at Set.forEach (<anonymous>)
    at a.resize (graphics.ts:497:32)
    at maybeResize (application.tsx:101:33)
    at onBeforeFrame (canvas-context.ts:63:7)
    at graphics.ts:497:46
    at Set.forEach (<anonymous>)
    at a.resize (graphics.ts:497:32)
    at maybeResize (application.tsx:101:33)
canvas-context.ts:57 Uncaught RangeError: Maximum call stack size exceeded
    at onBeforeFrame (canvas-context.ts:57:10)
    at graphics.ts:497:46
    at Set.forEach (<anonymous>)
    at a.resize (graphics.ts:497:32)
    at maybeResize (application.tsx:101:33)
    at onBeforeFrame (canvas-context.ts:63:7)
    at graphics.ts:497:46
    at Set.forEach (<anonymous>)
    at a.resize (graphics.ts:497:32)
    at maybeResize (application.tsx:101:33)
canvas-context.ts:57 Uncaught RangeError: Maximum call stack size exceeded
    at onBeforeFrame (canvas-context.ts:57:10)
    at graphics.ts:497:46
    at Set.forEach (<anonymous>)
    at a.resize (graphics.ts:497:32)
    at maybeResize (application.tsx:101:33)
    at onBeforeFrame (canvas-context.ts:63:7)
    at graphics.ts:497:46
    at Set.forEach (<anonymous>)
    at a.resize (graphics.ts:497:32)
    at maybeResize (application.tsx:101:33)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants