Re: oleaut32: Add tmarshal conformance test

2006-10-10 Thread Michal Okresa
 And how does this relate to the version that Dan Hipschman sent in:
 http://winehq.org/pipermail/wine-patches/2006-August/029511.html
 (and which didn't work on Alexandre's machine,
 http://winehq.org/pipermail/wine-devel/2006-August/050185.html )?
 - Dan

this patch fixes two problems in original version (from 7. aug.). Tested on 
two machines (debian testing, suse 10) and it does not crash anymore.

--
Michal Okresa




Re: oleaut32: Add tmarshal conformance test

2006-10-09 Thread Dan Kegel

On 10/9/06, Michal Okresa [EMAIL PROTECTED] wrote:

On Monday 09 October 2006 19:14, Dan Kegel wrote: ...
 I think it's great you're working on this.  What were the bugs?

Thanks for your comments.

I discovered these two problems in Rob's patch which make test crash.
* Firstly function IKindaEnumWidget_Release(pKEW) was called twice in test
sequence:

IKindaEnumWidget_Release(pKEW);
IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL);
hr = CoUnmarshalInterface(pStream, IID_IKindaEnumWidget, (void **)pKEW);
ok_ole_success(hr, CoUnmarshalInterface);
IStream_Release(pStream);

hr = IKindaEnumWidget_Next(pKEW, pWidget);  /* pKEW !!! */
ok_ole_success(hr, IKindaEnumWidget_Next);

IKindaEnumWidget_Release(pKEW);

As you can see, pKEW is used even though memory was released.

* Second problem was in function: static IWidget *Widget_Create(void).

ITypeLib_GetTypeInfoOfGuid failed with wine (but only in last test -
test_DispCallFunc) and hr pointer is NULL. Therefore
ITypeLib_Release(pTypeInfo) after IF {} block might not be called.

hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, IID_IWidget, pTypeInfo);
ok_ole_success(hr, ITypeLib_GetTypeInfoOfGuid);
if (SUCCEEDED(hr))
{
This-pDispatchUnknown = NULL;
hr = CreateStdDispatch((IUnknown *)This-lpVtbl, This, pTypeInfo,
This-pDispatchUnknown);
ok_ole_success(hr, CreateStdDispatch);
ITypeInfo_Release(pTypeInfo);
}
ITypeLib_Release(pTypeInfo); (hr is null)

This problem was difficult to find because test crashed randomly (winedbg
excercise ;-) )

