Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 278071 Details for
Bug 182598
assertion failed in gtktreestore.c
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Snippet to reproduce the problem with. Run and click on the only button, observe standard error output.
Bug182598_GTK_crash_set_item_count_in_SetData_callback.java (text/x-java), 2.01 KB, created by
Simeon Andreev
on 2019-03-29 10:16:13 EDT
(
hide
)
Description:
Snippet to reproduce the problem with. Run and click on the only button, observe standard error output.
Filename:
MIME Type:
Creator:
Simeon Andreev
Created:
2019-03-29 10:16:13 EDT
Size:
2.01 KB
patch
obsolete
>package swt.problems; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.events.SelectionEvent; >import org.eclipse.swt.events.SelectionListener; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Event; >import org.eclipse.swt.widgets.Listener; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Tree; >import org.eclipse.swt.widgets.TreeItem; > >public class Bug182598_GTK_crash_set_item_count_in_SetData_callback { > > // If we want to have a Java dump on crash, we need to set a different number of tree items on SWT.SetData callback. > // I.e. =false -> reproduce https://bugs.eclipse.org/bugs/show_bug.cgi?id=182598 > // =true -> reproduce https://bugs.eclipse.org/bugs/show_bug.cgi?id=545919 > private static final boolean CRASH_WITH_DUMP = false; > > public static void main(String[] args) { > > Display display = new Display(); > Shell shell = new Shell(display); > shell.setSize(300, 200); > shell.setLayout(new FillLayout()); > > final Tree tree = new Tree(shell, SWT.VIRTUAL); > tree.addListener(SWT.SetData, new Listener() { > @Override > public void handleEvent(Event event) { > int itemCount = CRASH_WITH_DUMP ? 0 : 1; > tree.setItemCount(itemCount); > } > }); > > int N = 7; > for (int i = 0; i < N; ++i) { > TreeItem item = new TreeItem(tree, SWT.NONE); > int c = i + 1; > item.setText("item " + c); > if (i >= 5) { > item.setText("very long long long long long long item " + c); > } > item.setData("something " + c); > tree.setSelection(item); > } > > Button button = new Button(shell, SWT.NONE); > button.setText("Tree.clearAll()"); > button.addSelectionListener(new SelectionListener() { > @Override > public void widgetSelected(SelectionEvent e) { > tree.clearAll(true); > } > > @Override > public void widgetDefaultSelected(SelectionEvent e) { > } > }); > > shell.open(); > > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > display.dispose(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 182598
:
63931
| 278071 |
278072