Regression: Winrar fails to start

Peter Beutner p.beutner at gmx.net
Fri Nov 11 00:14:04 CST 2005


Robert Shearman schrieb:
> wino at piments.com wrote:
> 
>> It seems to be that WinRAR crashes after calling:
>> ImageList_Create(16,16,ILC_COLOR32|ILC_MASK,256,2048)
>> to create the list of icons for ListView control. Wine translates
>> this ImageList_Create to CreateBitmapIndirect 36864x16 and then
>> cannot handle 36864 parameter. If it is true, I think, it should be
>> fixed in Wine. I cannot find any errors in WinRAR ImageList_Create call.
>
> Wine isn't really doing anything wrong, so there is nothing to be fixed.
difficult to say who is doing wrong here ;)
you could also say wine wrongly uses the X11/Xlib api :p

> However, it seems that image lists have a feature of somwhat-lazy
> initialisation - they can an initial image count and a max image count.
> It seems we could use this feature to only allocate the initial image
> count on creation and allocate up to the maximum if needed when more
> than the initial images are added.

That doesn't really fix the problem. It probably just crashes later when the ImageList has
grown enough. Neither it fixes the case when an app requests an ImageList with an initial
image count high enough to trigger the BadAlloc failure.

The only solution I can think of is to implement that ImageList stuff using some kind of
linked list of pixmaps.(Though I don't know that API at all and don't know if it is
required that all images should be packed together in memory ??)



More information about the wine-devel mailing list