[lazarus] win32 crash because of new components.
Vincent Snijders
vslist at zonnet.nl
Fri Dec 26 11:21:46 EST 2003
On Thu, 25 Dec 2003 12:56:51 +0100
Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
> 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.
I would prefer to switch and use fpImage. I would like to leave the
implementation to someone else though. ;-)
In the meantime I could send a patch which ignores the labelled colors
and gives them the transparent color.
> Micha, is this possible for the win32
> intf?
Vincent.
More information about the Lazarus
mailing list