R# button misbehaves

I tried to send some feedback using the R# misbehaves button, but every time it throws on the web an exception: last time it was this

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.


exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /resharper/misbehaves/thanks.jsp at line 81


78:                 if (fieldName.equals("email")) email = item.getString();
79:             } else {
80:                 fileName = item.getName();
81:                 if (item.getContentType().startsWith("image/")) contentType_img = true;
82:                 if (contentType_img) {
83:                     File path = new File(rootPath + "/resharper/uploads");
84:                     File uploadedFile = new File(path + "/" + (int) Math.ceil(Math.random() * 1000000) + "_" + fileName);




Stacktrace:
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:519)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:428)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:717)




root cause
java.lang.NullPointerException
 org.apache.jsp.resharper.misbehaves.thanks_jsp._jspService(thanks_jsp.java:194)
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.
Apache Tomcat/6.0.32




-> And my message was:
"when using in MVC 3 in .cshtml context action "create controller using VS", controller is created with namespace ".Views.Shared", but the namespace should be ".Controllers""
and few days afo iI wanted to send:
"writing Razor code/intellisense in MVC3 is painfully slow - when I got for example

 <li>@Html.ActionLink("Home", "LogoShow")</li>

in partial strongly typed view and I delete letters in "Logoshow" using backspace, visual studio stops after deleting each letter for one second, processing something - even on Core-i7 with 8 threads!

Also using red colors for highlighting nonexistent actions in controllers is a bit much - red should mean "cannot compile, hard error", not "action not yet implemented, but it works otherwise"."

5 comments

On 21.06.2011 17:04, Martin Suchan wrote:

"when using in MVC 3 in .cshtml context action "create controller using VS", controller is created with namespace ".Views.Shared", but the namespace should be ".Controllers""


Martin, could you, please, give more details on this issue.
Where were file laying from which you invoked QF? Is it was view or controller?
Where new controller file has been created?

0

OK - I'm in file Views/Shared/_Layout.cshtml - in MVC 3 Web Application project using template "Internet application" with Razor and HTML5 settings.
I got line:


@Html.Action("Menu", "Nav")
Controller Nav does not exists, both Menu and Nav is red, I got cursor on Nav, I press Alt+Enter, two options came up at the top
Create Contrroler Nav
Create Controller Nav using VS <- I click this option
Menu for creating controller came up - there is also a problem, the name in this dialog is  "Default1Controller" but it should be, if possible, NavController
So I change the name to NavController in the dialog, I choose Empty controller and press OK
New controller is created in Controllers/NavController.cs but in the file it got namespace <projectname>.Views.Shared but it should be <projectname>.Controllers



Also as I mentioned - editing cshtml Razor files is stilll pretty slow - I know Razor is new young language and everything, but even though it should be improved at least a bit before shipping RTM
0

On 22.06.2011 12:34, Martin Suchan wrote:

OK - I'm in file Views/Shared/_Layout.cshtml - in MVC 3 Web Application project using template "Internet application" with Razor and HTML5 settings.
I got line:

>

@Html.Action("Menu", "Nav")
Controller Nav does not exists, both Menu and Nav is red, I got cursor on Nav, I press Alt+Enter, two options came up at the top
Create Contrroler Nav
Create Controller Nav using VS<- I click this option
Menu for creating controller came up - there is also a problem, the name in this dialog is  "Default1Controller" but it should be, if possible, NavController
So I change the name to NavController in the dialog, I choose Empty controller and press OK
New controller is created in Controllers/NavController.cs but in the file it got namespace<projectname>.Views.Shared but it should be<projectname>.Controllers


Martin, this is fixed in RC.

Also as I mentioned - editing cshtml Razor files is stilll pretty slow - I know Razor is new young language and everything, but even though it should be improved at least a bit before shipping RTM


Also, the typing speed should be improvedd too in RC.

0

On 21.06.2011 17:04, Martin Suchan wrote:

"writing Razor code/intellisense in MVC3 is painfully slow - when I got for example

>

  <li>@Html.ActionLink("Home", "LogoShow")</li>

>

Also using red colors for highlighting nonexistent actions in controllers is a bit much - red should mean "cannot compile, hard error", not "action not yet implemented, but it works otherwise"."


Martin, these highlightins are configurable.
You can change their severity or disable by comment inplace.
All actions are available in context menu (quick fixes).

0

"Martin, this is fixed in RC."
Confirmed, great :)

But I have discovered probably another issue, how to reproduce:
R# 6 RC, VS2010 SP1, Win7 x64 SP1
It's related to razor files, again. Open/Create MVC 3 solution/project
open any 3+ cshtml files; close the solution, reopen the solution - these three files are now open, one of them is active.
Now -> when you switch to the second of these three opened files, click somewhere in the code and start writing any letters and then start pressing backspace - it's not working! I'm pressing backspace and nothing is deleted (using Del key works though)
When I switch to the first file and then back to the file I was editing, deleting using backspace works. It even works for files opened directly from solution explorer. On my machine it's 100% reproducible for cshtml files which are open after opening Solution.
I've even waited until all "assembly processing" in the right bottom corner is finished, so there is no race condition when the file is processed at the beginning.

Can you reproduce this issue as well and is this R# issue or something from VS? I guess it's rather rare problem, but still, it can be pretty annoying.

0

Please sign in to leave a comment.