Vault API sample code problem

Vault API sample code problem

Anonymous
Not applicable
1,081 Views
4 Replies
Message 1 of 5

Vault API sample code problem

Anonymous
Not applicable

Something strange happened yesterday and I can't find the solution - I was using the Item Editor sample code and everything worked fine at first. For no apparent reason it stopped working, when I try to create an item it gives a "Promote Error". When I debug I get an error at the promote files line saying "there is no source code at the current location" and then the promote error followed by error code 155.

 

I did not modify the sample code in any way, and I have re-installed the SDK to make sure it was clean. I also applied the API patch. I am assuming that it is a VS / config issue and I have googled it but with no success. My setup is Vault Pro 2012 running on Win 7 64bit (server & client running on dev machine) / VS 2008 Pro. Can anyone help please?

 

 

0 Likes
1,082 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

Update - I tried removing references and adding them back in. If I use the Autodesk.Connectivity.Extensibility.dll from the Client explorer folder I get a different error - the source file is different from when the module was built - and when I continue it jumps into event handler code from the Restrict Operations sample (which I had used previously). It seems like the dll has been modified, is this possible?

 

I still have no idea why the code suddenly stopped working though, nothing changed on the PC and I did not do anything with the Restrict Operations sample at that time. I am new to .net and maybe this is a basic newbie blunder, but any help or guidance would be very appreciated.

0 Likes
Message 3 of 5

Redmond.D
Autodesk
Autodesk

The error "there is no source code at the current location" could mean that the error is originating outside your source code.  Such as a referenced DLL like Autodesk.Connectivity.WebServices.dll.

It could also means that your source code does not matched the compiled code.  If that's the problem, a rebuild should fix it.

It could also mean that you are trying to debug a Release build.  If that's the problem, switch to the Debug configuration and re-run.

 

According to the API documentation, error 155 means IllegalNullParam.  That means that null was passed in incorrectly to an API function.

 

If you are confused about altered DLLs you can go to Windows Explorer and view the properties on the DLL.  The version number and create date should tell you if things have changed.

 

It sounds like RestrictOperations is interfering with things.  I suggest un-deploying that app so that you can remove that as a possible source of errors.



Doug Redmond
Software Engineer
Autodesk, Inc.

0 Likes
Message 4 of 5

Anonymous
Not applicable

Thanks for the reply Doug, I have tried re-building but that did not solve it.

 

This morning the standard code was working again, nothing changed - just decided it would run again. So I made a modification (added a loop to step through a selection of files) and ran it again - the error returned! The standard code fails with 'promote error' and code 155. Re-booting / re-building does not clear it.

 

So it is something in my modified code that is upsetting things, but everything seems to be fine up to the promote command. I am passing a valid ID number but cannot figure out why the promote is failing or what is preventing normal operation after the error ocurs.

 

I will remove Restrict Operations and see if that helps the situation.

 

Thanks

 

0 Likes
Message 5 of 5

maxstels
Contributor
Contributor

I also this problem after UpdateItemsFromFiles API function ...

0 Likes