Bug 521488 - IllegalArgumentException below ExpandableComposite.lambda$2 (thrown in Control.setForeground)
Summary: IllegalArgumentException below ExpandableComposite.lambda$2 (thrown in Contro...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on: 525764
Blocks:
  Show dependency tree
 
Reported: 2017-08-28 17:00 EDT by EPP Error Reports CLA
Modified: 2020-06-12 18:14 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:00:55 EDT
The following problem was reported via the automated error reporting:

Message: Unhandled event loop exception
java.lang.IllegalArgumentException: Argument not valid
    at org.eclipse.swt.widgets.Control.setForeground(Control.java:3543)
    at org.eclipse.ui.forms.widgets.ExpandableComposite.lambda$2(ExpandableComposite.java:640)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)



Bundles:
| org.eclipse.swt | 3.106.0.v20170608-0516 | 3.106.0.v20170608-0516 |
| org.eclipse.ui.forms | 3.7.100.v20170517-1755 | 3.7.100.v20170517-1755 |

Operating Systems:
| Linux | 2.6.32.13 | 4.12.5.fc26 |
| MacOSX | 10.12.3 | 10.12.6 |
| Windows | 6.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/5954b11be4b00732bef1e646 for the latest data.

Thank you for your assistance.
 Your friendly error-reports-inbox.
Comment 1 Karsten Thoms CLA 2017-08-28 17:04:41 EDT
Indicates that setForeground() was called with a disposed Color instance (here ToggleHyper. I don't know under which circumstances this happens.
Comment 2 Andrey Loskutov CLA 2017-09-25 03:41:41 EDT
(In reply to Karsten Thoms from comment #1)
> Indicates that setForeground() was called with a disposed Color instance
> (here ToggleHyper. I don't know under which circumstances this happens.

I guess this is coming after UI theme switch. I remember many "impossible" color disposal errors in the past related to the themes. The problem is to know which UI elements were opened before the switch. For forms, probably opening few PDE editors, EGit staging view etc could help.
Comment 3 Andrey Loskutov CLA 2017-09-25 03:42:51 EDT
Also see https://dev.eclipse.org/recommenders/committers/aeri/v2/#!/problems/59790defe4b062478a1597d2

Bundle: org.eclipse.ui 3.109.0.v20170411-1742
Message: Unhandled event loop exception
Exception:
java.lang.IllegalArgumentException: Argument not valid
    at org.eclipse.swt.widgets.Control.setForeground(Control.java:3543)
    at org.eclipse.ui.forms.widgets.ExpandableComposite.lambda$1(ExpandableComposite.java:581)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:231)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
Comment 4 Karsten Thoms CLA 2017-09-25 04:22:02 EDT
Could be. But hard to find the faulty constellation. Could this be something for AERI to analyze more about the environment, e.g. active parts, disposed controls?
Comment 5 Simone Zampini CLA 2017-09-26 03:48:37 EDT
I think that I have this error starting Eclipse after closing it with the "Scala perspective".
Again: I think, I'm not sure.
Comment 6 Andrey Loskutov CLA 2017-10-09 04:48:13 EDT
Hard to fix if we don't have the context. Similar to bug 525742, we get this in PaintListener. I think this could be a side effect of some paint event processed while switching themes, where the colors are being set at same time as paint events are flying. In that case we could just check if the color we are trying to paint with is already disposed and simply don't set it, assuming the color will be set sooner or later to the right value. However if this is not caused by weird events order, we will never know where the problem is coming from - from toggle.getHoverDecorationColor() or from getTitleBarForeground().

So I will unwire the code so that we will get a different stack, pointing to the offending color.
Comment 7 Eclipse Genie CLA 2017-10-09 04:51:19 EDT
New Gerrit change created: https://git.eclipse.org/r/106449
Comment 9 Andrey Loskutov CLA 2017-10-09 09:38:10 EDT
I believe that the root cause of this bug are two things: we added CSS to ExpandableComposite via bug 515391, but the new org.eclipse.ui.internal.forms.css.dom.ExpandableCompositeElement.reset() code is executed after the parent.reset(), so that we may see cases where the paints are processed on not yet updated composites. I've created bug 525764 for that.
Comment 10 Vladlen Lerner CLA 2017-10-31 12:40:03 EDT
I catch that problem, when try to create a new maven project with properties:

groupId: org.apache.spark
artifactId: spark-core_2.11
version: 2.2.0

as it was pointed at the official spark page: https://spark.apache.org/downloads.html

My OS: Fedora 26 x86_64
Eclipse: Oxygen.1 (4.7.1)

I have a .pom file with error message "could not calculate build plan"
Comment 11 Dani Megert CLA 2018-05-24 12:55:11 EDT
Removing target milestone for all bugs that are not major or above.
Comment 12 Dani Megert CLA 2018-05-25 04:06:48 EDT
> Removing target milestone for all bugs that are not major or above.

Of course I meant "major or below".

Sorry for the noise!
Comment 13 Eclipse Genie CLA 2020-06-12 18:14:07 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.