HydrogenAudio

Lossless Audio Compression => WavPack => Topic started by: samidare1234 on 2015-10-12 02:32:48

Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-12 02:32:48
I'm using the latest official wavpack 2.75.2 on windows 10 pro x64(alse the latest official build).
32bit works fine here.
But sseems that 64bit version doesn't work.
Even use the command wavpack.exe -h . →Get the error message wavpack.exe has stopped working.

Sorry about that I can't check on other windows version.

Anyone use win10 with the 64bit version wavpack fine?
Title: Can't use 64bit wavpack in windows 10.
Post by: A_Man_Eating_Duck on 2015-10-12 02:39:25
Working fine for me on W10 x64.
Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-12 02:56:34
Working fine for me on W10 x64.

Weried.
I've reproduced the same problem on other windows 10 pc.
Title: Can't use 64bit wavpack in windows 10.
Post by: saratoga on 2015-10-12 04:09:05
Possibly the compile you are using requires an unsupported CPU feature.
Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-12 06:48:06
Possibly the compile you are using requires an unsupported CPU feature.

My CPU is i7-4510u. Not too old...
And the compile I'm using is downloaded from the Official Web Site.
Title: Can't use 64bit wavpack in windows 10.
Post by: bryant on 2015-10-12 07:39:24
Working fine for me on W10 x64.

Weried.
I've reproduced the same problem on other windows 10 pc.

Unfortunately I don't have a Windows 10 system yet, but maybe you can answer a couple questions.

First, does “wavpack --help” work, or does it only crash if you try to compress audio?

