http://bugs.winehq.org/show_bug.cgi?id=12371
Summary: Neural Noise Synthesizer fails to launch Product: Wine Version: 0.9.58. Platform: PC URL: http://www.transparentcorp.com/products/nns/trial.php OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: nodisgod@yahoo.com
Created an attachment (id=11867) --> (http://bugs.winehq.org/attachment.cgi?id=11867) Neural Noise Synthesizer output and page fault backtrace
This bug pertains to 0.9.59, so the version should be changed when that appropriate category is created. After installing the Neural Noise Synthesizer application, launching the application results in a splash screen, but the application closes after. Launched with winedbg, a page fault exception in ntdll is caught. Attached are relevant application outputs and backtrace.
http://bugs.winehq.org/show_bug.cgi?id=12371
scguy318 nodisgod@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=12371
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #1 from Austin English austinenglish@gmail.com 2008-04-07 23:06:54 --- Confirming in git.
http://bugs.winehq.org/show_bug.cgi?id=12371
scguy318 nodisgod@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.transparentcorp.c%7Chttp://www.transparentcorp.c |om/products/nns/trial.php |om/downloads/NeuralNoiseSynt | |hesizer.exe Version|0.9.58. |0.9.59.
--- Comment #2 from scguy318 nodisgod@yahoo.com 2008-10-02 19:44:03 --- Still a problem with today's Git.
http://bugs.winehq.org/show_bug.cgi?id=12371
--- Comment #3 from Austin English austinenglish@gmail.com 2010-06-03 23:06:17 --- Still present in wine-1.2-rc2-111-g9aa9a12.
http://bugs.winehq.org/show_bug.cgi?id=12371
--- Comment #4 from GyB gyebro69@gmail.com 2011-01-22 14:37:00 CST --- Created an attachment (id=32947) --> (http://bugs.winehq.org/attachment.cgi?id=32947) console log Wine-1.3.12
Still fails to start in Wine-1.3.12 although no page fault here. The application terminates after the splash screen.
Maybe unrelated to the problem but the app is using Armadillo copy-protection (if you can believe in Protection Id):
Scanning -> C:\Program Files\Neural Noise Synthesizer\basstools.dll File Type : 32-Bit Dll (Subsystem : Win GUI / 2), Size : 524288 (080000h) Byte(s) [File Heuristics] -> Flag : 00000000000000001100001100100001 (0x0000C321) [!] Armadillo *Unknown Version* detected ! [i] Splash Setting (0x0) -> NONE / Duration : 00 second(s) [CompilerDetect] -> Visual C/C++ - Scan Took : 0.99 Second(s)
The main executable also uses some kind of virtualization (THInstall).
http://bugs.winehq.org/show_bug.cgi?id=12371
--- Comment #5 from GyB gyebro69@gmail.com 2011-01-22 14:42:06 CST --- Created an attachment (id=32948) --> (http://bugs.winehq.org/attachment.cgi?id=32948) bzipped +relay,+seh,+tid log (uncompressed 31 MB)
http://bugs.winehq.org/show_bug.cgi?id=12371
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #6 from GyB gyebro69@gmail.com 2012-02-11 23:52:55 CST --- Still present in Wine-1.4rc3.
https://bugs.winehq.org/show_bug.cgi?id=12371
--- Comment #7 from Austin English austinenglish@gmail.com --- Still present in wine-1.7.19-70-gd6a59f7.
Scanning -> C:\Program Files\Neural Noise Synthesizer\BASSenc.dll File Type : 32-Bit Dll (Subsystem : Win GUI / 2), Size : 10296 (02838h) Byte(s) [File Heuristics] -> Flag : 00000000000001001100000000100011 (0x0004C023) [Entrypoint Section Entropy] : 5.40 [!] Petite [unknown version] compressed ! [CompilerDetect] -> Visual C++ 6.0 - Scan Took : 0.295 Second(s) [000000127h tick(s)] [229 scan(s) done]
Scanning -> C:\Program Files\Neural Noise Synthesizer\NeuralNoiseSynthesizer_Help.exe File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 1114723 (0110263h) Byte(s) -> File has 540677 (084005h) bytes of appended data starting at offset 08C25Eh [File Heuristics] -> Flag : 00000000000001001100000000100111 (0x0004C027) [Entrypoint Section Entropy] : 5.14 [!] Petite v2.2 compressed ! - Scan Took : 0.278 Second(s) [000000116h tick(s)] [533 scan(s) done]
Scanning -> C:\Program Files\Neural Noise Synthesizer\basstools.dll File Type : 32-Bit Dll (Subsystem : Win GUI / 2), Size : 524288 (080000h) Byte(s) [File Heuristics] -> Flag : 00000000000000001100001100100001 (0x0000C321) [Entrypoint Section Entropy] : 6.33 [!] Armadillo *Unknown Version* detected ! [i] Splash Setting (0x0) -> NONE / Duration : 00 second(s) [CompilerDetect] -> Visual C/C++ - Scan Took : 0.304 Second(s) [000000130h tick(s)] [229 scan(s) done]
Scanning -> C:\Program Files\Neural Noise Synthesizer\unins000.exe File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 684313 (0A7119h) Byte(s) -> File has 10521 (02919h) bytes of appended data starting at offset 0A4800h [File Heuristics] -> Flag : 00000000000001001000000000100100 (0x00048024) [Entrypoint Section Entropy] : 6.58 [-= Installer =-] Inno Setup v5.1.1 Module - Scan Took : 0.310 Second(s) [000000136h tick(s)] [533 scan(s) done]
Scanning -> C:\Program Files\Neural Noise Synthesizer\basssync.dll File Type : 32-Bit Dll (Subsystem : Win CUI / 3), Size : 536576 (083000h) Byte(s) [File Heuristics] -> Flag : 00000000000000011100001100000001 (0x0001C301) [Entrypoint Section Entropy] : 6.35 [!] Armadillo *Unknown Version* detected ! [i] Splash Setting (0x0) -> NONE / Duration : 00 second(s) [CompilerDetect] -> Visual C/C++ - Scan Took : 0.295 Second(s) [000000127h tick(s)] [229 scan(s) done]
Scanning -> C:\Program Files\Neural Noise Synthesizer\bass.dll File Type : 32-Bit Dll (Subsystem : Win GUI / 2), Size : 92728 (016A38h) Byte(s) [File Heuristics] -> Flag : 00000000000001001100000000100011 (0x0004C023) [Entrypoint Section Entropy] : 5.76 [!] Petite [unknown version] compressed ! [CompilerDetect] -> Visual C++ 6.0 - Scan Took : 0.276 Second(s) [000000114h tick(s)] [229 scan(s) done]
Scanning -> C:\Program Files\Neural Noise Synthesizer\NeuralNoiseSynthesizer.exe File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 9341015 (08E8857h) Byte(s) -> File has 9329719 (08E5C37h) bytes of appended data starting at offset 02C20h [File Heuristics] -> Flag : 00000000000001000100000000000110 (0x00044006) [Entrypoint Section Entropy] : 5.81 [!] THInstall detected ! - Scan Took : 0.418 Second(s) [0000001A2h tick(s)] [533 scan(s) done]
Scanning -> C:\Program Files\Neural Noise Synthesizer\basswma.dll File Type : 32-Bit Dll (Subsystem : Win GUI / 2), Size : 14904 (03A38h) Byte(s) [File Heuristics] -> Flag : 00000000000001001100000000100011 (0x0004C023) [Entrypoint Section Entropy] : 5.62 [!] Petite [unknown version] compressed ! [CompilerDetect] -> Visual C++ 6.0 - Scan Took : 0.249 Second(s) [0000000F9h tick(s)] [229 scan(s) done]
[austin@localhost ~]$ sha1sum NeuralNoiseSynthesizer.exe 664b9533475f59c4f0bb140aa241e7fa349dc4e3 NeuralNoiseSynthesizer.exe [austin@localhost ~]$ du -h NeuralNoiseSynthesizer.exe 11M NeuralNoiseSynthesizer.exe
https://bugs.winehq.org/show_bug.cgi?id=12371
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |obfuscation CC| |focht@gmx.net Component|ntdll |kernel32 Summary|Neural Noise Synthesizer |Neural Noise Synthesizer |fails to launch |(Thinstall virtualization | |wrapped app) fails to | |launch | |(GetEnvironmentVariableA/W | |needs to respect size | |limits for temp buffer | |allocation)
--- Comment #8 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming. The current problem is likely different to the one reported by OP some years ago because Wine evolved.
Anyway, the app is wrapped with 'VMware ThinApp Thinstall' application virtualization scheme.
It packages/unwraps its own .NET Framework 1.x in memory hence no .NET install prior required.
There were lots of potential error cases hence it took some time to nail the right one down :)
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Neural Noise Synthesizer
$ WINEDEBUG=+tid,+seh,+reay wine ./NeuralNoiseSynthesizer.exe >>log.txt 2>&1 ... 0023:Call KERNEL32.SetEnvironmentVariableA(006cb8ac "HXi4_V2",006cb8c4 "60") ret=7ff9399e 0023:Ret KERNEL32.SetEnvironmentVariableA() retval=00000001 ret=7ff9399e ... 0023:Call KERNEL32.WideCharToMultiByte(00000000,00000000,03268c60 L"HXi4_V2",00000008,0033ef28,00000009,00000000,0033edf8) ret=791d671b 0023:Ret KERNEL32.WideCharToMultiByte() retval=00000008 ret=791d671b 0023:Call KERNEL32.GetEnvironmentVariableA(0033ef28 "HXi4_V2",00180d28,fffffffe) ret=7ff24889 0023:Ret KERNEL32.GetEnvironmentVariableA() retval=00000000 ret=7ff24889 ... -- snip ---
At one point, the virtualization layer passes an invalid buffer size to 'GetEnvironmentVariableA' (not a mistake!).
Wine doesn't handle this properly.
http://msdn.microsoft.com/en-us/library/ms683188.aspx
--- quote --- DWORD WINAPI GetEnvironmentVariable( _In_opt_ LPCTSTR lpName, _Out_opt_ LPTSTR lpBuffer, _In_ DWORD nSize );
Parameters
lpName [in, optional]
The name of the environment variable. lpBuffer [out, optional]
A pointer to a buffer that receives the contents of the specified environment variable as a null-terminated string. An environment variable has a maximum size limit of 32,767 characters, including the null-terminating character. nSize [in]
The size of the buffer pointed to by the lpBuffer parameter, including the null-terminating character, in characters.
... Return value
If the function succeeds, the return value is the number of characters stored in the buffer pointed to by lpBuffer, not including the terminating null character. --- quote ---
I wrote a small fix limiting temp buffer size to maximum allowed range (not blindly taking input 'nSize') and it allowed the application to start.
Source: http://source.winehq.org/git/wine.git/blob/7ab78b4e03c5263ab4f3d258f419f66b5...
--- snip --- 167 DWORD WINAPI GetEnvironmentVariableA( LPCSTR name, LPSTR value, DWORD size ) 168 { 169 UNICODE_STRING us_name; 170 PWSTR valueW; 171 DWORD ret; 172 173 if (!name || !*name) 174 { 175 SetLastError(ERROR_ENVVAR_NOT_FOUND); 176 return 0; 177 } 178 179 if (!(valueW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR)))) 180 return 0; ... --- snip ---
$ sha1sum NeuralNoiseSynthesizer.exe 664b9533475f59c4f0bb140aa241e7fa349dc4e3 NeuralNoiseSynthesizer.exe
$ du -sh NeuralNoiseSynthesizer.exe 11M NeuralNoiseSynthesizer.exe
$ wine --version wine-1.7.19-70-gd6a59f7
Regards
https://bugs.winehq.org/show_bug.cgi?id=12371
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |515b8bebb6dfdf173f65beda6eb | |5f62f7e84c87d Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #9 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit http://source.winehq.org/git/wine.git/commitdiff/515b8bebb6dfdf173f65beda6eb...
Thanks Bruno
Regards
https://bugs.winehq.org/show_bug.cgi?id=12371
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.20.
http://bugs.winehq.org/show_bug.cgi?id=12371
Saulius K. saulius2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |saulius2@gmail.com
--- Comment #11 from Saulius K. saulius2@gmail.com --- (In reply to Anastasius Focht from comment #9)
Hello folks,
this is fixed by commit http://source.winehq.org/git/wine.git/commitdiff/ 515b8bebb6dfdf173f65beda6eb5f62f7e84c87d
Thanks Bruno
And no test case? :(
http://bugs.winehq.org/show_bug.cgi?id=12371
--- Comment #12 from Anastasius Focht focht@gmx.net --- Hello Saulius,
why would you want a test case here?
MSDN explicitly mentions the 32.767 characters limit which Wine previously didn't honour and the app works fine after the patch.
If you think MSDN is wrong then feel free to submit a patch, testing for other limits.
Regards