|
|
|
|
Re: StackOverflow in setText [message #450311 is a reply to message #450298] |
Thu, 10 February 2005 10:58 |
Luis Verge González Messages: 2 Registered: July 2009 |
Junior Member |
|
|
Thanks, I solved the problem It was a java.string.matches problem, not swt
problem. It's a java bug.
Thanks everybody.
Steve Northover wrote:
> Try using as StyledText instead of a Text control. Does it fail?
> "Luis" <lvergegon@htomail.com> wrote in message
> news:cudj6k$hkk$1@www.eclipse.org...
>> First of all thank you.
>> I can't show the code because is a private application.
>> On the other hand, when I ran a similar sample I did not get this error,
>> but when I extend eclipse platform, creating a plugin-view with a
>> multiline Text in this view, if I copy a large text to this multiline I
>> get the error. If you want to obtain a similar error, you can write a
>> large text in a text field of the plug-in manifest view. I must say that
>> my application is very large and in order to register text-changes in the
>> view I use a selectionChangedListener.
>>
>> Thanks again.
>>
>>
>>
>> Veronika Irvine wrote:
>>
>> > I am running Windows XP with a manifest against SWT from HEAD.
>> > I ran the following example and did not get an error. Can you modify
> this
>> > example to demonstrate the problem you are having?
>>
>> > public static void main (String [] args) {
>> > Display display = new Display ();
>> > Shell shell = new Shell (display);
>> > shell.setLayout(new FillLayout());
>> > Text t = new Text(shell, SWT.MULTI | SWT.WRAP);
>> > StringBuffer buffer = new StringBuffer();
>> > for (int i = 0; i < 10000; i++) {
>> > buffer.append('a');
>> > }
>> > buffer.append('z');
>> > t.setText(buffer.toString());
>> > shell.open ();
>> > while (!shell.isDisposed ()) {
>> > if (!display.readAndDispatch ()) display.sleep ();
>> > }
>> > display.dispose ();
>> > }
>>
>>
>> > "Luis" <lvergegon@hotmail.com> wrote in message
>> > news:cuchge$koc$1@www.eclipse.org...
>> >>
>> >> Hi all,
>> >>
>> >> I have a problem when I use the setText() method of the Text.class.
>> >> (org.eclipse.swt.widget) When I set a text very large this method send
> a
>> >> StackOverflow error, the text length is 5504 and the length-limit of
> the
>> >> OS is greater than it. I have found the problem in the line of this
> method
>> >> that calls the OS. I'm working under Windows Xp and the RAM memory of
> my
>> >> computer is 512MB.
>> >> Questions
>> >> 1. Is a bug in Text?
>> >> 2. Can I solve the problem?
>> >>
>> >> Thanks and sorry for my English
>> >>
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.04040 seconds