Menu crash - was : Re: [PATCH] Version info for comctl32.dll
lawson_whitney at juno.com
lawson_whitney at juno.com
Sat Mar 17 21:14:03 CST 2001
On Sat, 17 Mar 2001, gerard patel wrote:
>
> First thanks for the bug report.
>
> The trace is not difficult to read, the menu item is a text item and
> the text pointer is NULL. MENU_CalcItemSize is not handling this
> case. What is strange is this problem appears only with my patch. Maybe
Now hang on! I didn't say that. I said I had first provoked it after
applying your patch. :-). I guess I should have reverted the patch so
I would know for sure before I said anything, but I figured you had just
worked in that area and might have a better idea about fixing it than I
just jumping in and putting a test for null or a __try around it.
I don't use GUI very much, and that crash could have been waiting for
years to be provoked.
I will revert presently and repeat the test in case that might help.
> your app is really initializing the menu when receiving the WM_INITMENU
> message, but *only* when there is need to display the menu. I can't see
> how it could find out about it, though.
>
> Anyway, could you try the following patch ? It tries to remove the main
> case I saw where the app can set a menu item to text type with a null text
> pointer. It is a legitimate patch by itself, even if it does not fix your problem.
> Maybe it could have nasty side effects. If it avoids the systematic crash,
> try to find if the other is really gone for good too.
Still crashes. The patch is in the source, the object file and
libuser32.so are newer than menu.c, so I _think_ there must be another
way to get a null text pointer with a text type.
This time I spelled "info local" right. tee is a wonderful little
program.
>
> I have found a strangeness in the HEAP_strdup macros - WARNING -
> this is of interest to anyone dabbling with Wine code.
> While HEAP_strdupW and HEAP_strdupAtoW appear very similar, the specs
> are not the same; one returns a null pointer when called with a
> null pointer, the other allocates 2 bytes of memory and returns a pointer
> to it. Nice trap :-)
>
> Gerard
Lawson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gp.gz
Type: application/octet-stream
Size: 9764 bytes
Desc:
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20010317/38dd8612/gp.obj
More information about the wine-devel
mailing list