Page 1 of 1

par2.exe error

Posted: May 30th, 2009, 12:01 am
by Axsuul
Hi. whenever sabnzbd finishes downloading something and needs to par it, i get an error message in Windows:

par2.exe - Unable to Locate Component
This application has failed to start because MSVCR80.dll was not found.  Re-installing the application may fix this problem.

Any ideas? Should I just DL any random MSVCR80.dll file and put it in my system32 folder? Thanks for your time!

Re: par2.exe error

Posted: May 30th, 2009, 2:33 am
by shypike
The par2 program we ship should not need this file, it uses msvcr71.dll and msvcp71.dll.
Must be some DLL-hell problem.
Anyway, you could get it from Microsoft.

Re: par2.exe error

Posted: May 31st, 2009, 5:29 pm
by vornys
Hi,

I'm having the same problem.

The reason seems to be that the tbb library tries to load tbbmalloc.dll, which is not included with the par2 binary. In my case it is found in the Matlab directory, which is in the PATH. It is however linked against the 8.0 runtime and therefore causes the error message.

Maybe you could include tbbmalloc.dll (linked against 7.1 runtime) as an easy workaround.

The error message is annoying, but the program seems to work correctly nonetheless...

Hope this helps!

Best,
Vornys

Re: par2.exe error

Posted: May 31st, 2009, 5:49 pm
by vornys
Another workaround is of course to rename par2.exe to par2-multicore.exe and to copy par2-classic.exe to par2.exe.

This get's rid of the error message with the downside that par2-classic only uses one core...

Best,
Vornys

Re: par2.exe error

Posted: December 13th, 2009, 2:37 pm
by Jason
Has there been any real solution to this problem?

I'm having the same issues, and putting MSVCR80.DLL in the Par2 directory only results in a different error. As vornys said, par2 will still run and do its job, but I've noticed it won't do it until you've cleared the error box.

In other words, you can't just leave a machine to download, verify, and extract multiple NZBs as it'll stop on the first verify until you click "OK."

Re: par2.exe error

Posted: December 13th, 2009, 4:34 pm
by shypike
We have no idea what's going here.
If you install the Windows distribution on a virgin Windows system, there is no problem.
The only DLLs required by par2-multicore are msvcp71.dll, msvcrf71.dll and tbb.dll.

Re: par2.exe error

Posted: January 3rd, 2010, 2:25 pm
by vornys
As I said above, the problem is that tbb.dll dynamically tries to load tbbmalloc.dll. It is not included with the par2 binary so usually this fails and tbb does its job without it. However, if some other software is installed that does include tbbmalloc.dll (like Matlab), tbb.dll will happily use that dll. The problem is now that the tbb.dll from par2 and the tbbmalloc.dll (from Matlab etc.) use different runtimes (7.1 vs. 8.0) leading to the error message.

There are two possible solutions:
1) Prevent tbb.dll from trying to load tbbmalloc.dll (I don't know if this is possible).
2) Provide a tbbmalloc.dll with par2 that is linked against the same runtime as tbb.dll

Re: par2.exe error

Posted: January 3rd, 2010, 3:43 pm
by shypike
par2.exe does not need tbbmalloc.dll.
This file doesn't exist on my system and still par2-tbb works OK.
chuchusoft doesn't include it in their binary distribution.

Nevertheless, it could be some bug in the Intel libraries.
Like it will use tbbmalloc.dll if it exists.
In your case it will find the wrong version.
Can you remove the DLL from the system search path?
Did Matlab install the dll in system32? That would be a bad idea.

I'll look into this further.

Re: par2.exe error

Posted: January 4th, 2010, 12:01 pm
by vornys
I know that par2 does not need tbbmalloc. However, you can check with Process Monitor or similar tools, that after starting, it looks for tbbmalloc.dll and loads it if found. I checked the TBB docs but I could not find a reference to this behaviour. So I'm not sure why this happens.

Matlab keeps its stuff in it own directory but adds this directory to the system PATH. This is enough for par2 to find tbbmalloc.dll.

Re: par2.exe error

Posted: January 4th, 2010, 12:46 pm
by inpheaux
I just looked it up, and we can redistribute tbbmalloc.dll just like tbb.dll, so I guess there wouldn't be any harm in including it? I'll run some local tests and then check it in.

If you'd like to test too, grab the windows zip from here, and then move the tbb.dll/tbbmalloc.dll from here if you're on 32 bit windows

tbb22_20090809oss\ia32\vc7.1\bin -> SABnzbd\win\par2

Or here if you're on 64 bit windows

tbb22_20090809oss\intel64\vc8\bin -> SABnzbd\win\par2\x64

Also rename the old tbb.dll.

Looks like while I was posting this something I downloaded made it through par2 fine. Could one of you guys who was actually having an error report back?

Re: par2.exe error

Posted: January 5th, 2010, 12:29 pm
by muwa
I had exact same problem too. After copying new dlls problem is solved. Thanks

Re: par2.exe error

Posted: January 7th, 2010, 8:40 pm
by inpheaux
muwa wrote: I had exact same problem too. After copying new dlls problem is solved. Thanks
Great. Anybody else? Vornys?

Re: par2.exe error

Posted: January 9th, 2010, 12:56 pm
by inpheaux
Ok, looks like you can't just go grab whatever the latest build is, you need the corresponding build to whatever par2 was compiled with, both tbb version and VC version. I did all the hunting and got the corresponding files checked in.

This will be resolved in 0.5b7 . . . or will it be 0.5rc1? *fingers crossed*

Re: par2.exe error

Posted: February 7th, 2010, 12:40 am
by chuchusoft
Hi to all,

I maintain the par2+tbb program (infrequently). Anyway, this issue with requiring the correct version of the Microsoft C runtime libraries to be installed is something that did bug me (I had it happen on a recent fresh XPSP3 install I did) so I decided to get rid of it by statically linking in the CRT lib instead of dynamically linking against it (which then makes it require a DLL). So the latest 20100203 version should make this problem go away.

I also statically link in the TBB so there is no need for the TBB.dll file in the Windows distribution anymore.

As usual, you can get it at:



If you have Q's or problems, email me (I usually don't visit this forum).

Cheers,

Vincent.

Re: par2.exe error

Posted: February 7th, 2010, 4:19 am
by inpheaux
Thanks for releasing a new build! I'll start testing it immediately.