Hello,
I started debugging a relatively simple problem, which is I copied comdlg32.ocx and regsvr32.exe from a windows 2000 box to a no-windows wine installation (on Mandrake 8.2), and found that if I run 'wine regsvr32.exe comdlg32.ocx', it succeeds fine, whereas running the same command under wcmd caused failures.
I debugged a little further and the problem appears to be caused by argc being wrong when wcmd (a winelib program) launches regsvr32.exe. I am continuing to investigate but I know argv/argc issues have cropped up lots and would appreciate any pointers.
My debugging so far (edited, @@@@ are my extra trace points):
./wcmd -debugmsg +msvcrt,+process >~/wine/patches/dbg/wcmdproccessinfo 2>&1
WCMD starting: trace:process:process_init @@@@@ argv[0] = ./wcmd trace:process:process_init @@@@@ argc = 1 trace:process:process_init @@@@@ argv[0] = /usr/local/bin/wineconsole trace:process:process_init @@@@@ argv[1] = --use-event=52 trace:process:process_init @@@@@ argc = 2
Launching regsvr32.exe: trace:process:process_init @@@@@ argv[0] = /usr/local/bin/wine trace:process:process_init @@@@@ argv[1] = -- trace:process:process_init @@@@@ argv[2] = regsvr32 trace:process:process_init @@@@@ argv[3] = comdlg32.ocx trace:process:process_init @@@@@ argc = 4 *** Note argc is 4 (correctly)
trace:msvcrt:msvcrt_init_mt_locks initializing mtlocks trace:msvcrt:msvcrt_init_io :handles (8)(12)(16) trace:msvcrt:msvcrt_init_console :Opening console handles trace:msvcrt:msvcrt_init_args got 'regsvr32 comdlg32.ocx', wide = L"regsvr32 comdlg32.ocx" argc=3 *** Note argc is 3 now, incorrectly
Other debugging bits of info, originally I thought the problem was in native msvcrt so I added trace to local __getmainargs to trace out what was passed:
wine: trace:msvcrt:msvcrt_init_args got 'regsvr32 comdlg32.ocx', wide = L"regsvr32 comdlg32.ocx" argc=2 *** 2 parms trace:msvcrt:__getmainargs @@@ MSVCRT Info trace:msvcrt:__getmainargs @@@ Arg 0 = regsvr32 trace:msvcrt:__getmainargs @@@ Arg 1 = comdlg32.ocx
wcmd: trace:msvcrt:msvcrt_init_args got 'regsvr32 comdlg32.ocx', wide = L"regsvr32 comdlg32.ocx" argc=3 *** 3 parms trace:msvcrt:__getmainargs @@@ MSVCRT Info trace:msvcrt:__getmainargs @@@ Arg 0 = -- trace:msvcrt:__getmainargs @@@ Arg 1 = regsvr32 trace:msvcrt:__getmainargs @@@ Arg 2 = comdlg32.ocx
I'll continue to investigate, but suggestions welcome.
Regards, Jason
jason @ the-edmeades.demon.co.uk
I got the same problem running regsvr32 under FusionSoft DVD (no wcmd).
Following command are launched by the software and they loop busy, never finish their work : (they run normally when run from bash prompt)
wine -- regsvr32.exe /s /u C:\WINDOWS\SYSTEM\FraunhoferAudio.ax C:\WINDOWS\SYSTEM\FraunhoferVideo.ax wine -- regsvr32.exe /s /u C:\WINDOWS\SYSTEM\DvdAudio.ax C:\WINDOWS\SYSTEM\DvdVideo.ax
So I think the problem isn't wcmd.
--- Ann and Jason Edmeades us@the-edmeades.demon.co.uk a écrit : > Hello,
I started debugging a relatively simple problem, which is I copied comdlg32.ocx and regsvr32.exe from a windows 2000 box to a no-windows wine installation (on Mandrake 8.2), and found that if I run 'wine regsvr32.exe comdlg32.ocx', it succeeds fine, whereas running the same command under wcmd caused failures.
<snip>
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
No, I dont think so either, its just a nice simple way of pointing out the problem. I thing the problem revolves around fork_and_exec and its rebuilding of the command line (it inserts '--') but I need to spend a little more time trying to get my head around it!
I've got the day off tomorrow so you never know I might get further - Its getting late here (in the UK) so I'm calling it a night.
Regards, Jason
-----Original Message----- From: Sylvain Petreolle [mailto:spetreolle@yahoo.fr] Sent: 28 April 2002 23:06 To: Ann and Jason Edmeades Cc: wined Subject: Re: argc / argv issue?
I got the same problem running regsvr32 under FusionSoft DVD (no wcmd).
Following command are launched by the software and they loop busy, never finish their work : (they run normally when run from bash prompt)
wine -- regsvr32.exe /s /u C:\WINDOWS\SYSTEM\FraunhoferAudio.ax C:\WINDOWS\SYSTEM\FraunhoferVideo.ax wine -- regsvr32.exe /s /u C:\WINDOWS\SYSTEM\DvdAudio.ax C:\WINDOWS\SYSTEM\DvdVideo.ax
So I think the problem isn't wcmd.
--- Ann and Jason Edmeades us@the-edmeades.demon.co.uk a écrit : > No, I dont think so either, its just a nice simple
way of pointing out the problem. I thing the problem revolves around fork_and_exec and its rebuilding of the command line (it inserts '--') but I need to spend a little more time trying to get my head around it!
I've got the day off tomorrow so you never know I might get further - Its getting late here (in the UK) so I'm calling it a night.
I'm in france - it's later as you (+1 hour hehe).
The problem is not so simple. Think there are several processes and so several arg/argv combiantions.
There are real argc/argv (Linux ones) and simulated (Windows ones). So i think messages should show it. We could write W-argc and U-argc as it exists for processes. We could avoid severals misinterpretations this way.
Comments ?
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com