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

Creating a x.js file crashes VS if x.ts exists #890

Closed
joneff opened this issue Apr 10, 2014 · 11 comments
Closed

Creating a x.js file crashes VS if x.ts exists #890

joneff opened this issue Apr 10, 2014 · 11 comments

Comments

@joneff
Copy link

joneff commented Apr 10, 2014

Steps to produce

  1. Empty web site
  2. Add x.ts
  3. create x.js

Previously, when I created x.ts file I would also get the x.js file as well. Using VS2013 U2 RC w/ WE latest.

This may be related to #878.

@am11
Copy link
Contributor

am11 commented Apr 10, 2014

@joneff,

  • Can you reproduce it with latest nightly build?
  • What is the exception? Open an new VS instance and attach debugger to other devenv process to capture the exception stack trace.

BTW, I can't reproduce this issue with Web Application, or Web Site project. Also, you didn't mentioned if its a regular website or a TypeScript website project? Either way, I can't reproduce the issue. Disable WE and try again. If its not related to WE, you cam report this issue in their repo https://typescript.codeplex.com/.

@madskristensen, with regular WebSite project, in the Add New File dialog we have all kinds of files: JSON, SCSS, CoffeeScript, LESS etc.. except for TypeScript .. Is it by design?
Also, it shows default file icon for .ts as if its unknown file type.

@joneff
Copy link
Author

joneff commented Apr 10, 2014

I updated to latest nightly yesterday and I found no new internal, so I am guessing I am running the latest.

About the stack trace, I wasn't really able to to get it. I did attach the one instance to the other, but all I got was this:

System.InvalidOperationException was unhandled
Message: An unhandled exception of type 'System.InvalidOperationException' occurred in WindowsBase.dll
Additional information: The calling thread cannot access this object because a different thread owns it.

Did I do something wrong?

@am11
Copy link
Contributor

am11 commented Apr 10, 2014

That exception is already handled. VS crashing is caused by something else.

Can you reproduce the same when WE is disabled/uninstalled?

@joneff
Copy link
Author

joneff commented Apr 10, 2014

If I disable WE, the issue does not happen.

@am11
Copy link
Contributor

am11 commented Apr 10, 2014

Can you make example project and upload it somewhere?

@joneff
Copy link
Author

joneff commented Apr 10, 2014

Here is the proj + site: https://www.dropbox.com/s/t9npascc6cniere/site.zip. Just add x.js

@am11
Copy link
Contributor

am11 commented Apr 10, 2014

  • Downloaded and Unzipped.
  • Opened solution.
  • Right-clicked project in Solution Explorer, Add > JavaScript File > x > Enter.

No crash.

@joneff
Copy link
Author

joneff commented Apr 10, 2014

I might as well be missing something. Here is a screen capture of the crashing and debugging instances.

@am11
Copy link
Contributor

am11 commented Apr 10, 2014

@joneff, I still can't reproduce this issue locally. See if #871 is related. Can you try this fix:
#871 (comment), and see if it fixes your issue?

@joneff
Copy link
Author

joneff commented Apr 11, 2014

This is from my event viewer. Not sure if it's helpful

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException
Stack:
   at System.IO.__Error.WinIOError(Int32, System.String)
   at System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean, Boolean)
   at System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, System.String, Boolean, Boolean, Boolean)
   at System.IO.StreamReader..ctor(System.String, System.Text.Encoding, Boolean, Int32, Boolean)
   at System.IO.File.InternalReadAllText(System.String, System.Text.Encoding, Boolean)
   at System.IO.File.ReadAllText(System.String)
   at MadsKristensen.EditorExtensions.TypeScript.TypeScriptCompilationNotifier.RaiseReady()
   at MadsKristensen.EditorExtensions.TypeScript.TypeScriptCompilationNotifier.FileTouched(System.Object, System.IO.FileSystemEventArgs)
   at System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs)
   at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32, System.String)
   at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32, UInt32, System.Threading.NativeOverlapped*)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)

@am11
Copy link
Contributor

am11 commented Apr 11, 2014

This is duplicate of #871.

Lets close this and track this issue there.

@joneff joneff closed this as completed Apr 11, 2014
am11 added a commit to am11/WebEssentials2013 that referenced this issue Apr 14, 2014
* Uses Enterprise Library for "retry policy".
* Routes all File IO read/write calls to helper.
* Fixes CoffeeScript, SCSS and LESS compilation-
  related issues.
* Fixes TypeScript crashing issues.
* Fixes tests.
* Other minor fixes.
* Targeting madskristensen#871, madskristensen#887, madskristensen#890, madskristensen#897, madskristensen#868 & madskristensen#904.
SLaks pushed a commit to SLaks/WebEssentials2013 that referenced this issue May 13, 2014
* Uses Enterprise Library for "retry policy".
* Routes all File IO read/write calls to helper.
* Fixes CoffeeScript, SCSS and LESS compilation-
  related issues.
* Fixes TypeScript crashing issues.
* Fixes tests.
* Other minor fixes.
* Targeting madskristensen#871, madskristensen#887, madskristensen#890, madskristensen#897, madskristensen#868 & madskristensen#904.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants