madskristensen / BundlerMinifier

Visual Studio extension
Other
611 stars 171 forks source link

VS2019 locks up and eventually crashes when changing git branches #571

Open aboone-fusion opened 2 years ago

aboone-fusion commented 2 years ago

extension 2.8.396

https://github.com/madskristensen/BundlerMinifier/blob/e6edb78df1efd3eb3d15589ffbb129a75e6ee58a/src/BundlerMinifierVsix/Helpers/ProjectHelpers.cs#L140

the main thread was stuck at the line above, but another thread was stuck at this line below, and blocking a bunch of other threads.

https://github.com/madskristensen/BundlerMinifier/blob/e6edb78df1efd3eb3d15589ffbb129a75e6ee58a/src/BundlerMinifierVsix/Commands/ProjectEventCommand.cs#L139

VS spawned new threads occasionally, until the process crashed (10min+) Seems to be something to do with git branches that have an output file(s) included in the projects, and other branches that do not yet -- the UI froze while reloading the project.. Its difficult to reproduce, doesn't always happen -- but once one of the teams devs started having the issue, it would reoccur fairly frequently.

the bundle option { "includeInProject": false } seems to works around the issue by not calling the first line above

the config is structured like this, though there are many more entries...

[ { "outputFileName": "Main/stuff.bundle.js", "inputFiles": [ "stuff.js", "stuff2.js" ], "minify": { "enabled": false, "renameLocals": false } }, { "outputFileName": "Main/stuff.min.js", "inputFiles": [ "Main/stuff.bundle.js" ], "sourceMap": true }, { "outputFileName": "Resources/otherstuff.min.js", "inputFiles": [ "Resources/otherstuff.js "sourceMap": true },