Exceptions I would love to see fixed in 5.1

Here are some ways to get IDEA to throw exceptions, some even while just
editing java code. Looking at the exception reports in the tracker they
happen quite often. By providing the information to reproduce here I'm
hoping it's possible to fix these faster.

1. Unclosed string literal with back slash

Type or copy-paste an unclosed string literal containing a back slash
anywhere in a java source file. Wait a few seconds and boom!
http://www.jetbrains.net/jira/browse/IDEADEV-2956


2. Case statement completion

Completing a case statement which is not contained in a switch. Doesn't
happen as often, but it should work.
class Completion {
void foo() {
case // press ctrl+space here
}
}
http://www.jetbrains.net/jira/browse/IDEADEV-2970


3. Inverting an if statement inside a foreach loop

If I invert an if statement which is located in a foreach loop, IDEA
takes 100% cpu for a couple of seconds and then starts spewing
exceptions. IDEA does not return to a working state if it is not restarted.
void foo(String[] strings) {
for (String string : strings) {
if (string.equals("5")) { // invert me
System.out.println("five");
}
}
}
http://www.jetbrains.net/jira/browse/IDEA-4926
http://www.jetbrains.net/jira/browse/IDEADEV-2554


4. Inspection without description

The "Unused Property" inspection doesn't have a description. Trying the
view the description throws an exception. If I leave the focus on that
inspection and close the Errors dialog, it is impossible to open it
again without first closing IDEA and manually editing a config file. Two
issues in one I think: This inspection should have a description and
inspections without a description shouldn't throw exceptions.
http://www.jetbrains.net/jira/browse/IDEADEV-3103

Bas

10 comments

Hello Bas,

Thanks a lot for the hints!
1-3 fixed (first was most harmful, there was a bug in java lexer; and third
was most tough).

Ann promized to come up with 4th tomorrow.

-


Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Here are some ways to get IDEA to throw exceptions, some even while
just editing java code. Looking at the exception reports in the
tracker they happen quite often. By providing the information to
reproduce here I'm hoping it's possible to fix these faster.

1. Unclosed string literal with back slash

Type or copy-paste an unclosed string literal containing a back slash
anywhere in a java source file. Wait a few seconds and boom!
http://www.jetbrains.net/jira/browse/IDEADEV-2956

2. Case statement completion

Completing a case statement which is not contained in a switch.
Doesn't
happen as often, but it should work.
class Completion {
void foo() {
case // press ctrl+space here
}
}
http://www.jetbrains.net/jira/browse/IDEADEV-2970

3. Inverting an if statement inside a foreach loop

If I invert an if statement which is located in a foreach loop, IDEA
takes 100% cpu for a couple of seconds and then starts spewing
exceptions. IDEA does not return to a working state if it is not
restarted.
void foo(String[] strings) {
for (String string : strings) {
if (string.equals("5")) { // invert me
System.out.println("five");
}
}
}
http://www.jetbrains.net/jira/browse/IDEA-4926
http://www.jetbrains.net/jira/browse/IDEADEV-2554
4. Inspection without description

The "Unused Property" inspection doesn't have a description. Trying
the view the description throws an exception. If I leave the focus on
that inspection and close the Errors dialog, it is impossible to open
it again without first closing IDEA and manually editing a config
file. Two issues in one I think: This inspection should have a
description and inspections without a description shouldn't throw
exceptions. http://www.jetbrains.net/jira/browse/IDEADEV-3103

Bas



0

The one that I'm seeing a lot is:

Assertion failed
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:78)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:86)
at
com.intellij.codeInspection.ex.ProblemDescriptorImpl.]]>(ProblemDescriptorImpl.java:18)
at
com.intellij.codeInspection.ex.InspectionManagerEx.createProblemDescriptor(InspectionManagerEx.java:91)
at
com.intellij.codeInspection.localCanBeFinal.LocalCanBeFinal.checkCodeBlock(LocalCanBeFinal.java:49)
at
com.intellij.codeInspection.localCanBeFinal.LocalCanBeFinal.checkMethod(LocalCanBeFinal.java:18)
at
com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$1.run(LocalInspectionsPass.java:34)
at
com.intellij.psi.impl.PsiManagerImpl.performActionWithFormatterDisabled(PsiManagerImpl.java:149)
at
com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.doCollectInformation(LocalInspectionsPass.java:8)
at
com.intellij.codeInsight.daemon.impl.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:8)
at
com.intellij.codeInsight.daemon.impl.UpdateThread$2.run(UpdateThread.java:10)
at
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:230)
at
com.intellij.codeInsight.daemon.impl.UpdateThread.a(UpdateThread.java:32)
at
com.intellij.codeInsight.daemon.impl.UpdateThread.access$100(UpdateThread.java:35)
at
com.intellij.codeInsight.daemon.impl.UpdateThread$1.run(UpdateThread.java:2)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:51)
at
com.intellij.codeInsight.daemon.impl.UpdateThread.run(UpdateThread.java:26)


This happens pretty soon after I've opened up a jsp file.

Guy

Bas Leijdekkers wrote:

Here are some ways to get IDEA to throw exceptions, some even while just
editing java code. Looking at the exception reports in the tracker they
happen quite often. By providing the information to reproduce here I'm
hoping it's possible to fix these faster.

1. Unclosed string literal with back slash

Type or copy-paste an unclosed string literal containing a back slash
anywhere in a java source file. Wait a few seconds and boom!
http://www.jetbrains.net/jira/browse/IDEADEV-2956


2. Case statement completion

Completing a case statement which is not contained in a switch. Doesn't
happen as often, but it should work.
class Completion {
void foo() {
case // press ctrl+space here
}
}
http://www.jetbrains.net/jira/browse/IDEADEV-2970


3. Inverting an if statement inside a foreach loop

If I invert an if statement which is located in a foreach loop, IDEA
takes 100% cpu for a couple of seconds and then starts spewing
exceptions. IDEA does not return to a working state if it is not restarted.
void foo(String[] strings) {
for (String string : strings) {
if (string.equals("5")) { // invert me
System.out.println("five");
}
}
}
http://www.jetbrains.net/jira/browse/IDEA-4926
http://www.jetbrains.net/jira/browse/IDEADEV-2554


4. Inspection without description

The "Unused Property" inspection doesn't have a description. Trying the
view the description throws an exception. If I leave the focus on that
inspection and close the Errors dialog, it is impossible to open it
again without first closing IDEA and manually editing a config file. Two
issues in one I think: This inspection should have a description and
inspections without a description shouldn't throw exceptions.
http://www.jetbrains.net/jira/browse/IDEADEV-3103

Bas

0

If exceptions with steps to reproduce make people happy, no problem, here comes the happiness:

http://www.jetbrains.net/jira/browse/IDEA-5823

http://www.jetbrains.net/jira/browse/IDEA-5097

;)

Sascha

0

Hello Maxim,

Done.

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

Hello Bas,

Thanks a lot for the hints!
1-3 fixed (first was most harmful, there was a bug in java lexer; and
third
was most tough).
Ann promized to come up with 4th tomorrow.

------------------
Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>> Here are some ways to get IDEA to throw exceptions, some even while
>> just editing java code. Looking at the exception reports in the
>> tracker they happen quite often. By providing the information to
>> reproduce here I'm hoping it's possible to fix these faster.
>>
>> 1. Unclosed string literal with back slash
>>
>> Type or copy-paste an unclosed string literal containing a back slash
>> anywhere in a java source file. Wait a few seconds and boom!
>> http://www.jetbrains.net/jira/browse/IDEADEV-2956
>>
>> 2. Case statement completion
>>
>> Completing a case statement which is not contained in a switch.
>> Doesn't
>> happen as often, but it should work.
>> class Completion {
>> void foo() {
>> case // press ctrl+space here
>> }
>> }
>> http://www.jetbrains.net/jira/browse/IDEADEV-2970
>> 3. Inverting an if statement inside a foreach loop
>>
>> If I invert an if statement which is located in a foreach loop, IDEA
>> takes 100% cpu for a couple of seconds and then starts spewing
>> exceptions. IDEA does not return to a working state if it is not
>> restarted.
>> void foo(String[] strings) {
>> for (String string : strings) {
>> if (string.equals("5")) { // invert me
>> System.out.println("five");
>> }
>> }
>> }
>> http://www.jetbrains.net/jira/browse/IDEA-4926
>> http://www.jetbrains.net/jira/browse/IDEADEV-2554
>> 4. Inspection without description
>> The "Unused Property" inspection doesn't have a description. Trying
>> the view the description throws an exception. If I leave the focus on
>> that inspection and close the Errors dialog, it is impossible to open
>> it again without first closing IDEA and manually editing a config
>> file. Two issues in one I think: This inspection should have a
>> description and inspections without a description shouldn't throw
>> exceptions. http://www.jetbrains.net/jira/browse/IDEADEV-3103
>>
>> Bas
>>


0

Hi Max,

Thank you and your team for fixing those so fast and I'm happy I could
help. It's good that 5.1 will be released without these.

Thank you again,
Bas

Maxim Shafirov (JetBrains) wrote:

Hello Bas,

Thanks a lot for the hints!
1-3 fixed (first was most harmful, there was a bug in java lexer; and third
was most tough).

Ann promized to come up with 4th tomorrow.

------------------
Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>> Here are some ways to get IDEA to throw exceptions, some even while
>> just editing java code. Looking at the exception reports in the
>> tracker they happen quite often. By providing the information to
>> reproduce here I'm hoping it's possible to fix these faster.
>>
>> 1. Unclosed string literal with back slash
>>
>> Type or copy-paste an unclosed string literal containing a back slash
>> anywhere in a java source file. Wait a few seconds and boom!
>> http://www.jetbrains.net/jira/browse/IDEADEV-2956
>>
>> 2. Case statement completion
>>
>> Completing a case statement which is not contained in a switch.
>> Doesn't
>> happen as often, but it should work.
>> class Completion {
>> void foo() {
>> case // press ctrl+space here
>> }
>> }
>> http://www.jetbrains.net/jira/browse/IDEADEV-2970
>>
>> 3. Inverting an if statement inside a foreach loop
>>
>> If I invert an if statement which is located in a foreach loop, IDEA
>> takes 100% cpu for a couple of seconds and then starts spewing
>> exceptions. IDEA does not return to a working state if it is not
>> restarted.
>> void foo(String[] strings) {
>> for (String string : strings) {
>> if (string.equals("5")) { // invert me
>> System.out.println("five");
>> }
>> }
>> }
>> http://www.jetbrains.net/jira/browse/IDEA-4926
>> http://www.jetbrains.net/jira/browse/IDEADEV-2554
>> 4. Inspection without description
>>
>> The "Unused Property" inspection doesn't have a description. Trying
>> the view the description throws an exception. If I leave the focus on
>> that inspection and close the Errors dialog, it is impossible to open
>> it again without first closing IDEA and manually editing a config
>> file. Two issues in one I think: This inspection should have a
>> description and inspections without a description shouldn't throw
>> exceptions. http://www.jetbrains.net/jira/browse/IDEADEV-3103
>>
>> Bas
>>


0

Hello Guy Gascoigne-Piggford,

Fixed. Thank you.

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

The one that I'm seeing a lot is:

Assertion failed
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:78)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:86)
at
com.intellij.codeInspection.ex.ProblemDescriptorImpl.<init>(ProblemDes
criptorImpl.java:18)
at
com.intellij.codeInspection.ex.InspectionManagerEx.createProblemDescri
ptor(InspectionManagerEx.java:91)
at
com.intellij.codeInspection.localCanBeFinal.LocalCanBeFinal.checkCodeB
lock(LocalCanBeFinal.java:49)
at
com.intellij.codeInspection.localCanBeFinal.LocalCanBeFinal.checkMetho
d(LocalCanBeFinal.java:18)
at
com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$1.run(LocalI
nspectionsPass.java:34)
at
com.intellij.psi.impl.PsiManagerImpl.performActionWithFormatterDisable
d(PsiManagerImpl.java:149)
at
com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.doCollectInf
ormation(LocalInspectionsPass.java:8)
at
com.intellij.codeInsight.daemon.impl.TextEditorHighlightingPass.collec
tInformation(TextEditorHighlightingPass.java:8)
at
com.intellij.codeInsight.daemon.impl.UpdateThread$2.run(UpdateThread.j
ava:10)
at
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(Ap
plicationImpl.java:230)
at
com.intellij.codeInsight.daemon.impl.UpdateThread.a(UpdateThread.java:
32)
at
com.intellij.codeInsight.daemon.impl.UpdateThread.access$100(UpdateThr
ead.java:35)
at
com.intellij.codeInsight.daemon.impl.UpdateThread$1.run(UpdateThread.j
ava:2)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(Prog
ressManagerImpl.java:51)
at
com.intellij.codeInsight.daemon.impl.UpdateThread.run(UpdateThread.jav
a:26)
This happens pretty soon after I've opened up a jsp file.

Guy

Bas Leijdekkers wrote:

>> Here are some ways to get IDEA to throw exceptions, some even while
>> just editing java code. Looking at the exception reports in the
>> tracker they happen quite often. By providing the information to
>> reproduce here I'm hoping it's possible to fix these faster.
>>
>> 1. Unclosed string literal with back slash
>>
>> Type or copy-paste an unclosed string literal containing a back slash
>> anywhere in a java source file. Wait a few seconds and boom!
>> http://www.jetbrains.net/jira/browse/IDEADEV-2956
>>
>> 2. Case statement completion
>>
>> Completing a case statement which is not contained in a switch.
>> Doesn't
>> happen as often, but it should work.
>> class Completion {
>> void foo() {
>> case // press ctrl+space here
>> }
>> }
>> http://www.jetbrains.net/jira/browse/IDEADEV-2970
>> 3. Inverting an if statement inside a foreach loop
>>
>> If I invert an if statement which is located in a foreach loop, IDEA
>> takes 100% cpu for a couple of seconds and then starts spewing
>> exceptions. IDEA does not return to a working state if it is not
>> restarted.
>> void foo(String[] strings) {
>> for (String string : strings) {
>> if (string.equals("5")) { // invert me
>> System.out.println("five");
>> }
>> }
>> }
>> http://www.jetbrains.net/jira/browse/IDEA-4926
>> http://www.jetbrains.net/jira/browse/IDEADEV-2554
>> 4. Inspection without description
>>
>> The "Unused Property" inspection doesn't have a description. Trying
>> the view the description throws an exception. If I leave the focus on
>> that inspection and close the Errors dialog, it is impossible to open
>> it again without first closing IDEA and manually editing a config
>> file. Two issues in one I think: This inspection should have a
>> description and inspections without a description shouldn't throw
>> exceptions. http://www.jetbrains.net/jira/browse/IDEADEV-3103
>>
>> Bas
>>


0

I got this one more or less every time i want to move a member.
So this happens very often.
http://www.jetbrains.net/jira/browse/IDEADEV-2959

mfg
Carsten

0

I don't know how this could be reproduced.
Could you give me any hints?

0

I have to attest that 5.1 EAP is much, MUCH better in terms of exceptions.

JavaScript support is great, too.

We have several Java files that 5.0.x chokes on but 5.1 is happy with.

Amnon

Maxim Shafirov (JetBrains) wrote:

Hello Bas,

Thanks a lot for the hints!
1-3 fixed (first was most harmful, there was a bug in java lexer; and
third was most tough).

Ann promized to come up with 4th tomorrow.

0

Eugene Vigdorchik schrieb:

I don't know how this could be reproduced.
Could you give me any hints?


It seems to work with the newest build.
Thank you very much.

Carsten

0

Please sign in to leave a comment.