Jump to content


P4api.Net Exception with p4command

.net p4command exception

  • Please log in to reply
3 replies to this topic

#1 christ.sass

christ.sass

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 07 May 2015 - 08:39 PM

I get the following exception while trying to use P4Command:
Exception Detected in function CallInfoResultsCallbackFn: EXCEPTION_ACCESS_VIOLATION
with the following command line:
diff d:\\project\\file.txt

Somewhere deep in the exception, I can see the first line of the result, but not what I'm looking for which is the diff lines.
If I screw up the command like adding wrong options like -o I get a proper error message, so the command really seems to be executed, but I can't get the results.


Also, I don't understand why diff2 is already available but not diff.
And FileMetaData is supposed to be implicitly castable to FileSpec, but why not a full list of it since there are a lot of functions requesting IList<FileSpec> only.

Thanks

#2 shalliday

shalliday

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationElectronic Arts Canada

Posted 13 August 2015 - 04:03 PM

We are seeing almost the same thing, except it is with the tagged output function (same EXCEPTION_ACCESS_VIOLATION).  This is in 2015.1.  It seems to be related to syncing a file that is > 400MB.  It happens in this function:
void P4BridgeServer::Run_int(P4Connection* client, const char *cmd, P4BridgeClient* ui)
{
__try
{
client->Run(cmd, ui );
}
__except (HandleException(GetExceptionCode(), GetExceptionInformation()))
{
if (ui)
{
ui->HandleError( E_FATAL, 0, Exceptionerror->Text());
DELETE_OBJECT(Exceptionerror);
}
}
}

#3 shalliday

shalliday

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationElectronic Arts Canada

Posted 13 August 2015 - 04:11 PM

I think the exception source of "CallTaggedOutputCallbackFn" is a red-herring, after reading the code in P4BridgeServer.cpp.  It just happens to be the last thing set, but the Run_int method does not call SetExceptionSource, so we get whatever was last set.

#4 shalliday

shalliday

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationElectronic Arts Canada

Posted 13 August 2015 - 04:50 PM

Got this callstack:

p4bridge.dll!clientWriteFile(class Client *,class Error *...
   p4bridge.dll!clientWriteFile(class Client *,class Error *)    C++
   p4bridge.dll!Rpc::DispatchOne(class RpcDispatcher *)    C++
   p4bridge.dll!Rpc::Dispatch(enum Rpc::DispatchFlag,class RpcDispatcher *) C++
   p4bridge.dll!Client::WaitTag(class ClientUser *) C++
   p4bridge.dll!Client::RunTag(char const *,class ClientUser *)     C++
   p4bridge.dll!Client::Run(char const *,class ClientUser *) C++
>   p4bridge.dll!P4BridgeServer::Run_int(P4Connection * client, const char * cmd, P4BridgeClient * ui) Line 747   C++
   p4bridge.dll!P4BridgeServer::run_command(const char * cmd, int cmdId, int tagged, char * * args, int argc) Line 996    C++
   p4bridge.dll!RunCommand(P4BridgeServer * pServer, const char * cmd, int cmdId, int tagged, char * * args, int argc) Line 1100  C++
   000007fe98fff114() Unknown
   000007fe98ffe7bc()     Unknown
   mscorlib.ni.dll!000007fef6d5d0b5()   Unknown





Also tagged with one or more of these keywords: .net, p4command, exception

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users