I finally was able to figure out how to attach the debugger to determine why services.exe did not start and I can clearly see now that the oem_table is NULL. It should have been set by LOCALE_Init() when called from kernel32's init function. However, if you look at the stack trace here, Wine hasn't even gotten to that point. As part of NTDLL's init, it is setting the DLL callback function which causes it to invoke the callback right away..as seen in the stack trace, it is making a function call which requires the oem_table to be set.
Does anyone have any ideas why this is happening? Why doesn't it happen when other programs such as wineboot and explorer.exe are started? It only happens with services.exe. I am using Wine 1.4.2
Roger R. Cruz
Program received signal SIGSEGV, Segmentation fault. 0x4003c304 in wine_cp_wcstombs (table=0x0, flags=0x0, src=0xbecc5648, srclen=0xc, dst=0x0, dstlen=0x0, defchar=0x0, used=0x0) at /home/rcruz/sandbox/wine.git/libs/wine/wctomb.c:447 447 if (table->info.char_size == 1)
#0 0x4003c304 in wine_cp_wcstombs (table=0x0, flags=0x0, src=0xbecc5648, srclen=0xc, dst=0x0, dstlen=0x0, defchar=0x0, used=0x0) at /home/rcruz/sandbox/wine.git/libs/wine/wctomb.c:447 #1 0x7bc76f94 in RtlUnicodeStringToOemSize (str=0xbecc5688) at /home/rcruz/sandbox/wine.git/dlls/ntdll/rtlstr.c:1356 #2 0x7bc76a18 in RtlUpcaseUnicodeStringToCountedOemString (oem=0xbecc56b0, uni=0xbecc5784, doalloc=0x0) at /home/rcruz/sandbox/wine.git/dlls/ntdll/rtlstr.c:1161 #3 0x7bc65604 in RtlIsNameLegalDOS8Dot3 (unicode=0xbecc5784, oem=0xbecc56b0, spaces=0xbecc5783 "{\030") at /home/rcruz/sandbox/wine.git/dlls/ntdll/path.c:888 #4 0x7bc361bc in find_file_in_dir ( unix_name=0x42952ae0 "/data/winehome/dosdevices/c:/windows/system32", pos=0x36, name=0x42952aa8, length=0xc, check_case=0x0, is_win_dir=0x0) at /home/rcruz/sandbox/wine.git/dlls/ntdll/directory.c:2125 #5 0x7bc3856c in lookup_unix_name (name=0x42952aa8, name_len=0x0, buffer=0xbecc5cac, unix_len=0x145, pos=0x35, disposition=0x1, check_case=0x0) at /home/rcruz/sandbox/wine.git/dlls/ntdll/directory.c:2753 #6 0x7bc393b4 in wine_nt_to_unix_file_name (nameW=0xbecc5ed4, unix_name_ret=0xbecc5e5c, disposition=0x1, check_case=0x0) ---Type <return> to continue, or q <return> to quit--- at /home/rcruz/sandbox/wine.git/dlls/ntdll/directory.c:2978 #7 0x7bc3888c in nt_to_unix_file_name_attr (attr=0xbecc5e90, unix_name_ret=0xbecc5e5c, disposition=0x1) at /home/rcruz/sandbox/wine.git/dlls/ntdll/directory.c:2817 #8 0x7bc43120 in NtQueryAttributesFile (attr=0xbecc5e90, info=0xbecc5ea8) at /home/rcruz/sandbox/wine.git/dlls/ntdll/file.c:2250 #9 0x7bc397b8 in RtlDoesFileExists_U (file_name=0x42952a20) at /home/rcruz/sandbox/wine.git/dlls/ntdll/directory.c:3040 #10 0x7bc6412c in RtlDosSearchPath_U (paths=0x42a704ba, search=0xbecc62e4, ext=0x0, buffer_size=0x40, buffer=0xbecc60c0, file_part=0xbecc5fc4) at /home/rcruz/sandbox/wine.git/dlls/ntdll/path.c:490 #11 0x7bc54848 in find_dll_file (load_path=0x42a704ba, libname=0xbecc62e4, filename=0xbecc60c0, size=0xbecc60bc, pwm=0xbecc6330, handle=0xbecc60b8) at /home/rcruz/sandbox/wine.git/dlls/ntdll/loader.c:2251 #12 0x7bc550c8 in load_dll (load_path=0x42a704ba, libname=0xbecc62e4, flags=0x0, pwm=0xbecc6330) at /home/rcruz/sandbox/wine.git/dlls/ntdll/loader.c:2354 #13 0x7bc4f1c0 in import_dll (module=0x7bc10000, descr=0x7bcca5dc, load_path=0x42a704ba) at /home/rcruz/sandbox/wine.git/dlls/ntdll/loader.c:807 #14 0x7bc502d0 in fixup_imports (wm=0x42952970, load_path=0x42a704ba) ---Type <return> to continue, or q <return> to quit--- at /home/rcruz/sandbox/wine.git/dlls/ntdll/loader.c:1057 #15 0x7bc52c34 in load_builtin_callback (module=0x7bc10000, filename=0x7bca58b0 "ntdll.dll") at /home/rcruz/sandbox/wine.git/dlls/ntdll/loader.c:1836 #16 0x40034008 in wine_dll_set_callback ( load=0x7bc527e8 <load_builtin_callback>) at /home/rcruz/sandbox/wine.git/libs/wine/loader.c:537 #17 0x7bc5874c in __wine_process_init () at /home/rcruz/sandbox/wine.git/dlls/ntdll/loader.c:3353 #18 0x40034694 in wine_init (argc=0x2, argv=0xbecc6b84, error=0xbecc6620 "", error_size=0x400) at /home/rcruz/sandbox/wine.git/libs/wine/loader.c:831 #19 0x00008870 in main (argc=0x2, argv=0xbecc6b84) at /home/rcruz/sandbox/wine.git/loader/main.c:230
Hold that thought. I may have introduced a dependency from ntdll to kernel32.dll as I tried to debug something else. I had forgotten about it and now I see it may be problematic.
________________________________ From: Roger Cruz roger_r_cruz@yahoo.com To: Wine Devel wine-devel@winehq.org Sent: Thursday, November 22, 2012 1:50 AM Subject: Why is services.exe crashing like this?
I finally was able to figure out how to attach the debugger to determine why services.exe did not start and I can clearly see now that the oem_table is NULL. It should have been set by LOCALE_Init() when called from kernel32's init function. However, if you look at the stack trace here, Wine hasn't even gotten to that point. As part of NTDLL's init, it is setting the DLL callback function which causes it to invoke the callback right away..as seen in the stack trace, it is making a function call which requires the oem_table to be set.
Does anyone have any ideas why this is happening? Why doesn't it happen when other programs such as wineboot and explorer.exe are started? It only happens with services.exe. I am using Wine 1.4.2
Roger R. Cruz
Program received signal SIGSEGV, Segmentation fault. 0x4003c304 in wine_cp_wcstombs (table=0x0, flags=0x0, src=0xbecc5648, srclen=0xc, dst=0x0, dstlen=0x0, defchar=0x0, used=0x0) at /home/rcruz/sandbox/wine.git/libs/wine/wctomb.c:447 447 if (table->info.char_size == 1)
#0 0x4003c304 in wine_cp_wcstombs (table=0x0, flags=0x0, src=0xbecc5648, srclen=0xc, dst=0x0, dstlen=0x0, defchar=0x0, used=0x0) at /home/rcruz/sandbox/wine.git/libs/wine/wctomb.c:447 #1 0x7bc76f94 in RtlUnicodeStringToOemSize (str=0xbecc5688) at /home/rcruz/sandbox/wine.git/dlls/ntdll/rtlstr.c:1356 #2 0x7bc76a18 in RtlUpcaseUnicodeStringToCountedOemString (oem=0xbecc56b0, uni=0xbecc5784, doalloc=0x0) at /home/rcruz/sandbox/wine.git/dlls/ntdll/rtlstr.c:1161 #3 0x7bc65604 in RtlIsNameLegalDOS8Dot3 (unicode=0xbecc5784, oem=0xbecc56b0, spaces=0xbecc5783 "{\030") at /home/rcruz/sandbox/wine.git/dlls/ntdll/path.c:888 #4 0x7bc361bc in find_file_in_dir ( unix_name=0x42952ae0 "/data/winehome/dosdevices/c:/windows/system32", pos=0x36, name=0x42952aa8, length=0xc, check_case=0x0, is_win_dir=0x0) at /home/rcruz/sandbox/wine.git/dlls/ntdll/directory.c:2125 #5 0x7bc3856c in lookup_unix_name (name=0x42952aa8, name_len=0x0, buffer=0xbecc5cac, unix_len=0x145, pos=0x35, disposition=0x1, check_case=0x0) at /home/rcruz/sandbox/wine.git/dlls/ntdll/directory.c:2753 #6 0x7bc393b4 in wine_nt_to_unix_file_name (nameW=0xbecc5ed4, unix_name_ret=0xbecc5e5c, disposition=0x1, check_case=0x0) ---Type <return> to continue, or q <return> to quit--- at /home/rcruz/sandbox/wine.git/dlls/ntdll/directory.c:2978 #7 0x7bc3888c in nt_to_unix_file_name_attr (attr=0xbecc5e90, unix_name_ret=0xbecc5e5c, disposition=0x1) at /home/rcruz/sandbox/wine.git/dlls/ntdll/directory.c:2817 #8 0x7bc43120 in NtQueryAttributesFile (attr=0xbecc5e90, info=0xbecc5ea8) at /home/rcruz/sandbox/wine.git/dlls/ntdll/file.c:2250 #9 0x7bc397b8 in RtlDoesFileExists_U (file_name=0x42952a20) at /home/rcruz/sandbox/wine.git/dlls/ntdll/directory.c:3040 #10 0x7bc6412c in RtlDosSearchPath_U (paths=0x42a704ba, search=0xbecc62e4, ext=0x0, buffer_size=0x40, buffer=0xbecc60c0, file_part=0xbecc5fc4) at /home/rcruz/sandbox/wine.git/dlls/ntdll/path.c:490 #11 0x7bc54848 in find_dll_file (load_path=0x42a704ba, libname=0xbecc62e4, filename=0xbecc60c0, size=0xbecc60bc, pwm=0xbecc6330, handle=0xbecc60b8) at /home/rcruz/sandbox/wine.git/dlls/ntdll/loader.c:2251 #12 0x7bc550c8 in load_dll (load_path=0x42a704ba, libname=0xbecc62e4, flags=0x0, pwm=0xbecc6330) at /home/rcruz/sandbox/wine.git/dlls/ntdll/loader.c:2354 #13 0x7bc4f1c0 in import_dll (module=0x7bc10000, descr=0x7bcca5dc, load_path=0x42a704ba) at /home/rcruz/sandbox/wine.git/dlls/ntdll/loader.c:807 #14 0x7bc502d0 in fixup_imports (wm=0x42952970, load_path=0x42a704ba) ---Type <return> to continue, or q <return> to quit--- at /home/rcruz/sandbox/wine.git/dlls/ntdll/loader.c:1057 #15 0x7bc52c34 in load_builtin_callback (module=0x7bc10000, filename=0x7bca58b0 "ntdll.dll") at /home/rcruz/sandbox/wine.git/dlls/ntdll/loader.c:1836 #16 0x40034008 in wine_dll_set_callback ( load=0x7bc527e8 <load_builtin_callback>) at /home/rcruz/sandbox/wine.git/libs/wine/loader.c:537 #17 0x7bc5874c in __wine_process_init () at /home/rcruz/sandbox/wine.git/dlls/ntdll/loader.c:3353 #18 0x40034694 in wine_init (argc=0x2, argv=0xbecc6b84, error=0xbecc6620 "", error_size=0x400) at /home/rcruz/sandbox/wine.git/libs/wine/loader.c:831 #19 0x00008870 in main (argc=0x2, argv=0xbecc6b84) at /home/rcruz/sandbox/wine.git/loader/main.c:230