VS 2017 RC Crashing when opening PHP projects
13 posts
• Page 1 of 2 • 1, 2
VS 2017 RC Crashing when opening PHP projects
I'm not 100% sure this is the PHP tools extension, only about 80%. But when I try to open a second PHP project, whether it's in an entirely separate instance of VS, or even as a second project in my main solution, VS 2017 will fatally crash.
I kinda need this to work as I have quite a few composer libraries that I work on while I'm working on my main project. So normally when I'm working on my main project and I need to make changes to a library, I spin up a new VS instance and open the library project directly. This works fine in VS 2015.
Now here's the rub. If I go into the library directory and just delete "composer.json" before I open the project, the project will open fine. Obviously I can't do this as a permanent fix, but it's got me out of trouble for now.
Would someone be able to debug this issue and fix if it is indeed the PHP tools extension? Many Thanks.
I kinda need this to work as I have quite a few composer libraries that I work on while I'm working on my main project. So normally when I'm working on my main project and I need to make changes to a library, I spin up a new VS instance and open the library project directly. This works fine in VS 2015.
Now here's the rub. If I go into the library directory and just delete "composer.json" before I open the project, the project will open fine. Obviously I can't do this as a permanent fix, but it's got me out of trouble for now.
Would someone be able to debug this issue and fix if it is indeed the PHP tools extension? Many Thanks.
-
jazz - Posts: 41
- Joined: August 25th, 2016, 1:59 am
- Location: Canberra, Australia
Re: VS 2017 RC Crashing when opening PHP projects
Hello,
Thanks for letting us know about the issue. Could you please send us activity log, hopefully there will be log of the exception that's happening. https://docs.devsense.com/troubleshooting/activitylog-xml
Thanks!
Thanks for letting us know about the issue. Could you please send us activity log, hopefully there will be log of the exception that's happening. https://docs.devsense.com/troubleshooting/activitylog-xml
Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: VS 2017 RC Crashing when opening PHP projects
So I finally got around getting a log. The process is a little different in VS2017, but I managed to figure it out quite easily.
I have attached the log file. To re-create the issue I did the following:
* Started VS2017 with logging enabled.
* Opened my main project.
* Right-clicked the solution in solution explore to add a new item
* Added an existing project
This is where it crashes. The project I tried to add is my main composer library (MVC framework) but it appears any project with a composer.json file will cause the crash. If I delete the composer.json file from the library I can restart VS2017 without it crashing.
Thanks.
I have attached the log file. To re-create the issue I did the following:
* Started VS2017 with logging enabled.
* Opened my main project.
* Right-clicked the solution in solution explore to add a new item
* Added an existing project
This is where it crashes. The project I tried to add is my main composer library (MVC framework) but it appears any project with a composer.json file will cause the crash. If I delete the composer.json file from the library I can restart VS2017 without it crashing.
Thanks.
You do not have the required permissions to view the files attached to this post.
-
jazz - Posts: 41
- Joined: August 25th, 2016, 1:59 am
- Location: Canberra, Australia
Re: VS 2017 RC Crashing when opening PHP projects
Hello,
Thanks for the activity log, unfortunately I don't see any related error or exception. Did you crash the VS once started with /log parameter ?
Of could you please send me the composer.json which cause it to crash I could try to replicate this.
Thanks,
Thanks for the activity log, unfortunately I don't see any related error or exception. Did you crash the VS once started with /log parameter ?
Of could you please send me the composer.json which cause it to crash I could try to replicate this.
Thanks,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: VS 2017 RC Crashing when opening PHP projects
Ok, this morning I have just completed LOTS of testing to try and figure this out. You dropped a big hint by asking for the composer.json file that has caused the crash.
So because of that, I think I have figured it out.
It is because of the "require" directives in the composer.json file. Now, this is just an assumption, but when the composer.json file is loaded the package requirements are going to be checked. And because it's a library project I'm trying to load these requirements are not going to be met and in fact, the "vendor" folder isn't even going to exist.
And there it is. If the extension is expecting this folder to exist and it's not there, then CRASH!!
I have confirmed that this is what is happening by doing the following:
* Open Visual Studio 2017 RC
* Create a new PHP web project.
* Add a composer package. ANY package is fine. I used hazaarlabs/hazaar-mvc which is my framework.
* Save everything and Exit VS (closing the solution does not always trigger this for some reason.... cache?).
* In explorer, navigate to the project folder and delete the "vendor" folder.
* Open the project you just created in VS2017.
* It will crash.
Here is a link to a quick video I did showing exactly what I did to make it crash. https://youtu.be/f2uMTJ-wJK4
Hope that helps.
Jamie
So because of that, I think I have figured it out.
It is because of the "require" directives in the composer.json file. Now, this is just an assumption, but when the composer.json file is loaded the package requirements are going to be checked. And because it's a library project I'm trying to load these requirements are not going to be met and in fact, the "vendor" folder isn't even going to exist.
And there it is. If the extension is expecting this folder to exist and it's not there, then CRASH!!
I have confirmed that this is what is happening by doing the following:
* Open Visual Studio 2017 RC
* Create a new PHP web project.
* Add a composer package. ANY package is fine. I used hazaarlabs/hazaar-mvc which is my framework.
* Save everything and Exit VS (closing the solution does not always trigger this for some reason.... cache?).
* In explorer, navigate to the project folder and delete the "vendor" folder.
* Open the project you just created in VS2017.
* It will crash.
Here is a link to a quick video I did showing exactly what I did to make it crash. https://youtu.be/f2uMTJ-wJK4
Hope that helps.
Jamie
-
jazz - Posts: 41
- Joined: August 25th, 2016, 1:59 am
- Location: Canberra, Australia
Re: VS 2017 RC Crashing when opening PHP projects
Hi Jamie,
Thank you for putting so much effort to this! Thanks to your detailed description and video it was very easy to fix it! We should have preview version with the update very soon, so you can try it out.
Just note... this happens only in VS2017 RC, all the other VS versions are fine.
Thanks and have a great day,
Thank you for putting so much effort to this! Thanks to your detailed description and video it was very easy to fix it! We should have preview version with the update very soon, so you can try it out.
Just note... this happens only in VS2017 RC, all the other VS versions are fine.
Thanks and have a great day,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: VS 2017 RC Crashing when opening PHP projects
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: VS 2017 RC Crashing when opening PHP projects
Hi Miloslav,
It now looks to be working for the removing problem with a missing "vendor" folder! Thanks!
However, VS2017 still crashes when I try to add the library project to the open solution. I guess I was wrong and they are not actually the same problem. For now though I can at least open the library to edit it in a second instance of VS while I'm debugging my main app. That will keep me out of trouble.
Also, nothing major, but I think the build versions are off. Downloading 9415 and trying to install it, it says it was already installed. So I removed the existing extension and re-installed without a problem. The version in "Help/PHP Tools..." still says 9350, however the symptoms of my problem have changed.
Thanks again.
Jamie
It now looks to be working for the removing problem with a missing "vendor" folder! Thanks!
However, VS2017 still crashes when I try to add the library project to the open solution. I guess I was wrong and they are not actually the same problem. For now though I can at least open the library to edit it in a second instance of VS while I'm debugging my main app. That will keep me out of trouble.
Also, nothing major, but I think the build versions are off. Downloading 9415 and trying to install it, it says it was already installed. So I removed the existing extension and re-installed without a problem. The version in "Help/PHP Tools..." still says 9350, however the symptoms of my problem have changed.
Thanks again.
Jamie
-
jazz - Posts: 41
- Joined: August 25th, 2016, 1:59 am
- Location: Canberra, Australia
Re: VS 2017 RC Crashing when opening PHP projects
Damn. Forget that. Just tried this again this morning (without any changes) and it's crashing again (still?).
Possibly a build issue because after installing the 9415 file it still says the version is 9350?
Possibly a build issue because after installing the 9415 file it still says the version is 9350?
-
jazz - Posts: 41
- Joined: August 25th, 2016, 1:59 am
- Location: Canberra, Australia
Re: VS 2017 RC Crashing when opening PHP projects
Hi Jazz,
You were correct, 9350 had build issue in version for VS2017RC. Now it should be fixed in the latest preview https://www.devsense.com/download.
If you could give it a try to see if it's fixed for you now, it would be great!
Thanks!
You were correct, 9350 had build issue in version for VS2017RC. Now it should be fixed in the latest preview https://www.devsense.com/download.
If you could give it a try to see if it's fixed for you now, it would be great!
Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
13 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 49 guests