Closed Bug 1835990 Opened 1 year ago Closed 1 year ago

Trying to expand properties in tooltip throws: "Can not send request 'enumSymbols' because front 'obj' is already destroyed."

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(firefox115 verified, firefox116 verified)

VERIFIED FIXED
115 Branch
Tracking Status
firefox115 --- verified
firefox116 --- verified

People

(Reporter: Honza, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

(Whiteboard: [devtools:relnote])

Attachments

(1 file)

STRs:

  1. Open DevTools, select the Debugger panel
  2. Load http://janodvarko.cz/firebug/tests/601/Issue601.htm
  3. Create BP in Issue601.htm on line 50
  4. Click the button on the page to hit the BP
  5. Hover mouse over request, try to expand the upload variable (several levels deep), try anything else expandable, try to display the tooltip (with expanded content) and hide it quickly by moving mouse out. And display again and try to expand things.
  6. If it works, step over and try step #5 again. You need to play with that a bit, but I can break it almost every time, after 10-20 seconds.
    Edit: stepping should not be needed to reproduce the problem
  7. At some point the following error is displayed in the Browser Console and nothing in the tooltip can be expanded.

Honza

Error in enumSymbols Error: Can not send request 'enumSymbols' because front 'obj' is already destroyed.
    name resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:28
    enumSymbols resource://devtools/client/fronts/object.js:178
    enumSymbols resource://devtools/client/shared/components/object-inspector/utils/client.js:49
    loadItemProperties resource://devtools/client/shared/components/object-inspector/utils/load-properties.js:82
    nodeLoadProperties resource://devtools/client/shared/components/object-inspector/actions.js:48
    thunk resource://devtools/client/debugger/src/actions/utils/middleware/thunk.js:29
    dispatch Redux
    nodeExpand resource://devtools/client/shared/components/object-inspector/actions.js:23
    thunk resource://devtools/client/debugger/src/actions/utils/middleware/thunk.js:29
    bindActionCreator Redux
    setExpanded resource://devtools/client/shared/components/object-inspector/components/ObjectInspector.js:237
    onExpand resource://devtools/client/shared/components/object-inspector/components/ObjectInspector.js:318
    onClick resource://devtools/client/shared/components/Tree.js:1008
    React 19
client.js:53:13

The STR is even simplier and 100% reproducible.
on Step 5, hover request, scroll down, expand upload only once, then hide and reshow the preview, try expanding anything in upload it will fail and throw in the browser console.

It sounds like the ObjectInspector release the expanded attributes when the preview in hidden, but the same object actors are re-used on the new preview.

Severity: -- → S3
Priority: -- → P2
Summary: Can not send request 'enumSymbols' because front 'obj' is already destroyed. → Trying to expand properties in tooltip throws: "Can not send request 'enumSymbols' because front 'obj' is already destroyed."

The ObjectInspector releases actors on unmount to avoid
consuming memory, but this introduces unwanted behavior
in the Debugger tooltip as the tooltip can be hidden and
shown again, with the same underlying Object front.
In such case, you were not able to expand any of the
properties anymore, which is very frustrating.
To prevent this, we add a new prop to the ObjectInspector
to drive the auto release of the object actor, and we set
it to false for the tooltip ObjectInspector.
A test case is added to ensure we don't regress this.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5d642eb9394b
[devtools] Don't release underlying object actor on ObjectInspector unmount for debugger tooltip. r=devtools-reviewers,bomsy.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
QA Whiteboard: [qa-115b-p2]
Whiteboard: [devtools:relnote]

Reproducible on a 2023-06-01 Nightly build on Windows 10.
Verified as fixed on Firefox 115.0(build ID: 20230626153624) and Nightly 116.0a1(build ID: 20230627214548) on Windows 10, macOS 12, Ubuntu 22.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-115b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: