Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336104 - Search results tree broken when displaying long lines
Summary: Search results tree broken when displaying long lines
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 384296 434360 436004 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-02 12:16 EST by christophe.paris CLA
Modified: 2018-08-24 16:32 EDT (History)
7 users (show)

See Also:


Attachments
Search view before expansion (bug 336104) (20.12 KB, image/png)
2011-05-18 07:40 EDT, Mark Booth CLA
no flags Details
Search view after expansion (bug 336104) (10.60 KB, image/png)
2011-05-18 07:41 EDT, Mark Booth CLA
no flags Details
Long line file search good (19.78 KB, image/png)
2018-08-24 16:32 EDT, Xi Yan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description christophe.paris CLA 2011-02-02 12:16:37 EST
Build Identifier: 20100917-0705

When a file with a very long lines exists in you project and is included in your search results, the results tree is broken. The tree is build with white label and a huge horizontal scroll bar is displayed.
Any other search is broken after that, the only way to fix it is to restart eclipse.

Reproducible: Always

Steps to Reproduce:
1. Create a file with a very long line in your project (more than 6000 characters)
   eg: for i in $(seq 1 800) ; do echo -n "hello$i" >> hello.txt ; done
2. In the menu choose : "Search>File"
3. Search for some text included in the file just created (eg: hello)
Comment 1 Dani Megert CLA 2011-02-03 02:04:22 EST
Most likely an SWT issue or OS limitation.
Comment 2 Mark Booth CLA 2011-05-18 07:40:58 EDT
Created attachment 195952 [details]
Search view before expansion (bug 336104)
Comment 3 Mark Booth CLA 2011-05-18 07:41:23 EDT
Created attachment 195953 [details]
Search view after expansion (bug 336104)
Comment 4 Mark Booth CLA 2011-05-18 07:46:20 EDT
Note, the corruption only appears to occur when you expand the search element which contains the long line, see attached screen shots. 

Hopefully this will help in tracking down this problem. On average, this problem causes me to have to restart Helios 2 to 3 times per day, which is rather annoying.
Comment 5 Felipe Heidrich CLA 2011-05-18 09:50:03 EDT
This is an OS limitation.
Comment 6 Mark Booth CLA 2011-05-18 10:55:36 EDT
Does that mean this can't be fixed, won't be fixed, or that we need to report this as a bug elsewhere? If so, where?
Comment 7 Timo A. Hummel CLA 2011-08-23 04:39:10 EDT
Even if it is an OS limitation, which I doubt, a workaround should be easy: Don't put the whole line length into the tree.

Instead of writing megabytes of data in the search results, strip the search results to a specific length (probably append something like [long line has been stripped].

Also, trying to open a file with a very long line also causes eclipse to hang. No matter if this is an OS issue or not, this needs to be adressed in whatever way. Hangs are a no-go in any case!
Comment 8 Dani Megert CLA 2012-07-05 04:03:35 EDT
*** Bug 384296 has been marked as a duplicate of this bug. ***
Comment 9 Dani Megert CLA 2014-05-07 17:00:54 EDT
*** Bug 434360 has been marked as a duplicate of this bug. ***
Comment 10 Dani Megert CLA 2014-05-28 03:43:59 EDT
*** Bug 436004 has been marked as a duplicate of this bug. ***
Comment 11 Xi Yan CLA 2018-08-24 16:32:35 EDT
Created attachment 275531 [details]
Long line file search good

I cannot reproduce the issue. Please reopen this ticket if the issue reoccurs. 

Eclipse SDK
Version: 2018-09 (4.9)
Build id: I20180823-0450
OS: Linux, v.4.17.12-200.fc28.x86_64, x86_64 / gtk 3.22.30
Java version: 1.8.0_181