Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Cannot read property 'file' of null #12629

Closed
ficristo opened this issue Jul 29, 2016 · 2 comments
Closed

Cannot read property 'file' of null #12629

ficristo opened this issue Jul 29, 2016 · 2 comments

Comments

@ficristo
Copy link
Collaborator

I was running in this today:

ErrorNotification.js:125 Exception in 'activeEditorChange' listener on Object {_eventHandlers: Object, _EventDispatcher: true} TypeError: Cannot read property 'file' of null TypeError: Cannot read property 'file' of null
    at file:///C:/Program%20Files%20(x86)/Brackets/dev/src/extensions/default/NavigationAndHistory/main.js:594:27
    at t (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/thirdparty/lodash.js:6:249)
    at Function.findIndex (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/thirdparty/lodash.js:28:324)
    at _addToMROFList (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/extensions/default/NavigationAndHistory/main.js:593:23)
    at _handleActiveEditorChange (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/extensions/default/NavigationAndHistory/main.js:790:13)
    at Object.trigger (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/utils/EventDispatcher.js:233:40)
    at _notifyActiveEditorChanged (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/editor/EditorManager.js:165:17)
    at _handleCurrentFileChange (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/editor/EditorManager.js:182:9)
    at Object.trigger (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/utils/EventDispatcher.js:233:40)
    at file:///C:/Program%20Files%20(x86)/Brackets/dev/src/view/MainViewManager.js:1109:29window.console.error @ ErrorNotification.js:125trigger @ EventDispatcher.js:235_notifyActiveEditorChanged @ EditorManager.js:165_handleCurrentFileChange @ EditorManager.js:182trigger @ EventDispatcher.js:233(anonymous function) @ MainViewManager.js:1109trigger @ EventDispatcher.js:233Pane._notifyCurrentViewChange @ Pane.js:894Pane.showView @ Pane.js:1206_showEditor @ EditorManager.js:571openDocument @ EditorManager.js:643_edit @ MainViewManager.js:1201(anonymous function) @ MainViewManager.js:1265j @ jquery-2.1.3.min.js:2k.fireWith @ jquery-2.1.3.min.js:2e.(anonymous function) @ jquery-2.1.3.min.js:2(anonymous function) @ DocumentManager.js:379j @ jquery-2.1.3.min.js:2k.fireWith @ jquery-2.1.3.min.js:2e.(anonymous function) @ jquery-2.1.3.min.js:2(anonymous function) @ FileUtils.js:83(anonymous function) @ File.js:125(anonymous function) @ AppshellFileSystem.js:378
EventDispatcher.js:236 Assertion failed:trigger @ EventDispatcher.js:236_notifyActiveEditorChanged @ EditorManager.js:165_handleCurrentFileChange @ EditorManager.js:182trigger @ EventDispatcher.js:233(anonymous function) @ MainViewManager.js:1109trigger @ EventDispatcher.js:233Pane._notifyCurrentViewChange @ Pane.js:894Pane.showView @ Pane.js:1206_showEditor @ EditorManager.js:571openDocument @ EditorManager.js:643_edit @ MainViewManager.js:1201(anonymous function) @ MainViewManager.js:1265j @ jquery-2.1.3.min.js:2k.fireWith @ jquery-2.1.3.min.js:2e.(anonymous function) @ jquery-2.1.3.min.js:2(anonymous function) @ DocumentManager.js:379j @ jquery-2.1.3.min.js:2k.fireWith @ jquery-2.1.3.min.js:2e.(anonymous function) @ jquery-2.1.3.min.js:2(anonymous function) @ FileUtils.js:83(anonymous function) @ File.js:125(anonymous function) @ AppshellFileSystem.js:378
ErrorNotification.js:125 Exception in 'currentFileChange' listener on Object {_EventDispatcher: true, ALL_PANES: "ALL_PANES", ACTIVE_PANE: "ACTIVE_PANE", FIRST_PANE: "first-pane", SECOND_PANE: "second-pane"} TypeError: Cannot read property 'file' of null TypeError: Cannot read property 'file' of null
    at file:///C:/Program%20Files%20(x86)/Brackets/dev/src/extensions/default/NavigationAndHistory/main.js:594:27
    at t (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/thirdparty/lodash.js:6:249)
    at Function.findIndex (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/thirdparty/lodash.js:28:324)
    at _addToMROFList (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/extensions/default/NavigationAndHistory/main.js:593:23)
    at handleCurrentFileChange (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/extensions/default/NavigationAndHistory/main.js:777:10)
    at Object.trigger (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/utils/EventDispatcher.js:233:40)
    at file:///C:/Program%20Files%20(x86)/Brackets/dev/src/view/MainViewManager.js:1109:29
    at Pane.trigger (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/utils/EventDispatcher.js:233:40)
    at Pane._notifyCurrentViewChange (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/view/Pane.js:894:14)
    at Pane.showView (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/view/Pane.js:1206:14)window.console.error @ ErrorNotification.js:125trigger @ EventDispatcher.js:235(anonymous function) @ MainViewManager.js:1109trigger @ EventDispatcher.js:233Pane._notifyCurrentViewChange @ Pane.js:894Pane.showView @ Pane.js:1206_showEditor @ EditorManager.js:571openDocument @ EditorManager.js:643_edit @ MainViewManager.js:1201(anonymous function) @ MainViewManager.js:1265j @ jquery-2.1.3.min.js:2k.fireWith @ jquery-2.1.3.min.js:2e.(anonymous function) @ jquery-2.1.3.min.js:2(anonymous function) @ DocumentManager.js:379j @ jquery-2.1.3.min.js:2k.fireWith @ jquery-2.1.3.min.js:2e.(anonymous function) @ jquery-2.1.3.min.js:2(anonymous function) @ FileUtils.js:83(anonymous function) @ File.js:125(anonymous function) @ AppshellFileSystem.js:378
EventDispatcher.js:236 Assertion failed:

There are some null values in _mrofList. We should be sure this never happen or check for them.
/cc @swmitra

@petetnt
Copy link
Collaborator

petetnt commented Jul 29, 2016

Related to #12608?

@ficristo
Copy link
Collaborator Author

Hopefully fixed by #13418

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants