This post is more than 5 years old
8 Posts
0
5989
Error when use .NET wrapper for Centera
Hi all,
I got the following run time error after using FPSDK.dll(derived from .NET wrapper for Centera) in my project:
"An exception of type 'System.AccessViolationException' occurred in FPSDK.DLL but was not handled in user code
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
I failed at this line:
FPPool pool = new FPPool(connstr);
I am using VS2005, the version of .NET wrapper for Centera is .631 the version of Centera SDK I use is 3.2.661
Anyone knows how to solve it?
Thanks
gstuartemc
417 Posts
0
March 13th, 2009 03:00
You are correct regarding the missing keyfile.snk at that location, this was mistakenly moved from the most recent distribution. Your other point is not correct - it is perfectly OK to use ":" rather than "=" as both work.
I will ask you again - have you compiled and run all the sample programs taht come with the ditribution? What are the results?
If not, then run the sample in debug mode and tell me when you are getting the error.
What platform are you running on? The SDK is not supported on Vista or Windows Server 2008, it must be run on Windows 2000, XP or Server 2003.
gstuartemc
417 Posts
1
March 5th, 2009 02:00
When you build the wrapper, there is a post build script that is run automatically. This patches the IL due to issues with callback calling conventions. If this script does not run properly then you can get this error when you use the DLL.
The script requires that you have Perl installed and available to run on your PATH. Please ensure that is the case.
Johnz02
8 Posts
0
March 8th, 2009 18:00
Hi gstuartemc,
Thanks for your help but It's still not working.
it gave me another error after I installed activePerl 5.10 and rebuild:
Kind Regards
gstuartemc
417 Posts
0
March 9th, 2009 04:00
Based on the error you are seeing, you have either not built a Debug version or you have not copied the DLL that was built to the correct location. Your .NET environment appears to have picked up an older version of the FPSDK.DLL, hence the message.
Johnz02
8 Posts
0
March 9th, 2009 18:00
I built the debug version and I followed all the steps in this article:
http://www.codeproject.com/KB/winsdk/CenteraStorageAppliances.aspx
This is a list of files under my new project's bin\debug folder
gstuartemc
417 Posts
0
March 10th, 2009 02:00
Are you able to compile and run any of the projects in the Samples.sln that comes bundled with the wrapper code? This should be the starting point for everybody and verifies that you have correctly installed and built the wrapper.
Are you still seeing the same error after you have built and deployed it?
IS your reference to FPSDK.DLL pointing to the correct version i.e. the one you just built?
What are the Date Modified timestamps on the FLSDK.DLL and FPPool.cs - the error message suggests that you have modified this or are picking up an incorrect (old) version of the DLL.
Are you able to run in Release mode rather than Debug? And what happens if you just answer "yes" to the question in the dialogue box?
Is there no-one in your company that knows more about .NET that could help you look at the problems with your specific installation? These forums are intended for topics that apply to anyone using the wrapper and you clearly have a local installation issue.
Johnz02
8 Posts
0
March 12th, 2009 22:00
Original
ildasm FPSDK.dll /out:FPSDK.il1 /all /nobar /source /linenum
perl ..\..\patchD.pl FPSDK.il2
ilasm FPSDK.il2 /dll /quiet /debug /key: ..\..\..\keyfile.snk
copy FPSDK.dll ..\..\..
copy FPSDK.pdb ..\..\..
Modified
ildasm FPSDK.dll /out=.\FPSDK.il1 /all /nobar /source /linenum
perl ..\..\patchD.pl <.\FPSDK.il1 >.\FPSDK.il2
ilasm .\FPSDK.il2 /dll /quiet /debug /key:..\..\keyfile.snk
copy FPSDK.dll ..\..\..
copy FPSDK.pdb ..\..\..
Comments
: is not a correct syntax should be =
there is no keyfile.snk under path ..\..\..\ should be ..\..\
I also did the above codes manually in cmd console step by step so the final dll I got can't be wrong.
I then complie and run the projects in Samples.sln but I still got System.AccessViolationException after all these efforts.
I doubted that there are some errors in the downloaded file ?
Regards
Johnz02
8 Posts
0
March 17th, 2009 18:00
Ah, I've been testing this on a Windows Server 2008 machine!
I did the same thing in Windows Server 2003 and it works well
Thanks