views:

1229

answers:

3

I'm trying to implement some hooks, both pre and post fail however. I get the same error message for both when I try to commit:

'*-commit' hook failed (did not exit cleanly: apr_exit_why_e was 2, exitcode was
-1073741515).   with no output.

Exitcode -1073741515 looks to be an odd one, and a quick bit of google-fu got me this:

Treated as a hex DWORD, the error code you are seeing is 0xC0000135.

That is Sev=11, C=0, R=0, Facility=0, Code=0x0135.

The value 0xC0000135 can be found in NtStatus.h with the following definition

//
// MessageId: STATUS_DLL_NOT_FOUND
//
// MessageText:
//
//  {Unable To Locate Component}
//  This application has failed to start because %hs was not found.
// Re-installing the application may fix this problem.
//
#define STATUS_DLL_NOT_FOUND             ((NTSTATUS)0xC0000135L)

Ok, dll not found, shouldn't be too difficult right? I have a VM with svn on it that's being peaceful with these hooks. So I run Filemon.exe and Depends.exe on both machines.

I'm still slogging through the filemon logs for both servers, and depends isn't giving me any unique problems with any executable that I can think of being hit by a Commit Hook.

I decided to take a quick peek in the event logs, and Oh Boy!

'pre-commit' hook failed (did not exit cleanly: apr_exit_why_e was 2, exitcode was -1073741515). with no output. [409, #165001]

Extra smidgens of information, this [409, #165001] is all over google, but I'm not really picking up anything helpful.

The hook is explicitly calling an executable with three parameters.

C:\SubversionNotify\SubversionNotify.exe %1 %2 -pre

I've even tried to use variables as well.

SET REPOS=%1
SET REV=%2
C:\SubversionNotify\SubversionNotify.exe %REPOS% %REV% -pre

Looking in the filemon logs shows me that it never makes it to SubversionNotify.exe

It's getting to the point where I can't really spend much more time trying to implement this, help me SO, you're my only hope.

Server Specs:

Windows XP, running VisualSVN Server, latest release.

Edit: It seems as though SubversionNotify is throwing the exception, back to Depends.exe to check to see what dll is failing.

Error is as follows:

The application failed to initialize properly (0xc0000135).

That 0xC0000135 was seen earlier, dll hunt ahoy!

+2  A: 

Normally the problem with committ hooks is that there is ABSOLUTELY no environment, so all references have to be painfully explicit. I usually end up making a small batch file that changes directory to the proper directory and executes the command.

Edit:

TRY CHANGING DIRECTORY TO C::\SubversionNotify

Maybe you are missing some runtime dll that is required to run the program. Remember: There is NO path. You can simulate this by setting path to NOTHING in a command line window. set PATH=.

Verify that simple commands like notpad do not work. Does your exe work then? Find out where the missing dlls are and build a path at the start of the batch file.

krosenvold
The hook is explicitly calling an executable with three parameters.C:\SubversionNotify\SubversionNotify.exe %1 %2 -preThe question has been edited to reflect this.
Slipfish
Changing directory to C::\SubversionNotify nets me:'Commit blocked by pre-commit hook (exit code 1) with output:The filename, directory name, or volume label syntax is incorrect
Slipfish
SubversionNotify is in fact throwing the exception, missing some dll, just need to find out what one. Luckily I have a VM that seems to work with SubversionNotify. Compare and contrast time.Thanks for the help!
Slipfish
+1  A: 

I'd thought I'd share the Solution here, as I got a great laugh out of it.

The SubversionNotify was written in .NET.
The Server did not have the .NET Framework installed.
The VM did.

I am wearing a dunce cap now.

Slipfish
A: 

Thanks for posting your answer. If you didn't I would have spent a lot more time trying to run this down and feeling even more stupid than I do now. Just blew out a box and did an install of VisualSVN and SubversionNotify and couldn't figure out why it wasn't working.

Dan Kim