Bug 559108 - [StructuredViewer] ArrayIndexOutOfBoundsException when colapse tree in Model Explorer filter
Summary: [StructuredViewer] ArrayIndexOutOfBoundsException when colapse tree in Model ...
Status: CLOSED MOVED
Alias: None
Product: Capella
Classification: Polarsys
Component: Core (show other bugs)
Version: 1.4.1   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL: https://github.com/eclipse/capella/is...
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2020-01-13 07:44 EST by Georgiana Ecobici CLA
Modified: 2021-01-12 03:27 EST (History)
3 users (show)

See Also:


Attachments
ArrayIndexOutOfBoundsException in StructuredViewer.notifyFilteredOut (3.97 KB, text/plain)
2020-01-13 07:44 EST, Georgiana Ecobici CLA
no flags Details
How to reproduce issue (39.92 KB, image/jpeg)
2020-01-13 10:42 EST, Georgiana Ecobici CLA
no flags Details
content of RawResult and filteredResult (20.02 KB, image/png)
2020-01-14 04:50 EST, Georgiana Ecobici CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georgiana Ecobici CLA 2020-01-13 07:44:57 EST
Created attachment 281466 [details]
ArrayIndexOutOfBoundsException in StructuredViewer.notifyFilteredOut

Get the following exception (see also attachment):
java.lang.ArrayIndexOutOfBoundsException: 4
	at org.eclipse.jface.viewers.StructuredViewer.notifyFilteredOut(StructuredViewer.java:870)

Steps to reproduce it:
1. In the Project Explorer/Model Explorer filter type something
2. Do some hide/expand on the displayed tree structure (of an existing project)
3. Click on the - button (uncollapse)
4. Click on the arrow near the project to expand the project

--> ArrayIndexOutOfBoundsException triggered in StructuredViewer.notifyFilteredOut

Reproduced with: eclipse modeling-2019-12 R
Comment 1 Eclipse Genie CLA 2020-01-13 07:55:05 EST
New Gerrit change created: https://git.eclipse.org/r/155740
Comment 2 Andrey Loskutov CLA 2020-01-13 10:25:59 EST
(In reply to Georgiana Ecobici from comment #0)
> Created attachment 281466 [details]
> ArrayIndexOutOfBoundsException in StructuredViewer.notifyFilteredOut
> 
> Get the following exception (see also attachment):
> java.lang.ArrayIndexOutOfBoundsException: 4
> 	at
> org.eclipse.jface.viewers.StructuredViewer.
> notifyFilteredOut(StructuredViewer.java:870)
> 
> Steps to reproduce it:
> 1. In the Project Explorer/Model Explorer filter type something

Please provide exact steps.

> 2. Do some hide/expand on the displayed tree structure (of an existing
> project)

Same here.

> 3. Click on the - button (uncollapse)

I don't see such button nowhere.

> 4. Click on the arrow near the project to expand the project

Which button, which project? I'm lost at this point.

Is this a regression in 4.14?
Comment 3 Georgiana Ecobici CLA 2020-01-13 10:42:34 EST
Created attachment 281473 [details]
How to reproduce issue

I have attached a picture on how to reproduce it.
Comment 4 Georgiana Ecobici CLA 2020-01-14 04:50:24 EST
Created attachment 281485 [details]
content of RawResult and filteredResult
Comment 5 Julian Honnen CLA 2020-01-14 06:19:56 EST
(In reply to Georgiana Ecobici from comment #4)
> Created attachment 281485 [details]
> content of RawResult and filteredResult
The issue here is not in the StructuredViewer, but in the ViewerFilter implementation that returns unknown elements.

Looking at the Capella code [1], my first guess would be that it has a stale cache.

Moving to Sirius for further investigation.


[1] https://git.polarsys.org/r/plugins/gitiles/capella/capella/+/edab45b84493bad44f5b527a670e0c2aa5cc2561/core/plugins/org.polarsys.capella.core.platform.sirius.ui.navigator/src/org/polarsys/capella/core/platform/sirius/ui/navigator/view/CapellaCommonNavigator.java#126
Comment 6 Georgiana Ecobici CLA 2020-01-16 08:03:48 EST
Opened this bug to fix the stalled cache in Capella:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=559253
Comment 7 Philippe Dul CLA 2021-01-12 03:27:55 EST
Moved to https://github.com/eclipse/capella/issues/1872