Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 558652 - [Win32] Scrollbars not created on Shell with SWT.MIN
Summary: [Win32] Scrollbars not created on Shell with SWT.MIN
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows All
: P3 normal (vote)
Target Milestone: 4.15 M1   Edit
Assignee: Paul Pazderski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-27 12:53 EST by Dieter Mai CLA
Modified: 2020-01-07 05:30 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dieter Mai CLA 2019-12-27 12:53:09 EST
The Snippet9 causes a NPE:

Exception in thread "main" java.lang.NullPointerException
	at org.eclipse.swt.snippets.Snippet9.main(Snippet9.java:40)

The cause of this is that getHorizontalBar() returns null. 
This worked fine on SWT 4.12. did not test on 4.13

Scrolling in general works, its just that in this snippet it doesn't. Since Snippet9 is the snippet to show how scrolling works, this should be fixed. 


Environment:
- Windows 10
- Java 13
Comment 1 Paul Pazderski CLA 2019-12-27 13:55:33 EST
Good catch! 4.13 should be broken as well. A regression of bug 293230.

Scrollbars should be created dependent of the flag SEARCH (used by Text). It is implemented in Scrollable and Shell is also a scrollable and unfortunately the flag MIN (used by Shell) has the same value as SEARCH.
So the check for SEARCH influence the creation of shell with MIN (which is included in SHELL_TRIM).

After the reason is known I allow me to update the bug summary. I'll upload a fix proposal (not yet fully tested).
Comment 2 Eclipse Genie CLA 2019-12-27 13:56:54 EST
New Gerrit change created: https://git.eclipse.org/r/155078
Comment 4 Paul Pazderski CLA 2020-01-05 15:55:35 EST
Fixed in master now.
Comment 5 Paul Pazderski CLA 2020-01-07 05:30:12 EST
Verified in 

Eclipse SDK
Version: 2020-03 (4.15)
Build id: I20200106-1805
OS: Windows 7
Java version: 12