[redland-dev] Problem using serializers in c#/Visual Studio 2005

Dan Pisarski DanP at libraryvideo.com
Wed Jul 26 01:17:24 UTC 2006


Hi everyone,
 =

I am new to the list and thank you for your help. I am working with using t=
he Redland library via the C# interface in Visual Studio 2005, and having a=
 problem when trying to use the serializer object to generate a XML file fr=
om my model. Note I am working with my own compile of the C# interface due =
to the signature error I believe previously discussed on this list.  The on=
ly modifcation I made was to remove the assembly signing.
 =

The error inside the C# library occurs on the following line:
  =


int ret =3D librdf_serializer_serialize_model_to_file (handle, iname, base_=
uri.Handle, model.Handle);

The following error is thrown:

{"Object reference not set to an instance of an object."}

Seemingly on the "model" object - which is strange since it is passed into =
the function about 3 lines above, and while viewing the object in the dubug=
ger it is not null and shows a size of 2 which matches my test model - whic=
h consists of 2 statements.

Here is the complete stack trace:

at Redland.Serializer.SerializeModel(String name, Uri base_uri, Model model=
) in C:\\Documents and Settings\\Daniel Pisarski\\My Documents\\Visual Stud=
io 2005\\Projects\\RedlandCshAssembly\\redland-bindings-1.0.4.1\\csharp\\Se=
rializer.cs:line 95

at RedlandPoC.Form1.button1_Click(Object sender, EventArgs e) in C:\\Docume=
nts and Settings\\Daniel Pisarski\\My Documents\\Visual Studio 2005\\Projec=
ts\\RedlandPoC\\RedlandPoC\\Form1.cs:line 52

at System.Windows.Forms.Control.OnClick(EventArgs e)\r\n   at System.Window=
s.Forms.Button.OnClick(EventArgs e)\r\n   at System.Windows.Forms.Button.On=
MouseUp(MouseEventArgs mevent)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, =
Int32 clicks)\r\n   at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ButtonBase.WndProc(Message& m)

at System.Windows.Forms.Button.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 =
msg, IntPtr wparam, IntPtr lparam)

at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.U=
nsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentI=
D, Int32 reason, Int32 pvLoopData)

at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32=
 reason, ApplicationContext context)

at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reas=
on, ApplicationContext context)

at System.Windows.Forms.Application.Run(Form mainForm)

at RedlandPoC.Program.Main() in C:\\Documents and Settings\\Daniel Pisarski=
\\My Documents\\Visual Studio 2005\\Projects\\RedlandPoC\\RedlandPoC\\Progr=
am.cs:line 17

at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)

at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblyS=
ecurity, String[] args)

at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,=
 ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart()

 =

I apperciate any insight anyone can lend into regarding this problem.
 =

Dan Pisarski
Director of Digital Technology
Library Video Company
http://www.libraryvideo.com
 =

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ender/pipermail/redland-dev/attachments/20060725/c36fc755/attac=
hment.htm


More information about the redland-dev mailing list