elha / CDex

famous CD-Ripper, new version 1.71, this is a cloned Repo from cdexos.sourceforge.net with fixed cddb-bug
GNU General Public License v3.0
15 stars 20 forks source link

Can't Run, Want Project to Live On #1

Open Gabby-Paolucci opened 8 years ago

Gabby-Paolucci commented 8 years ago

The original CDex project has been taken over and hijacked to include adware in the installer, and the SourceForge project no longer exists (see CDex - Wikipedia). You have the only source code I can find online for CDex. I'm hoping to revive the clean CDex.

The problem is, I can't run the Visual Studio project in your repository. I'm getting the error:

Unhandled exception at 0x00FF9AF3 in CDex.exe: An invalid parameter was passed to a function that considers invalid parameters fatal.

At invarg.c Line 132: `` __fastfail(FAST_FAIL_INVALID_ARG);

I'm familiar with C# but not C++, and I'm not sure what I can do to resolve this issue. Any help you could give would be greatly appreciated.

wech71 commented 8 years ago

Could you provide the complete call stack? This method is just a helper function which is being called when an invalid argument was passed to a function (probably a null pointer)

Update: I just downloaded, and compiled it and it works for me.

Gabby-Paolucci commented 8 years ago

Sorry, should have included that. Here's the full Call Stack:

CDex.exe!_invoke_watson(const wchar_t * pszExpression, const wchar_t * pszFunction, const wchar_t * pszFile, unsigned int nLine, unsigned int pReserved) Line 132 C++ CDex.exe!_invalid_parameter(const wchar_t * pszExpression, const wchar_t * pszFunction, const wchar_t * pszFile, unsigned int nLine, unsigned int pReserved) Line 86 C++ CDex.exe!fputws(const wchar_t * string, _iobuf * stream) Line 48 C CDex.exe!CStdioFile::WriteString(const wchar_t * lpsz) Line 239 C++ CDex.exe!CLanguage::ReportChangedID(int nID, const CUString & strResource, const CUString & strEnglish, int nType) Line 154 C++ CDex.exe!CLanguage::GetString(const unsigned long nID) Line 265 C++ CDex.exe!CLanguage::ParseLanguageFile(const CUString & strFileName) Line 458 C++ CDex.exe!CLanguage::SetLanguage(const CUString & strLanguage) Line 586 C++ CDex.exe!CLanguage::Init(const CUString & strLanguageDir, const CUString & strLanguage) Line 561 C++ CDex.exe!CCDexApp::InitInstance() Line 380 C++ CDex.exe!AfxWinMain(HINSTANCE * hInstance, HINSTANCE * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 37 C++ CDex.exe!wWinMain(HINSTANCE * hInstance, HINSTANCE * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 26 C++

Looks like the CDex code that is causing the problem is line 380 in CDex.cpp: g_language.Init( g_config.GetAppPath(), g_config.GetLanguage() );

And the problem is with the call to g_config.GetLanguage().

Gabby-Paolucci commented 8 years ago

I found the issue. Line 139-140 in Language.cpp is trying to create a file in C:\temp, which the application doesn't have rights to do:

if ( cFile.Open(    _T( "c:\\temp\\missing.txt" ),
                            CFile::modeReadWrite | CFile::modeNoTruncate | CFile::modeCreate ) )

Changing this to a directory the application has access to resolves the issue. Any idea how to get this to use a temporary path based on the Windows environment? I'm trying but am having trouble getting it with the CStdioFile.Open.

Gabby-Paolucci commented 8 years ago

Thanks for fixing this issue!