Also, can you check if the previous version crashes too (it's been out for almost 5 months)? It's located here (http://www.wavpack.com/wavpack-4.75.0-x64.zip).

In the meantime, of course, you can use the 32-bit version. It's actually almost as fast as the 64-bit version, and sometimes even faster.

Thanks for the help, and sorry for the trouble!

--David
Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-12 08:07:40
Working fine for me on W10 x64.

Weried.
I've reproduced the same problem on other windows 10 pc.

Unfortunately I don't have a Windows 10 system yet, but maybe you can answer a couple questions.

First, does “wavpack --help” work, or does it only crash if you try to compress audio?

Also, can you check if the previous version crashes too (it's been out for almost 5 months)? It's located here (http://www.wavpack.com/wavpack-4.75.0-x64.zip).

In the meantime, of course, you can use the 32-bit version. It's actually almost as fast as the 64-bit version, and sometimes even faster.

Thanks for the help, and sorry for the trouble!

--David


"wavpack --help" crashes too.
and same with the previous version.


Title: Can't use 64bit wavpack in windows 10.
Post by: [JAZ] on 2015-10-12 11:09:41
No problem running it here on Win 10 Pro x64 (upgraded from Win 7).

I also checked with depends (http://www.dependencywalker.com/), and I see that it only depends on kernel32.dll, so I discard runtime dependency problems.

This is on an old core 2 duo, so it also discards requing sse4 or something.
Title: Can't use 64bit wavpack in windows 10.
Post by: lvqcl on 2015-10-12 17:09:14
What's the full path (incl. filename) of the encoder?
Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-12 21:09:40
What's the full path (incl. filename) of the encoder?

C:\wavpack.exe
Title: Can't use 64bit wavpack in windows 10.
Post by: LithosZA on 2015-10-13 06:42:40
Try to put the files in a different directory/folder and run Command Prompt as Administrator before running wavpack.exe. It might be some kind of Permission issue
Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-13 12:11:23
Try to put the files in a different directory/folder and run Command Prompt as Administrator before running wavpack.exe. It might be some kind of Permission issue

* run Command Prompt as Administrator .
*put wavpack to D and run Command Prompt as Administrator.
both Crashed,too.
(http://i.imgur.com/hNzJ1Yr.png)
Really strange...
Title: Can't use 64bit wavpack in windows 10.
Post by: saratoga on 2015-10-13 15:01:56
Corrupted download or broken windows install?
Title: Can't use 64bit wavpack in windows 10.
Post by: bryant on 2015-10-13 17:59:20
There's only one tricky thing that wavpack.exe does before displaying the help message, and I've eliminated that for a test (it has to do with the debug mode).

Could you please try the attached executable with either just "wavpack" or "wavpack --help"?

Thanks!
Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-13 23:17:06
There's only one tricky thing that wavpack.exe does before displaying the help message, and I've eliminated that for a test (it has to do with the debug mode).

Could you please try the attached executable with either just "wavpack" or "wavpack --help"?

Thanks!

with the test version "wavpack" and "wavpack --help" both crashed,too.
Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-13 23:22:27
Corrupted download or broken windows install?


I'm using a clean install of the official ISO.
And Another Win 10 PC occured this too.
I'm not using the English version windows, so maybe the language Compatibility problem?
Title: Can't use 64bit wavpack in windows 10.
Post by: lvqcl on 2015-10-14 16:47:59
I built Wavpack 4.75.2 with 3 different compilers. Maybe one of them will work?
Title: Can't use 64bit wavpack in windows 10.
Post by: [JAZ] on 2015-10-14 20:58:20
There is one thing that bugs me on that screenshot, that "Y"-like symbol.

Is that a chinese/japanese Windows?  If so, maybe the problem is related to unicode support. (in the multibyte sense of the term).

Btw, to further help on the diagnosis, it would be nice that you report the real error.
To do so, open the Event viewer (you can do that easily writing eventvwr on the search box).
there, open the "Windows Logs" folder, Applications, and locate the error for wavpack
Title: Can't use 64bit wavpack in windows 10.
Post by: lvqcl on 2015-10-14 21:15:48
https://en.wikipedia.org/wiki/Code_page_932 (https://en.wikipedia.org/wiki/Code_page_932)

Quote
Notice that in the CP932.TXT mapping table linked below, code 0x5C is mapped to U+005C REVERSE SOLIDUS (\). This is often a source of confusion because in many Japanese fonts, this code is displayed as a Yen symbol, which would normally be represented as U+00A5 YEN SIGN (¥) in Unicode. However, on Windows systems, code 0x5C in code page 932 behaves as a reverse solidus (backslash) in all respects other than how it is displayed by some fonts.
Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-14 23:35:08

There is one thing that bugs me on that screenshot, that "Y"-like symbol.

Is that a chinese/japanese Windows?  If so, maybe the problem is related to unicode support. (in the multibyte sense of the term).

Btw, to further help on the diagnosis, it would be nice that you report the real error.
To do so, open the Event viewer (you can do that easily writing eventvwr on the search box).
there, open the "Windows Logs" folder, Applications, and locate the error for wavpack

Yes, Japanese windows.


Here is the real error.
-----------------------------------------------------------------------------------------------

Faulting application name: wavpack.exe, version: 0.0.0.0, time stamp: 0x561d35ca
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x00007ffde3aced90
Faulting process id: 0x2724
Faulting application start time: 0x01d106d06d7fe478
Faulting application path: C:\wavpack.exe
Faulting module path: unknown
Report Id: 317caac4-2ae6-4c87-9660-08033811575a
Faulting package full name:
Faulting package-relative application ID:
Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-14 23:38:11
I built Wavpack 4.75.2 with 3 different compilers. Maybe one of them will work?




msvc2010 and msvc2013 both crashed.

But the gcc version works!
Title: Can't use 64bit wavpack in windows 10.
Post by: lvqcl on 2015-10-15 19:30:55
Fault offset: 0x00007ffde3aced90

One thing that comes to mind: download VMMap (https://technet.microsoft.com/en-us/library/dd535533.aspx), then:
1) run wavpack
2) start VMMap, choose wavpack.exe process, then File -> Save As... and save wavpack.mmp file.
3) Open Event viewer, and find the event for this crash.
4) post the contents of the event and wavpack.mmp.
Title: Can't use 64bit wavpack in windows 10.
Post by: [JAZ] on 2015-10-15 20:02:23
Error code 0xc0000005 means access to an invalid address.

Usual for uninitialized pointer variables, or for retreiveing something that is usually obtained without problems, but that this time failed and is not checked against this fact when used afterwards. (Guess it's more like the later than the former).
Still a shot in the dark, but it could have been other error codes.

Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-16 03:48:24
Fault offset: 0x00007ffde3aced90

One thing that comes to mind: download VMMap (https://technet.microsoft.com/en-us/library/dd535533.aspx), then:
1) run wavpack
2) start VMMap, choose wavpack.exe process, then File -> Save As... and save wavpack.mmp file.
3) Open Event viewer, and find the event for this crash.
4) post the contents of the event and wavpack.mmp.


wavpack.mmp
https://mega.nz/#!qo4wkCSD (https://mega.nz/#!qo4wkCSD)

Faulting application name: wavpack.exe, version: 0.0.0.0, time stamp: 0x560e131d
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x00007ff8c9c2ed90
Faulting process id: 0x118c
Faulting application start time: 0x01d107bc7636aac1
Faulting application path: C:\wavpack.exe
Faulting module path: unknown
Report Id: 69498379-5d08-4038-9d14-19b41db8e8c4
Faulting package full name:
Faulting package-relative application ID:
Title: Can't use 64bit wavpack in windows 10.
Post by: lvqcl on 2015-10-16 05:01:48
wavpack.mmp
https://mega.nz/#!qo4wkCSD (https://mega.nz/#!qo4wkCSD)

It says "Enter decryption key"
Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-16 06:53:55
wavpack.mmp
https://mega.nz/#!qo4wkCSD (https://mega.nz/#!qo4wkCSD)

It says "Enter decryption key"


Sorry.
here is the full download link.
https://mega.nz/#!qo4wkCSD!MybUJnJX...OYLzCd2Hcj2ViuM (https://mega.nz/#!qo4wkCSD!MybUJnJXc2pQ3TQ0ClySDj-EnvjCOYLzCd2Hcj2ViuM)
Title: Can't use 64bit wavpack in windows 10.
Post by: lvqcl on 2015-10-16 17:37:22
So... the base address of wavpack.exe is 0x400000. The fault offset is 0x00007ff8c9c2ed90, so the fault address is 0x7FF8CA02ED90 (correct me if I'm wrong). But there's nothing at this addredd. The only thing above 0x80000000 is ntdll.dll, but it starts at 0x7FF8CC140000.
Don't know what it means. On my computer, there's nothing above 0x80000000 because wavpack doesn't have LargeAddressAware flag.

I took the official wavpack.exe and set this flag in its header. Maybe this will prevent it from crashing?
Title: Can't use 64bit wavpack in windows 10.
Post by: samidare1234 on 2015-10-16 23:17:15
So... the base address of wavpack.exe is 0x400000. The fault offset is 0x00007ff8c9c2ed90, so the fault address is 0x7FF8CA02ED90 (correct me if I'm wrong). But there's nothing at this addredd. The only thing above 0x80000000 is ntdll.dll, but it starts at 0x7FF8CC140000.
Don't know what it means. On my computer, there's nothing above 0x80000000 because wavpack doesn't have LargeAddressAware flag.

I took the official wavpack.exe and set this flag in its header. Maybe this will prevent it from crashing?

yes, it prevent it from crashing! 
Title: Can't use 64bit wavpack in windows 10.
Post by: lvqcl on 2015-10-17 08:06:16
IMHO it's really strange that wavpack crashes just because this flag in its header was not set. It shouldn't. And it works without problems on many other systems.

Anybody knows what can cause such problems?

Added: found this question, without answers: http://forum.sysinternals.com/vmmap-crash-...topic30356.html (http://forum.sysinternals.com/vmmap-crash-64bit-exe-with-largeaddressawareno_topic30356.html)
Title: Can't use 64bit wavpack in windows 10.
Post by: bryant on 2015-10-17 18:23:10
Yeah, it's certainly not clear what's going on here. WavPack does not use a lot of memory and if you just type “wavpack” it does not allocate any memory at all. There are a few system calls which I tried to eliminate in the special version I created above, but unfortuately missed one. And of course in the 64-bit version all pointers are going to be 64-bits wide, so the flag should be obsolete now (unless someone ported code that stores pointers in hard-coded 32-bit integers, which is very poor design).

I did find somewhere that the LargeAddressAware flag should be set by default in MSVC for 64-bit applications (which makes sense), but that if it's not then the only disadvantage is that an application can't allocate more than 2 GB (which WavPack would never get near). Sounds like this crash, especially given lvqcl's unanswered link, might be a system issue (the code to load 64-bit applications with LargeAddressAware:NO probably doesn't get tested much).

Anyway, it's easy enough to set that bit as it should be and be done with it. Thanks so much to samidare1234 for reporting this and, again, to lvqcl (and the others) for all your help!
Title: Can't use 64bit wavpack in windows 10.
Post by: lvqcl on 2015-10-17 19:21:06
And of course in the 64-bit version all pointers are going to be 64-bits wide, so the flag should be obsolete now


Probably this setting was copied from settings for 32-bit exe files into the settigs for 64-bit project?
Title: Can't use 64bit wavpack in windows 10.
Post by: bryant on 2015-10-17 22:30:48
Probably this setting was copied from settings for 32-bit exe files into the settigs for 64-bit project?

Yeah, that's probably what happened. I certainly never [re]set it intentionally.
Title: Can't use 64bit wavpack in windows 10.
Post by: lvqcl on 2015-10-17 23:21:05
When I open wavpack.sln in MSVS 2013, the following linker options are not default (Release,x64):

Enable Incremental Linking: No (/INCREMENTAL:NO)
Generate Debug Info: No
SubSystem: Console (/SUBSYSTEM:CONSOLE)
Enable Large Addresses: No (/LARGEADDRESSAWARE:NO)
References: Yes (/OPT:REF)
Enable COMDAT Folding: Yes (/OPT:ICF)
Randomized Base Address: No (/DYNAMICBASE:NO)
Target Machine: MachineX64 (/MACHINE:X64)
Title: Can't use 64bit wavpack in windows 10.
Post by: lamedude on 2015-10-18 09:12:29
Visual Studio sets those for new projects release configuration except for debug and machine.  Dynamic base default is off in 08 so its probably getting set when upgrading.
And of course in the 64-bit version all pointers are going to be 64-bits wide, so the flag should be obsolete now (unless someone ported code that stores pointers in hard-coded 32-bit integers, which is very poor design).

Windows wouldn't be Windows without bad (http://blogs.msdn.com/b/oldnewthing/archive/2015/06/05/10619746.aspx) software (http://blogs.msdn.com/b/oldnewthing/archive/2015/07/09/10624293.aspx)
Title: Can't use 64bit wavpack in windows 10.
Post by: Case on 2015-10-18 10:09:13
I could replicate the crash samidare1234 reported on English Windows 10 by installing EMET (https://www.microsoft.com/en-us/download/details.aspx?id=49166) and marked wavpack.exe to get protected by all the default mitigations.
I tested the behavior on some other random x64 programs where protecting them with EMET alone showed no issues but once largeaddressaware bit was altered they instantly crashed. So I too agree that changing the header bit is all you need to do.
Title: Can't use 64bit wavpack in windows 10.
Post by: lvqcl on 2015-10-18 10:25:17
Quote
The price of paranoia is eternal vigilance.
Title: Can't use 64bit wavpack in windows 10.
Post by: bryant on 2015-10-19 22:38:53
When I open wavpack.sln in MSVS 2013, the following linker options are not default (Release,x64):

Enable Incremental Linking: No (/INCREMENTAL:NO)
Generate Debug Info: No
SubSystem: Console (/SUBSYSTEM:CONSOLE)
Enable Large Addresses: No (/LARGEADDRESSAWARE:NO)
References: Yes (/OPT:REF)
Enable COMDAT Folding: Yes (/OPT:ICF)
Randomized Base Address: No (/DYNAMICBASE:NO)
Target Machine: MachineX64 (/MACHINE:X64)

Thanks, most of these make sense. I either changed them to allow the programs to link (/INCREMENTAL) or are obvious (/SUBSYSTEM:CONSOLE, although probably the library and DLL do not need this).

However, I don't understand MachineX64. Obviously that must be set the way it is to generate x64 code, right?

Quote from: case link=msg=0 date=
I could replicate the crash samidare1234 reported on English Windows 10 by installing EMET and marked wavpack.exe to get protected by all the default mitigations.
I tested the behavior on some other random x64 programs where protecting them with EMET alone showed no issues but once largeaddressaware bit was altered they instantly crashed. So I too agree that changing the header bit is all you need to do.

Thanks for trying this out case; it's reassuring to know it's not just me.... 

BTW, I assume that the random x64 programs you tried did not try to allocate over 2GB of memory; that would obviously make them crash (well, or fail gracefully) with LAA.
Title: Can't use 64bit wavpack in windows 10.
Post by: 2012 on 2015-10-20 00:43:52
I have to say, those Windows tools are completely fringe to me.

I use MinGW-w64 to cross-compile binaries (both win32 and win64) for my program. Do I need to check for anything (other than SIZE_MAX)?
Title: Can't use 64bit wavpack in windows 10.
Post by: lvqcl on 2015-10-24 12:03:40
When I open wavpack.sln in MSVS 2013, the following linker options are not default (Release,x64):

Thanks, most of these make sense. I either changed them to allow the programs to link (/INCREMENTAL) or are obvious (/SUBSYSTEM:CONSOLE, although probably the library and DLL do not need this).

However, I don't understand MachineX64. Obviously that must be set the way it is to generate x64 code, right?


By "not default" I meant that these options have some defined values (denoted as bold font), not just <inherit from parent or project defaults>.
Title: Can't use 64bit wavpack in windows 10.
Post by: rskmyonoffice on 2015-11-16 20:23:21
Hi, had the same problem with the DirectShow Filter (CoreWavPack 1.2.0) and Windows 10. Change to 32bit solved the problem.

Thanks
Title: Can't use 64bit wavpack in windows 10.
Post by: bryant on 2015-11-22 20:25:41
By "not default" I meant that these options have some defined values (denoted as bold font), not just <inherit from parent or project defaults>.
Ah, okay. That makes sense now.

Hi, had the same problem with the DirectShow Filter (CoreWavPack 1.2.0) and Windows 10. Change to 32bit solved the problem.
Thanks for letting me know. I haven't rebuilt the DirectShow filters for a while, but I will definitely do that once I've fixed this issue in the configuration.