Henry,

The bug is in j.exe and is trivial to fix. The control does a callback to
get the display data. The first callback for the first x bytes (4092 in my
testing) works but if there is more data subsequent calls don't use the
updated source pointer. I'll test this a bit and make a fixed j.exe
available early in the week.

Thanks to Oleg for giving a simpler test case that avoided various red
herrings.

/Eric

On Fri, Oct 31, 2008 at 10:54 PM, Oleg Kobchenko <[EMAIL PROTECTED]> wrote:

> Here's a much simpler example without colors or fonts.
> It breaks probably on buffer overrun.
>
>
> rtftext =: 0 : 0
>      When I load too much stuff into a Rich edit control in\line
> a form, it gets lost and starts repeating the first\line
> part of the text several times over and over.\line
> The failing case is when it gets to about 20\line
> lines of text.  The data has lots of Unicode characters\line
> and color changes.\par
>     Before I go to the trouble of narrowing this down: is\line
> there a chance somebody will be able to look at this\line
> & fix it, if I get a reproducible testcase?\par\par
> )
>
> text=: ;9 ([EMAIL PROTECTED] ,&":&.> #) <rtftext
>
> SCAN=: 0 : 0
> pc scan closeok;
> xywh 9 6 375 293;cc scscansion richeditm ws_hscroll ws_vscroll;
> pas 6 6;pcenter;
> rem form end;
> )
>
> scan_run=: 3 : 0
>  wd SCAN
>  wd 'set scscansion *{\rtf1 ',text,' }'
>  wd 'pshow;'
> )
>
> scan_run''
>
>
>
>
> ----- Original Message ----
> > From: Henry Rich <[EMAIL PROTECTED]>
> > To: Programming forum <[email protected]>
> > Sent: Friday, October 31, 2008 7:02:46 PM
> > Subject: RE: [Jprogramming] Richedit control overflow
> >
>  > OK, attached is a script that shows the error.  The text is
> > repeated.
> >
> > I need multiple colors in fixed-pitch text.  I can't see
> > any other way than richedit.  I need to distribute this
> > to students and I don't know what OCXs they have, or
> > even what operating systems.
> >
> > See if you can diagnose the problem.
> >
> > Henry Rich
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On Behalf Of Eric Iverson
> > > Sent: Friday, October 31, 2008 5:40 PM
> > > To: Programming forum
> > > Subject: Re: [Jprogramming] Richedit control overflow
> > >
> > > If the problem is in j.exe code then it may not be too
> > > difficult to fix if
> > > you have a simple, reproducible failure.
> > >
> > > Howver, the problem is most likely in the Host code and then
> > > there is no
> > > chance of a fix.
> > >
> > > If possible I'd suggest not using the richedit control.
> > >
> > > On Fri, Oct 31, 2008 at 3:35 PM, Henry Rich
>  > > wrote:
> > >
> > > > When I load too much stuff into a Rich edit control in
> > > > a form, it gets lost and starts repeating the first
> > > > part of the text several times over and over.
> > > > The failing case is when it gets to about 20
> > > > lines of text.  The data has lots of Unicode characters
> > > > and color changes.
> > > >
> > > > Before I go to the trouble of narrowing this down: is
> > > > there a chance somebody will be able to look at this
> > > > & fix it, if I get a reproducible testcase?
> > > >
> > > > Windows XP.
> > > >
> > > > Henry Rich
>
>
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to