|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
GIO# FileAdapter.Copy and FileAdapter.Move - System.NullReferenceException Issue with my installation?Hi,
I recently reinstalled my system and subsequently downloaded the latest SVN of gtk-sharp. I am curious if this is an error with my installation or with the library. Test case: using System; using GLib; namespace GIOTest { class MainClass { public static void Main(string[] args) { Gtk.Application.Init(); File file1 = FileFactory.NewFromCommandlineArg("~/Desktop/testfile"); File file2 = FileFactory.NewFromCommandlineArg("~/Desktop/testfilenew"); file1.Copy(file2,FileCopyFlags.None,null,null); } } } Steps to replicate:
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at GLib.FileAdapter.Copy (File destination, FileCopyFlags flags, GLib.Cancellable cancellable, GLib.FileProgressCallback progress_callback) [0x0000e] in /home/dan/gtk-sharp/gio/generated/FileAdapter.cs:1742 at GIOTest.MainClass.Main (System.String[] args) [0x0001b] in /home/dan/Projects/GIOTest/GIOTest/Main.cs:15 The application was terminated by a signal: SIGHUP If I run this I recieve a System.NullReferenceException. I know the File objects themselves are not null as they print out fine with Console.WriteLine and I can access the Parent property without any problem. It would seem that it is just the FileAdapter.Copy and FileAdapter.Move methods that error on me. I have attempted to create a Cancellable object and an empty FileProgressCallback function to pass to the method in case that was the cause, with no effect. I would appreciate a second opinion if possible. Thanks! -- Dan _______________________________________________ Gtk-sharp-list maillist - Gtk-sharp-list@... http://lists.ximian.com/mailman/listinfo/gtk-sharp-list |
|
|
Re: GIO# FileAdapter.Copy and FileAdapter.Move - System.NullReferenceException Issue with my installation?Hi,
Sorry about replying to myself, but I have a little bit more information. I installed gtk-sharp from SVN on another computer I own and it had the same issue. Unfortunately this computer is almost identical in configuration to my main computer. I was able to work around the issue by calling System.IO.File.Move(file1.Path,file2.Path); and the file was moved successfully. While this does work it will only work on remote files if we go through the FUSE layer which is less than desireable. Of course I appreciate any thoughts from others in trying to track this down. -- Dan On Sat, Jul 18, 2009 at 11:47 AM, Dan Saul <daniel.saul@...> wrote: Hi, _______________________________________________ Gtk-sharp-list maillist - Gtk-sharp-list@... http://lists.ximian.com/mailman/listinfo/gtk-sharp-list |
|
|
Re: GIO# FileAdapter.Copy and FileAdapter.Move - System.NullReferenceException Issue with my installation?Hi Dan,
sorry for the late reply. Could you file a bug report at www.mono-project.com/Bugs to allow us to track the issue when we get to it? Christian Dan Saul wrote: > Hi, > > I recently reinstalled my system and subsequently downloaded the > latest SVN of gtk-sharp. I am curious if this is an error with my > installation or with the library. > > Test case: > > using System; > using GLib; > > namespace GIOTest > { > class MainClass > { > public static void Main(string[] args) > { > Gtk.Application.Init(); > > File file1 = > FileFactory.NewFromCommandlineArg("~/Desktop/testfile"); > File file2 = > FileFactory.NewFromCommandlineArg("~/Desktop/testfilenew"); > > file1.Copy(file2,FileCopyFlags.None,null,null); > } > } > } > > Steps to replicate: > > 1. Create a file on your desktop called "testfile". > 2. Run the program. > > Backtrace: > > Unhandled Exception: System.NullReferenceException: Object reference > not set to an instance of an object > at GLib.FileAdapter.Copy (File destination, FileCopyFlags flags, > GLib.Cancellable cancellable, GLib.FileProgressCallback > progress_callback) [0x0000e] in > /home/dan/gtk-sharp/gio/generated/FileAdapter.cs:1742 > at GIOTest.MainClass.Main (System.String[] args) [0x0001b] in > /home/dan/Projects/GIOTest/GIOTest/Main.cs:15 > > The application was terminated by a signal: SIGHUP > > If I run this I recieve a System.NullReferenceException. I know the > File objects themselves are not null as they print out fine with > Console.WriteLine and I can access the Parent property without any > problem. It would seem that it is just the FileAdapter.Copy and > FileAdapter.Move methods that error on me. I have attempted to create > a Cancellable object and an empty FileProgressCallback function to > pass to the method in case that was the cause, with no effect. I would > appreciate a second opinion if possible. Thanks! > > -- Dan > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list@... > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > _______________________________________________ Gtk-sharp-list maillist - Gtk-sharp-list@... http://lists.ximian.com/mailman/listinfo/gtk-sharp-list |
|
|
Re: GIO# FileAdapter.Copy and FileAdapter.Move - System.NullReferenceException Issue with my installation?Hi Christian,
Certainly, I have created the bug report, you can view it at https://bugzilla.novell.com/show_bug.cgi?id=527478 . Thank you for your time. Dan On Thu, Jul 30, 2009 at 2:00 PM, Christian Hoff <christian_hoff@...> wrote: Hi Dan, _______________________________________________ Gtk-sharp-list maillist - Gtk-sharp-list@... http://lists.ximian.com/mailman/listinfo/gtk-sharp-list |
| Free embeddable forum powered by Nabble | Forum Help |