Closed
Bug 461682
Opened 17 years ago
Closed 10 years ago
Console doesn't show stack trace for "too much recursion" errors despite stack being available on the error object
Categories
(DevTools :: Console, enhancement, P2)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: bedney, Unassigned)
Details
(Whiteboard: [polish-backlog][gaming-tools])
Attachments
(1 file)
|
500 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3
It would be really great to get better error reporting for a endless recursion than the current simple 'too much recursion' error message, which makes finding the recursing code in large, highly factored codebases difficult.
Maybe a dump of the stack containing the frames that have been detected as being part of the recursion. Other ideas are welcome here.
Reproducible: Always
Steps to Reproduce:
1.Write code that recurses too much :-)
2.
3.
Actual Results:
Simple error message
Expected Results:
A more detailed error message, maybe with stack trace
Comment 1•17 years ago
|
||
Not sure where this goes, think maybe Core? But leave that for others.
Version: unspecified → Trunk
Updated•17 years ago
|
Whiteboard: DUPEME
Comment 2•15 years ago
|
||
Core:General is a better place than Firefox:General in any case.
Product: Firefox → Core
QA Contact: general → general
Updated•15 years ago
|
Assignee: nobody → general
Component: General → JavaScript Engine
QA Contact: general → general
Comment 3•12 years ago
|
||
We have been seeing this popping up somewhat often in Emscripten crosscompiled C/C++ sources. A better error message would be very helpful, since now it requires a bit of fudging around to get to the sources. The compiled applications are millions of lines long, generated by a compiler, so utterly incomprehensible for the user.
These are not necessarily cases where Emscripten compiler would have a bug. If the C/C++ code has an infinite recursion (or otherwise unusually long recursion that eventually tips the stack, but does not do so in native), execution will mysteriously fail with the "too much recursion" error and the user is left guessing in the dark.
Updated•12 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•12 years ago
|
||
"Too Much Recursion" does throw an exception that is catchable, and the exception object has a .stack on it. E.g.:
(function f() { try { f() } catch(e) { alert(e.stack) } })()
Now, related to asm.js is the problem that the .stack won't contain asm.js calls. Bug 947996 will add asm.js stack walking which should allow us to fix this.
| Assignee | ||
Updated•12 years ago
|
Assignee: general → nobody
Comment 5•10 years ago
|
||
Errors use SavedFrame stacks which should see asm.js frames. I'm going to retest.
Updated•10 years ago
|
Component: JavaScript Engine → Developer Tools: Debugger
Product: Core → Firefox
Comment 6•10 years ago
|
||
For whatever reason, the console isn't showing the stack despite the error object having one.
Whiteboard: DUPEME → [polish-backlog]
Updated•10 years ago
|
Component: Developer Tools: Debugger → Developer Tools: Console
Updated•10 years ago
|
Summary: Better error reporting for 'too much recursion' → Console doesn't show stack trace for "too much recursion" errors despite stack being available on the error object
Updated•10 years ago
|
Priority: -- → P2
Whiteboard: [polish-backlog] → [polish-backlog][gaming-tools]
Comment 7•10 years ago
|
||
Can't seem to reproduce with a simple case -- getting an asm.js compiled message, and getting an error thrown displaying the stack trace -- is there a STR for this?
Comment 8•10 years ago
|
||
Pinging for the above scenario -- am I misunderstanding (likely) or is this still an issue?
Flags: needinfo?(nfitzgerald)
Flags: needinfo?(jujjyl)
Comment 9•10 years ago
|
||
Seems to WFM now; let's file new bugs with specific test cases and STRs.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(nfitzgerald)
Resolution: --- → WORKSFORME
Updated•10 years ago
|
Flags: needinfo?(jujjyl)
Comment 10•10 years ago
|
||
Hmm, I think the original issue may have been the lack of asm.js callstacks, which was since fixed like Luke reported. Tried some test cases with Emscripten, and this works ok now.
| Reporter | ||
Comment 11•10 years ago
|
||
I reported this long enough ago that I can assure you it was not in regards to asm.js callstacks ;-).
I haven't seen this issue in a while, although I must confess that I don't use Firefox for major development these days, so it may still be an issue.
In any case, as far as me being the original reporter here, I have no problem with folks closing this out.
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•