[lazarus] win32 crash because of new components.

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Dec 26 12:14:47 EST 2003


On Fri, 26 Dec 2003 17:35:47 +0100  Vincent Snijders <vslist at zonnet.nl>
wrote:

> 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. ;-)

I'm working with it since a few months. It's faster and more comfortable.
The missing piece is the palette support and the win32 intf.

 
> In the meantime I could send a patch which ignores the labelled colors
> and gives them the transparent color.

ok

 
> > Micha, is this possible for the win32
> > intf?

?


Mattias






More information about the Lazarus mailing list