Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 154755

Summary: [Viewers] Bugs in VIRTUAL support in TableViewer
Product: [Eclipse Project] Platform Reporter: Boris Bokowski <bokowski>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: andy-eclipsebugs, blazej.kroll, christian.betz, elias, john.sanda, nigelipse, Tod_Creasey, tom.schindl, torkildr
Version: 3.2Keywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug container
Bug Depends on: 79276, 95811, 97786, 97947, 97949, 115695, 144280, 144406, 150096    
Bug Blocks:    
Attachments:
Description Flags
patch none

Description Boris Bokowski CLA 2006-08-22 16:47:39 EDT
I am filing this bug to collect issues and bugs with the current VIRTUAL support in TableViewer.
Comment 1 Boris Bokowski CLA 2006-08-22 16:55:16 EDT
Here is the current list of bugs:

97786 [Viewers] - Lazy Virtual Table View Test - duplicate items appear after delete.
144280 [Viewers] VIRTUAL TableViewer element removal doesn't work.
144406 [Viewers] Virtual TableViewer cache is not cleaned-up when removing items.
Comment 2 Boris Bokowski CLA 2006-08-22 17:40:06 EDT
another one:
150096 [Viewers] Removing an object from a virtual table will NOT decrement the itemCount
Comment 3 Boris Bokowski CLA 2006-08-22 18:02:42 EDT
Created attachment 48421 [details]
patch

Not solved yet: if you insert(element, index) in the middle of a VIRTUAL table, I believe the table is not updated correctly.

Tests are missing too.
Comment 4 Boris Bokowski CLA 2008-10-01 15:19:20 EDT
Does anyone have time (and enough motivation) to drive this forward?

Without any help, I am not sure if I will end up doing anything for 3.5. So many things to do and so little time...
Comment 5 Dr. Christian Betz CLA 2009-04-03 08:33:34 EDT
Hi!

I'm not sure whether or not you rate the following behaviour as "bug", but IMHO it's at least a misfeature. So please consider fixing it in future releases or make it dead clear in the documentation ;)

Testbed:
Source from http://wiki.eclipse.org/JFaceSnippets#Snippet030VirtualLazyTableViewer, running against org.eclipse.swt.widgets.Table (from bundle org.eclipse.swt.win32.win32.x86_3.5.0.v3525.jar)


Everything work's well with this "jface snippet". However, if you increasing row number massively (e.g. to 1000000), you get an OutOfMemoryError: Java heap space.

    private MyModel[] createModel() {
        MyModel[] elements = new MyModel[1000000];

        for (int i = 0; i < 1000000; i++) {
            elements[i] = new MyModel(i);
        }

        return elements;
    }


This is due to the fact that the TableItem[] items in org.eclipse.swt.widgets.Table is populated but does not respect the fact that invisible items need not be stored.

Thus, a VIRTUAL table need not to run into this memory leak, but the current implementation does.

Comment 6 Boris Bokowski CLA 2009-11-26 09:55:13 EST
Hitesh is now responsible for watching bugs in the [Viewers] component area.
Comment 7 Eclipse Webmaster CLA 2019-09-06 15:35:08 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.

If you have further information on the current state of the bug, please add it. 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.
Comment 8 Eclipse Genie CLA 2021-10-11 16:09:36 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.