Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't snap or split view with JSON files #102920

Closed
scooby359 opened this issue Jul 20, 2020 · 8 comments
Closed

Can't snap or split view with JSON files #102920

scooby359 opened this issue Jul 20, 2020 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@scooby359
Copy link

Open a file containing JSON text. Try and drag the tab to the right to split view, or right click on the tab and select split tab from the menu. The file closes and an error pops up with "Unable to open 'emailTemplates.json': Cannot read property 'strings' of null."

@IllusionMH
Copy link
Contributor

/needsMoreInfo

Please provide other info required by template (VS Code version, OS version, if reproduced without extension etc.).

Is it reproducible with all extensions disabled?
You can try this with F1 and >Developer: Reload Window With Extensions Disabled

Looks similar to #102348 . Do you see same stack if you open Help > Toggle developer Tools?

@bpasero
Copy link
Member

bpasero commented Jul 20, 2020

Please see if you can find any logged output that could help us find the source of the issue:

  • run code --verbose from the command line and attach the output
  • in Code select Help | Toggle Developer Tools and select the Console
  • attach any output you see in the Console you can find

Thanks!

@scooby359
Copy link
Author

scooby359 commented Jul 20, 2020

First error occurs when setting language to JSON:

  ERR Cannot read property 'strings' of null: TypeError: Cannot read property 'strings' of null
    at Function._subsetEquals (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1771:726)
    at Function._subsetEquals (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1771:875)
    at g.updateOptions (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1772:4)
    at e.updateOptions (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2286:606)
    at e.updateEditorConfiguration (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3636:749)
    at file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3634:633
    at c.fire (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:95:801)
    at file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2303:146
    at c.fire (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:95:801)
    at F.setMode (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1436:124)
    at k.setLanguage (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2661:907)
    at e.setMode (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2669:587)
    at e.setMode (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2999:79)
    at e.setMode (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:6049:31)
    at e.setMode (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:5628:254)
    at le.run (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:5650:418)
    at async Object.triggerAndDisposeAction (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2952:424)
    at async file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2952:149
    at async Object.accept (file:///C:/Users/chrisw/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2737:899)

Second error occurs when trying to split / snap screen:

  | onDidChangeNotification | @ | notificationsAlerts.ts:40
-- | -- | -- | --
  | (anonymous) | @ | notificationsAlerts.ts:26
  | fire | @ | event.ts:587
  | addNotification | @ | notifications.ts:207
  | notify | @ | notificationService.ts:106
  | doHandleOpenEditorError | @ | editorGroupView.ts:1062
  | (anonymous) | @ | editorGroupView.ts:990
  | async function (async) |   |  
  | (anonymous) | @ | editorGroupView.ts:979
  | doShowEditor | @ | editorGroupView.ts:977
  | doOpenEditor | @ | editorGroupView.ts:960
  | openEditor | @ | editorGroupView.ts:888
  | doMoveOrCopyEditorAcrossGroups | @ | editorGroupView.ts:1181
  | copyEditor | @ | editorGroupView.ts:1203
  | E | @ | editorCommands.ts:458
  | (anonymous) | @ | editorCommands.ts:473
  | invokeFunction | @ | instantiationService.ts:61
  | _tryExecuteCommand | @ | commandService.ts:84
  | (anonymous) | @ | commandService.ts:73
  | Promise.then (async) |   |  
  | executeCommand | @ | commandService.ts:73
  | run | @ | actions.ts:294
  | run | @ | actions.ts:361
  | runAction | @ | actions.ts:198
  | run | @ | actions.ts:190
  | onClick | @ | actionbar.ts:183
  | (anonymous) | @ | actionbar.ts:161


@scooby359
Copy link
Author

Version: 1.47.2 (user setup)
Commit: 17299e4
Date: 2020-07-15T18:22:06.216Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041

Tried running with no extensions - error still occurs

@bpasero bpasero assigned alexdima and unassigned bpasero Jul 21, 2020
@bpasero bpasero added editor and removed info-needed Issue requires more information from poster labels Jul 21, 2020
@bpasero
Copy link
Member

bpasero commented Jul 21, 2020

This seems to be editor options:

private static _subsetEquals(base: { [key: string]: any }, subset: { [key: string]: any }): boolean {

Moving to @alexdima

@alexdima
Copy link
Member

@scooby359 Do you have any nulls in your user settings.json ?

@alexdima alexdima added the info-needed Issue requires more information from poster label Jul 21, 2020
@scooby359
Copy link
Author

scooby359 commented Jul 21, 2020

Yes, found a couple:

"gitlens.menus": null,
"editor.quickSuggestions": null,

I've changed them to false and the error when snapping / splitting JSON editors no longer occurs

@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jul 21, 2020
@alexdima alexdima added this to the July 2020 milestone Jul 21, 2020
joaomoreno pushed a commit that referenced this issue Jul 21, 2020
@isidorn isidorn added the verified Verification succeeded label Aug 6, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Sep 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants
@bpasero @IllusionMH @isidorn @alexdima @sbatten @scooby359 and others