Perforce Edit says "%1 is not a valid Win32 application"

I have a Perforce edit action that works fine on many VMs, but our remote developer (over VPN) gets a strange error when the action runs. FB says:
   |— Failed to execute program. Error: %1 is not a valid Win32 application
   |— Action Failed
   |— c:\program files\perforce\p4.exe returned : -998

The Perforce GUIs work fine on his virtual machine, and a similar VM works fine on the local network. “p4 get” and “p4 edit” work with simple test files, so I wonder if perhaps you’re dropping a quote or something interesting? I know we have spaces in the filespec: //depot/Code/Trunk/Projects/~FinalBuilder Scripts/… (adding quotes makes no difference).

Note that we’re running a geritric Perforce server because we’re too cheap to upgrade. So we can’t submit from FB to Perforce, for example, but edit works at least locally.

Hi Moz,

If your remote developer goes to Tools -> Options -> Version Control Systems -> Perforce, is the path to P4.EXE set properly?

I don’t know why it would appear as “%1”, but each machine will need the path to P4.EXE set before it can be used (the error should actually be more specific.)

Regards,

Angus

Sorry for the delayed response, I’ve been waiting for the remote developer to come down here and hassle me about it. Now I have a copy of his VM and I can play with it.

Yes, the path is set correctly, and what we’re seeing seems to be the result of running P4.exe with command line options that it doesn’t like. The behaviour is identical running his VM locally (no VPN).I’m experiementing at the moment to see what differences there are between the two VMs.

OK, Perforce itself works fine in that VM (as I’d expect, the developer uses it all the time), the Delphi plugin also works fine, it’s only FinalBuilder that’s struggling. Most confusing.

Hi Moz Moz,

There aren’t quotes around the path to p4.exe in the options, are there?

The error is a Windows error (coming back from CreateProcess), not a Perforce error, so it either means

a) There’s a serious error in the command line we’re generating
or
b) The file which is pointed to as p4.exe isn’t a valid Win32 PE executable.

Sounds like it’s almost certainly the former. Could you please send a couple of files to us via ‘support at finalbuilder.com’?

- The project file (.fbp5 or .fbz5)
- The FinalBuilder5.ini file for the machine, which can be found under C:\Documents and Settings\All Users\Application Data\VSoft\FinalBuilder5 (or similar)

Thanks very much.

Regards,

Angus

No quotes in the p4.exe location in FB settings, it’s literally identical to one that does actually work. I’ve emailed you.

thanks
Moz

(BTW, I’m Moz Moz because your signup says “first name” then “last name” and with only one name… first=last=middle :)  )

Hi Moz,

Sorry, I typed “Moz Moz” without even thinking. I guess we use a fairly ethnocentric web site module. :).

The email hasn’t shown up yet, but we have some fancy “graylisting” spam software so sometimes they get delayed for a while.

- Angus

OK, the solution turned out to be using a shorter list of files to edit. Splitting it into two actions solved the problem.

edit: For a while anyway. Now it's back even for empty filespecs.

edit again: Angus has sent me a new build that fixes the problem.