And finally I added few VariantClear() calls (but this isn't important)


Thanks for the info...

Dan H., could you have a quick look at Michal's patch?
- Dan




Re: oleaut32: Add tmarshal conformance test

2006-10-09 Thread Dan Hipschman
On Mon, Oct 09, 2006 at 03:45:16PM -0700, Dan Kegel wrote:
 Dan H., could you have a quick look at Michal's patch?

Well, the patch I sent in didn't crash on my machine, but crashed on
Alexandre's (and maybe others' who didn't try to run it).  It's pretty
hard to fix something that works when you run it, so I never did track
down the problem.  Probably Rob, I know he's busy, is more qualified to
comment on differences between this and what I sent in.  The patch should
probably add the test to the Makefile.  (BTW, I don't think the Makefile
patch I sent in will work anymore since Alexandre made various changes to the
rules files.)

One thing I'd note is that the test ran flawlessly on Windows when I tried
it, so I have no reason to believe there's anything wrong with the test itself.
The bugs are either in Wine or WIDL.  I don't remember if I ran the test on
Windows with a WIDL- or MIDL- generated typelib, but if it runs fine on Windows
with a WIDL-generated typelib, I'd look for bugs in Wine.  Otherwise, I'd look
for bugs in WIDL.  I think the test is OK.




re: oleaut32: Add tmarshal conformance test

2006-10-07 Thread Dan Kegel

James wrote:

On 10/6/06, Michal Okresa michal.okresa at ifne.eu wrote:

---
 dlls/oleaut32/tests/tmarshal.c | 1099

 dlls/oleaut32/tests/tmarshal.idl   |  159 +
 dlls/oleaut32/tests/tmarshal.rc|   30 +
 dlls/oleaut32/tests/tmarshal_dispids.h |   34 +
 4 files changed, 1322 insertions(+), 0 deletions(-)


Um...are you sending this in for Rob Shearman?  If so, you need to add
a changelog with his name in it.


And how does this relate to the version that Dan Hipschman sent in:
http://winehq.org/pipermail/wine-patches/2006-August/029511.html
(and which didn't work on Alexandre's machine,
http://winehq.org/pipermail/wine-devel/2006-August/050185.html )?
- Dan




Re: [PATCH] oleaut32: Add tmarshal conformance test

2006-10-06 Thread James Hawkins

On 10/6/06, Michal Okresa [EMAIL PROTECTED] wrote:

---
 dlls/oleaut32/tests/tmarshal.c | 1099

 dlls/oleaut32/tests/tmarshal.idl   |  159 +
 dlls/oleaut32/tests/tmarshal.rc|   30 +
 dlls/oleaut32/tests/tmarshal_dispids.h |   34 +
 4 files changed, 1322 insertions(+), 0 deletions(-)

diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c
new file mode 100644
index 000..be22443
--- /dev/null
+++ b/dlls/oleaut32/tests/tmarshal.c
@@ -0,0 +1,1099 @@
+/*
+ * Copyright (C) 2005-2006 Robert Shearman for CodeWeavers
+ *


Um...are you sending this in for Rob Shearman?  If so, you need to add
a changelog with his name in it.

--
James Hawkins




Re: oleaut32: Add tmarshal conformance test

2006-08-09 Thread Alexandre Julliard
Dan Hipschman [EMAIL PROTECTED] writes:

 This adds a conformance test written by Rob Shearman.  Pretty much all the
 code in the four files beginning with tmarshal is his.  All I did was make
 some changes to the Makefiles to be able to test things with IDL components,
 and I tweaked his stuff in one or two places where needed.  For example, I
 wrapped the tests that failed in todo_wine blocks, and I commented out a test
 that crashes Wine.  All the tests pass on Windows (including the one that
 crashes Wine).

They don't work on Wine here:

../../../tools/runtest -q -P wine -M oleaut32.dll -T ../../.. -p 
oleaut32_test.exe.so tmarshal.c  touch tmarshal.ok
fixme:ole:ITypeInfo_fnRelease destroy child objects
err:ole:marshal_object couldn't get IPSFactory buffer for interface 
{a028db05-30f0-4b93-b17a-41c72f831d84}
err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80040155
err:ole:CoMarshalInterface Failed to marshal the interface 
{a028db05-30f0-4b93-b17a-41c72f831d84}, 80040155
tmarshal.c:139: Test failed: CoMarshalInterface failed with error 0x80040155
err:ole:CoUnmarshalInterface IMarshal::UnmarshalInterface failed, 0x8003001e
tmarshal.c:760: Test failed: CoUnmarshalInterface failed with error 0x8003001e
wine: Unhandled page fault on write access to 0x at address 0x15a159 
(thread 0009), starting debugger...
WineDbg starting on pid 0x8
Unhandled exception: page fault on write access to 0x in 32-bit code 
(0x0015a159).
Register dump:
 CS:0073 SS:007b DS:007b ES:007b FS:003b GS:0033
 EIP:0015a159 ESP:0033fc88 EBP:0033fd58 EFLAGS:00010246(   - 00  -RIZP1)
 EAX:00159310 EBX:7b8abaa8 ECX: EDX:0001
 ESI:8003001e EDI:60412be7
Stack dump:
0x0033fc88:  00159310 7b88c87f 00159310 0001
0x0033fc98:  0015a500 0015a158 00159310 0033ff2c
0x0033fca8:  7b82be98 7b8415c0 7b8abaa8 8003001e
0x0033fcb8:  60412be7 0033fd58 0033fc90 7b88c805
0x0033fcc8:  0001   0020
0x0033fcd8:  0033fd58 7bc2764f 0011 7bc77848
fixme:ntdll:RtlNtStatusToDosErrorNoTeb no mapping for c119
Backtrace:
=1 0x0015a159 (0x0015a159)
fixme:dbghelp:elf_load_debug_info_from_map Alpha-support for Dwarf2 information 
for oleaut32_testelf
  2 0x603092f7 func_tmarshal+0x2f7 
[/home/julliard/wine/wine/dlls/oleaut32/tests/tmarshal.c:763] in oleaut32_test 
(0x603092f7)
  3 0x6040ee81 run_test+0x121(name=0x1103a9) 
[/home/julliard/wine/wine/dlls/oleaut32/tests/../../../include/wine/test.h:365] 
in oleaut32_test (0x6040ee81)
  4 0x6040f1a9 __wine_spec_exe_entry+0x99(peb=0x7ffdf000) 
[/home/julliard/wine/wine/dlls/winecrt0/exe_entry.c:37] in oleaut32_test 
(0x6040f1a9)
fixme:dbghelp:elf_load_debug_info_from_map Alpha-support for Dwarf2 information 
for kernel32elf
  5 0x7b87015b start_process+0xeb(arg=0x0) 
[/home/julliard/wine/wine/dlls/kernel/process.c:822] in kernel32 (0x7b87015b)
fixme:dbghelp:elf_load_debug_info_from_map Alpha-support for Dwarf2 information 
for libwine.so.1
  6 0x6001f887 wine_switch_to_stack+0x17 in libwine.so.1 (0x6001f887)
0x0015a159: addb%dl,0x0(%ecx)
Wine-dbg

-- 
Alexandre Julliard
[EMAIL PROTECTED]