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

Problem with Project.getAllFiles #7073

@fdecampredon

Description

@fdecampredon

When I try to use project.getAllFiles on a "big project" (typescript compiler) the promise returned by getAllFiles() never resolve. I use this the #6530 PR code .
I was able to debug a bit and ends up with this error:

TypeError: Cannot read property 'length' of undefined
    at Object.o.Callbacks.k.add [as done] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:26811)
    at Object.getAllFiles (file:///Applications/Brackets.app/Contents/dev/src/project/ProjectManager.js:1950:29)
    at FileSystem.init (file:///Users/kapit/Library/Application%20Support/Brackets/extensions/user/brackets-typescript/built/main.js:71507:29)
    at new FileSystem (file:///Users/kapit/Library/Application%20Support/Brackets/extensions/user/brackets-typescript/built/main.js:71420:14)
    at initServices (file:///Users/kapit/Library/Application%20Support/Brackets/extensions/user/brackets-typescript/built/main.js:71669:18)
    at init (file:///Users/kapit/Library/Application%20Support/Brackets/extensions/user/brackets-typescript/built/main.js:71651:5)
    at file:///Users/kapit/Library/Application%20Support/Brackets/extensions/user/brackets-typescript/main.js:22:21
    at _callHandler (file:///Applications/Brackets.app/Contents/dev/src/utils/AppInit.js:59:13)
    at Object._dispatchReady (file:///Applications/Brackets.app/Contents/dev/src/utils/AppInit.js:74:13)
    at Object.<anonymous> (file:///Applications/Brackets.app/Contents/dev/src/brackets.js:239:33)
    at o.Callbacks.j (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:26676)
    at Object.o.Callbacks.k.add [as done] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:26985)
    at Object.o.extend.Deferred.d.always (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:27861)
    at file:///Applications/Brackets.app/Contents/dev/src/brackets.js:237:30
    at o.Callbacks.j (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:26676)
    at Object.o.Callbacks.k.fireWith [as resolveWith] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:27489)
    at o.extend.Deferred.o.each.e.(anonymous function) (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:28469)
    at file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:28045
    at o.Callbacks.j (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:26676)
    at Object.o.Callbacks.k.fireWith [as resolveWith] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:27489)
    at o.extend.Deferred.o.each.e.(anonymous function) (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:28469)
    at file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:28045
    at o.Callbacks.j (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:26676)
    at Object.o.Callbacks.k.add [as done] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:26985)
    at Array.<anonymous> (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:28022)
    at Function.o.extend.each (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:2877)
    at Object.<anonymous> (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:27963)
    at Function.o.extend.Deferred (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:28549)
    at Object.o.extend.Deferred.d.then (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:27940)
    at Object.<anonymous> (file:///Applications/Brackets.app/Contents/dev/src/project/ProjectManager.js:1104:59)
    at o.Callbacks.j (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:26676)
    at Object.o.Callbacks.k.fireWith [as resolveWith] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:27489)
    at Object.o.extend.Deferred.o.each.e.(anonymous function) (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:28469)
    at Object.<anonymous> (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:28045)
    at o.Callbacks.j (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:26676)
    at Object.o.Callbacks.k.fireWith [as resolveWith] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:27489)
    at Object.o.extend.Deferred.o.each.e.(anonymous function) [as resolve] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:28469)
    at _reopenNodes (file:///Applications/Brackets.app/Contents/dev/src/project/ProjectManager.js:455:28)
    at Object.<anonymous> (file:///Applications/Brackets.app/Contents/dev/src/project/ProjectManager.js:481:17)
    at o.Callbacks.j (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:26676)
    at Object.o.Callbacks.k.fireWith [as resolveWith] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:27489)
    at Object.o.extend.Deferred.o.each.e.(anonymous function) [as resolve] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:28469)
    at Object.<anonymous> (file:///Applications/Brackets.app/Contents/dev/src/utils/Async.js:118:44)
    at o.Callbacks.j (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:26676)
    at Object.o.Callbacks.k.fireWith [as resolveWith] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:27489)
    at Object.o.extend.Deferred.o.each.e.(anonymous function) [as resolve] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:28469)
    at file:///Applications/Brackets.app/Contents/dev/src/project/ProjectManager.js:475:32
    at Object.$.jstree.plugin._fn.open_node (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jstree_pre1.0_fix_1/jquery.jstree.js:653:30)
    at Object.$.jstree.plugin.$.each.$.jstree._fn.(anonymous function) [as open_node] (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jstree_pre1.0_fix_1/jquery.jstree.js:234:19)
    at Object.<anonymous> (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jstree_pre1.0_fix_1/jquery.jstree.js:640:42)
    at Object.<anonymous> (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jstree_pre1.0_fix_1/jquery.jstree.js:1648:165)
    at Object.<anonymous> (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jstree_pre1.0_fix_1/jquery.jstree.js:1704:29)
    at o.extend.proxy.o.isFunction.f (file:///Applications/Brackets.app/Contents/dev/src/thirdparty/jquery-2.1.0.min.js:2:3712)
    at processEntries (file:///Applications/Brackets.app/Contents/dev/src/project/ProjectManager.js:811:13)
    at file:///Applications/Brackets.app/Contents/dev/src/project/ProjectManager.js:860:17
    at _applyAllCallbacks (file:///Applications/Brackets.app/Contents/dev/src/filesystem/Directory.js:111:26)
    at Directory.<anonymous> (file:///Applications/Brackets.app/Contents/dev/src/filesystem/Directory.js:204:13)
    at file:///Applications/Brackets.app/Contents/dev/src/filesystem/impls/appshell/AppshellFileSystem.js:280:25
    at file:///Applications/Brackets.app/Contents/dev/src/filesystem/impls/appshell/AppshellFileSystem.js:220:17

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions