Bug 521489 - NullPointerException in TrimPaneLayout.setCursor
Summary: NullPointerException in TrimPaneLayout.setCursor
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.7.3a   Edit
Assignee: Karsten Thoms CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 394512 447011 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-08-28 17:37 EDT by EPP Error Reports CLA
Modified: 2020-03-08 11:59 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description EPP Error Reports CLA 2017-08-28 17:37:34 EDT
The following problem was reported via the automated error reporting:

Message: Unhandled event loop exception
java.lang.NullPointerException: null
    at org.eclipse.e4.ui.workbench.addons.minmax.TrimPaneLayout.setCursor(TrimPaneLayout.java:205)
    at org.eclipse.e4.ui.workbench.addons.minmax.TrimPaneLayout$1.mouseMove(TrimPaneLayout.java:132)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:212)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)


The reporter(s) left the following comment(s):

--- bin wrote on 7106: ---
工具条(ToolBar)里的部分工具项(Item)没了

--- Naiara wrote on fb0a: ---
is not working at all

--- Anonymous wrote on 4f98: ---
nothing is displayed

--- Chapuis Nicolas wrote on d147: ---
I have juste open eclipse-jee and eclipe java in same time......

--- Hakan Erduman wrote on 9213: ---
Install eclipse on location a/b/c.
Run once, accept ~/workspace as default.
Move folder to d/e/c.

Workaround: rm -rf ~/workspace and start over.

Bundles:
| org.eclipse.e4.ui.workbench | 1.2.2.v20141212-1259 | 1.5.0.v20170516-1118 |
| org.eclipse.swt | 3.103.2.v20150203-1313 | 3.106.0.v20170608-0516 |

Operating Systems:
| Linux | 2.6.32.11 | 4.12.0.rc3 |
| MacOSX | 10.9.5 | 10.12.6 |
| Windows | 5.1.0 | 10.0.0 |


The above information is a snapshot of the collected data. Visit https://dev.eclipse.org/recommenders/committers/aeri/v2/#!/problems/54c4ef00bee810030da065c8 for the latest data.

Thank you for your assistance.
 Your friendly error-reports-inbox.
Comment 1 Karsten Thoms CLA 2017-08-28 17:43:41 EDT
The instance variables of type Rectangle are initialized by layout(), but it seems that mouseMove() is called before layout() was called.

I don't know how this can be reproduced, but initializing the variables with an empty Rectangle (0,0,0,0) should be valid. The contains() checks will yield false and nothing harmful happens.
Comment 2 Eclipse Genie CLA 2017-08-28 17:47:38 EDT
New Gerrit change created: https://git.eclipse.org/r/103791
Comment 5 Mickael Istria CLA 2017-09-07 03:35:59 EDT
(In reply to Eclipse Genie from comment #4)
> Gerrit change https://git.eclipse.org/r/103791 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=518e43234208de721f369d3e0e25ee42c04f83a0

Thanks Karsten!
Can you please also prepare the patch for 4.7.3 ?
Comment 6 Eclipse Genie CLA 2017-09-07 06:16:16 EDT
New Gerrit change created: https://git.eclipse.org/r/104637
Comment 7 Eclipse Genie CLA 2017-09-08 03:50:46 EDT
New Gerrit change created: https://git.eclipse.org/r/104692
Comment 9 Dani Megert CLA 2017-11-15 10:18:01 EST
(In reply to Karsten Thoms from comment #1)
> The instance variables of type Rectangle are initialized by layout(), but it
> seems that mouseMove() is called before layout() was called.
> 
> I don't know how this can be reproduced, but initializing the variables with
> an empty Rectangle (0,0,0,0) should be valid. The contains() checks will
> yield false and nothing harmful happens.

The stack trace is:

java.lang.NullPointerException: null
    at org.eclipse.e4.ui.workbench.addons.minmax.TrimPaneLayout.setCursor(TrimPaneLayout.java:205)

In which version of Eclipse did you check line 205? I looked back and it did not match code that uses those variables.
Comment 10 Karsten Thoms CLA 2017-11-15 11:08:13 EST
I did not look for line 205. You can look at different incidents of the same problem and they will show the Eclipse version. Then I look at that versions of the file.

e.g.
https://dev.eclipse.org/recommenders/committers/aeri/v2/#!/incidents/5a0532ebe4b02aaf8b1f1e58
TrimPaneLayout.java:197, Eclipse 4.7.1

https://dev.eclipse.org/recommenders/committers/aeri/v2/#!/incidents/5a0a6688e4b02aaf8b1f8af2
TrimPaneLayout.java:194, Eclipse 4.6.3


Searching for the version that has the error in #205 is showing me
commits
 27450d6149b3db65988e0c0dd60f3ea6768e6b9c
 1458ecfaf64b0467137ffd7ec2f735e6292e5bf9
Comment 11 Dani Megert CLA 2017-11-15 11:17:44 EST
(In reply to Karsten Thoms from comment #10)
> I did not look for line 205. You can look at different incidents of the same
> problem and they will show the Eclipse version. Then I look at that versions
> of the file.
> 
> e.g.
> https://dev.eclipse.org/recommenders/committers/aeri/v2/#!/incidents/5a0532ebe4b02aaf8b1f1e58
> 
> TrimPaneLayout.java:197, Eclipse 4.7.1
> 
> https://dev.eclipse.org/recommenders/committers/aeri/v2/#!/incidents/5a0a6688e4b02aaf8b1f8af2
> 
> TrimPaneLayout.java:194, Eclipse 4.6.3
> 
> 
> Searching for the version that has the error in #205 is showing me
> commits
>  27450d6149b3db65988e0c0dd60f3ea6768e6b9c
>  1458ecfaf64b0467137ffd7ec2f735e6292e5bf9

So, looks like this bug report is from a very old version.
Comment 12 Karsten Thoms CLA 2017-11-15 11:43:16 EST
Yes, the specific incident is from a 3 year old version, and the bug existed from its very first version 7 years ago.
When you create a bug report from AERI, *one* incident is picked for the report, but many incidents are attached to the problem report. The actual incident in the problem report is just an indicator, but I find much value in looking at the incidents of the problem.
Comment 13 Karsten Thoms CLA 2017-12-12 09:27:27 EST
*** Bug 394512 has been marked as a duplicate of this bug. ***
Comment 14 Karsten Thoms CLA 2019-02-19 23:58:48 EST
The AERI report does not have incidents with platform > 4.7.3, while still collecting incidents for older platform versions. So I assume we can call this fixed for 4.7.3.
Comment 15 Karsten Thoms CLA 2020-03-08 11:59:01 EDT
*** Bug 447011 has been marked as a duplicate of this bug. ***