Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332505 - [JFace Validators] Stack overflow when using MultiValidator
Summary: [JFace Validators] Stack overflow when using MultiValidator
Status: CLOSED DUPLICATE of bug 332504
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.2   Edit
Hardware: PC All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 05:14 EST by Stefan Röck CLA
Modified: 2010-12-14 05:53 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Röck CLA 2010-12-14 05:14:29 EST
Using org.eclipse.core.databinding_1.3.100

There's a conceptual error in MultiValidator#revalidate() which leads to a dependency loop.
Let's assume that ObservableTracker returns the following dependencies:
dep[0] = observable1;
dep[1] = observable2;
dep[2] = targets; // same instance as the field target in this class MultiValidator

The field "targets" holds:
targets[0] = observable1;
targets[1] = observable2;

Because the outer loop iterates over targets, the invalid dependency to the field "targets" is not removed from newTargets and then added.
This causes the endless loop in subsequent calls.


Stacktrace snippet:
	at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:119)
	at org.eclipse.core.databinding.observable.AbstractObservable.fireChange(AbstractObservable.java:65)
	at org.eclipse.core.databinding.observable.list.ObservableList.fireListChange(ObservableList.java:72)
	at org.eclipse.core.databinding.observable.list.WritableList.addAll(WritableList.java:191)
	at org.eclipse.core.databinding.validation.MultiValidator.revalidate(MultiValidator.java:295)
	at org.eclipse.core.databinding.validation.MultiValidator$DependencyListener.handleChange(MultiValidator.java:152)
	at org.eclipse.core.databinding.observable.ChangeEvent.dispatch(ChangeEvent.java:41)
	at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:119)
Comment 1 Dani Megert CLA 2010-12-14 05:37:04 EST

*** This bug has been marked as a duplicate of bug 332504 ***