[lazarus] win32 crash because of new components.
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Dec 25 06:42:59 EST 2003
On Wed, 24 Dec 2003 23:48:28 +0100 Vincent Snijders <vslist at zonnet.nl>
wrote:
> On Wed, 24 Dec 2003 17:09:15 +0100
> Vincent Snijders <vslist at zonnet.nl> wrote:
>
> > Hi,
> >
> > Recently lazarus stopped starting up under win32. I think it is caused
> > by the recent additions of components to the toolbar. The win32
> > interface can't read the icons without raising an exception. Appended
> > is the backtrace.
> >
> > I changed line 722 of win32winapi.inc:
> > until (i>=AList.Count);
> >
> > This prevented the crash. I hope somebody with more experience with
> > bitmaps and pixmaps can take a look at this to see if it is correct.
>
> Further research showed that the problem is caused by xpm-files with
> these kind of lines in the color map:
> "$ c #C0C0C0",
> "% c red",
> "& c green",
> "* c yellow",
>
> The first line is parsed correctly, but the others not. The function
> CreatePixmapIndirect doesn't support symbolic color names (like red),
> only RGB-values.
>
> So the change mentioned above isn't a fix, it only prevents a crash.
CreatePixmapIndirect is only a workaround to load xpms under win32. It is
very slow due to string operations.
We can either add a further workaround or switch to fpc 1.0.11/1.9.1 and use
fpImage as default. Micha, is this possible for the win32 intf?
Mattias
More information about the Lazarus
mailing list