eclipse-capella / capella

Open Source Solution for Model-Based Systems Engineering
https://mbse-capella.org
Eclipse Public License 2.0
222 stars 90 forks source link

[StructuredViewer] ArrayIndexOutOfBoundsException when colapse tree in Model Explorer filter #1872

Open eclipse-capella-bot opened 3 years ago

eclipse-capella-bot commented 3 years ago

Attachment: bug-8896.txt 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

🆔 ECLIPSE-559108 👷 georgiana.ecobici 📅 2020-01-13 🔎 1.4.1

eclipse-capella-bot commented 3 years ago

ci-bot commented on 2020-01-13

New Gerrit change created: https://git.eclipse.org/r/155740

andrey.loskutov commented on 2020-01-13

(In reply to georgiana.ecobici from comment #0)

See attachment [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.

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

Same here.

  1. Click on the - button (uncollapse)

I don't see such button nowhere.

  1. 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?

georgiana.ecobici commented on 2020-01-13

reproduce-bug.jpg How to reproduce issue

I have attached a picture on how to reproduce it.

georgiana.ecobici commented on 2020-01-14

contentRawResult.png content of RawResult and filteredResult

julian.honnen commented on 2020-01-14

(In reply to georgiana.ecobici from comment #4)

See attachment [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

georgiana.ecobici commented on 2020-01-16

Opened this bug to fix the stalled cache in Capella: ECLIPSE-559253