Summary: | StackOverflowError using key sequence entry widget | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Douglas Pollock <douglas.pollock> | ||||
Component: | UI | Assignee: | Douglas Pollock <douglas.pollock> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | critical | ||||||
Priority: | P1 | CC: | afilip, derek, eclipse, l.bolzani | ||||
Version: | 3.0 | ||||||
Target Milestone: | --- | ||||||
Hardware: | PC | ||||||
OS: | Linux-GTK | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Douglas Pollock
2003-09-16 14:49:36 EDT
Created attachment 6119 [details]
Patch to KeySequenceText
Fixes the StackOverflow error by removing the modification listener just before
making a text change driven by the key sequence, and places the listener back
on afterward. The idea is that, in general, the modification listener
translates textual changes into corresponding changes to the key sequence. In
this particular case, the textual change is driven by a change to the key
sequence, so the reverse operation is not needed.
The problem occurred because SWT calls a delete (with full event propagation)
before inseting the new text. I'll file a separate bug against SWT's GTK
implementation so that they have a chance to respond.
Minor cosmetic changes were made to remove warnings.
nick: you said you wanted to see some of my patches. here's one -- fixing a stack overflow and making some cosmetic changes. Changes applied. They look reasonable, however I did not do any extra testing. Note that the extra get methods to avoid accesses to outer private fields are not strictly necessary. Contrary to the currently posted guidelines, I don't think that the compile-time check for access to outer private members is terribly helpful. I'll be updating the guidelines. Patch is applied. This should prevent the StackOverflowError on GTK. If SWT makes changes to how ModifyEvents are fired, then this fix may not be needed. However, it is still probably a decent safety precaution. *** Bug 43381 has been marked as a duplicate of this bug. *** *** Bug 43567 has been marked as a duplicate of this bug. *** *** Bug 44176 has been marked as a duplicate of this bug. *** |