Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 460286 - Exceptions in form editor in Eclipse Mars.
Summary: Exceptions in form editor in Eclipse Mars.
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: 4.5 M7   Edit
Assignee: Snjezana Peco CLA
QA Contact: Brian de Alwis CLA
URL:
Whiteboard:
Keywords:
: 309443 460936 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-02-18 16:01 EST by Slava Kabanovich CLA
Modified: 2015-10-09 13:20 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Slava Kabanovich CLA 2015-02-18 16:01:41 EST
Editor that worked fine in Eclipse 4.4, throws exceptions on change selection in Eclipse 4.5M5a. See https://issues.jboss.org/browse/JBIDE-19270 .
Comment 1 Konstantin Komissarchik CLA 2015-02-18 20:26:06 EST
This is an Eclipse platform bug.

*** This bug has been marked as a duplicate of bug 459388 ***
Comment 2 Slava Kabanovich CLA 2015-02-24 14:39:59 EST
In JBossTools this problem is critical. We have chosen Sapphire to implement new XML editors instead of extending JBoss Tools XML Editor.
However, now all extensions to JBoss Tools XML Editor work with Eclipse 4.5M5a fine, and newly developed editors using Sapphire are so much affected by this issue, that it is impossible to continue the development/testing process and we started to fall behind our time table.

Could it be that the issue with Eclipse itself may be workarounded in Sapphire? I have such a use case with Sapphire editor that is not observed with other editors.

1. Open editor - exception happens at org.eclipse.ui.forms.widgets.Section.onPaint(Section.java:344) because getClientArea() does no return at this moment valid size. Could Sapphire change algorithm of control initialization to prevent paint listener to be processing this invalid case?

2. With this first exception the editor is still functional. I can select nodes in tree of editor and see form with field editors for each node.

3. Select a node in Package Explorer. That seems may not have anything to do with Sapphire editor, and indeed, nothing bad happens.

4. Now, again, select a node in the tree of Sapphire editor. It may seem as innocent as step (3), but actually it makes all the difference. Exceptions happen at org.eclipse.sapphire.ui.forms.swt.MasterDetailsEditorPage$DetailsSection.refreshSections(MasterDetailsEditorPage.java:2188) called through org.eclipse.sapphire.ui.forms.swt.MasterDetailsEditorPage$10.selectionChanged(MasterDetailsEditorPage.java:1031), on each selection change, form is not replaced, the editor is dead. At that moment it affects also paintng in other views of Eclipse, but as soon as Sapphire editor is closed, Package Explorer is returning to its normal work.
Could you please check if the usage of selection listeners in Sapphire might be improved? How could DetailsSection come into an illegal state just because I selected once a node in the Package Explorer?

For complete stacktraces please look at https://issues.jboss.org/browse/JBIDE-19270 .

Do you have an idea what is wrong in Eclipse itself? I have checked classes that are in exception's stacktrace, they *are not changed* since a version of Eclipse with which Sapphire worked fine. Probably something is changed in firing events, but I still cannot get to the root of the problem. If you see a solution, could you please help Eclipse team with a patch?
Comment 3 Konstantin Komissarchik CLA 2015-02-25 16:36:09 EST
This might be a Linux-specific issue. I've tested on Windows and don't see these exceptions.
Comment 4 Eclipse Genie CLA 2015-03-23 15:49:51 EDT
New Gerrit change created: https://git.eclipse.org/r/44405
Comment 5 Snjezana Peco CLA 2015-03-23 15:53:13 EDT
This issue is similar to the issue described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=427843
It is caused by the order "draw" events are sent in GTK3. 
The issue is different from the issue described in bug 459388.

https://git.eclipse.org/r/44405 fixes it.
Comment 7 Brian de Alwis CLA 2015-03-24 21:52:43 EDT
Thanks Snjezana.
Comment 8 Snjezana Peco CLA 2015-04-09 11:21:19 EDT
*** Bug 309443 has been marked as a duplicate of this bug. ***
Comment 9 Brian de Alwis CLA 2015-04-28 12:35:31 EDT
Snjezana can you verify this bug is fixed?
Comment 10 Snjezana Peco CLA 2015-04-28 13:53:08 EDT
(In reply to Brian de Alwis from comment #9)
> Snjezana can you verify this bug is fixed?

I have verified the issue in N20150408-2000.
Comment 11 Brian de Alwis CLA 2015-04-28 14:01:15 EDT
Thanks Snjezana.
Comment 12 Snjezana Peco CLA 2015-10-09 13:20:13 EDT
*** Bug 460936 has been marked as a duplicate of this bug. ***