** (GRunner:30530): WARNING **: The following assembly referenced from /home/mnemo/src/grunner/GRunner/bin/Debug/GRunner.exe could not be loaded:
Assembly: gnomedesktop-sharp (assemblyref_index=9)
Version: 2.20.0.0
Public Key: 35e10195dab3c99f
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/mnemo/src/grunner/GRunner/bin/Debug/).
** (GRunner:30530): WARNING **: Could not load file or assembly ‘gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f’ or one of its dependencies.
** (GRunner:30530): WARNING **: Missing method .ctor in assembly /home/mnemo/src/grunner/GRunner/bin/Debug/GRunner.exe, type Gnome.DesktopItem
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f’ or one of its dependencies.
File name: ‘gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f’
at GRunner.SystemUtils..ctor () [0x00000]
at GRunner.DBusController.Init () [0x00000]
at (wrapper remoting-invoke-with-check) GRunner.DBusController:Init ()
at GRunner.MainClass.Main (System.String[] args) [0x00000]
mnemo@kingfish:~/src/grunner$
then after some random guesswork and search apt-cache for a while I tried:
sudo apt-get install gnome-desktop-sharp2
but even after that I crashes on startup:
mnemo@kingfish:~/src/grunner/GRunner/bin/Debug$ ./GRunner.exe
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at GRunner.Item.parseExec (System.String exec) [0x00000]
at GRunner.Item.get_Exec () [0x00000]
at GRunner.SystemUtils.CreateApplicationsList () [0x00000]
at GRunner.SystemUtils..ctor () [0x00000]
at GRunner.DBusController.Init () [0x00000]
at (wrapper remoting-invoke-with-check) GRunner.DBusController:Init ()
at GRunner.MainClass.Main (System.String[] args) [0x00000]
I have both of those packages installed and I still get the error. If I investigate deeper, the problem is that the “exec” variable in parseExec() is null when it’s called from get_Exec() on startup.
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at GRunner.Item.parseExec (System.String exec) [0x00016] in /home/mnemo/src/grunner/GRunner/Base/Item.cs:114
at GRunner.Item.get_Exec () [0x00000] in /home/mnemo/src/grunner/GRunner/Base/Item.cs:68
at GRunner.SystemUtils.CreateApplicationsList () [0x000bf] in /home/mnemo/src/grunner/GRunner/Utils/SystemUtils.cs:143
at GRunner.SystemUtils..ctor () [0x00006] in /home/mnemo/src/grunner/GRunner/Utils/SystemUtils.cs:39
at GRunner.DBusController.Init () [0x00000] in /home/mnemo/src/grunner/GRunner/gtk-gui/generated.cs:1
at (wrapper remoting-invoke-with-check) GRunner.DBusController:Init ()
at GRunner.MainClass.Main (System.String[] args) [0x00023] in /home/mnemo/src/grunner/GRunner/Main.cs:26
I found out why your program crashes on my machine. It’s because the program cannot handle items on the desktop which have a pipe (|) in the caption text or maybe in the filename.
Then it prints this:
file==/home/mnemo/Desktop/a|b.desktop
GLib.GException: Error cannot find file id ‘a|b.desktop’
di2 created
file==a|b.desktop
exec is null
1. surf to: http://channel9.msdn.com/posts/Charles/IE8-Search/
2. drag the tiny icon just left of the URL bar onto your linux desktop (this will create a new .desktop file which has a pipe in both caption and filename)
3. run grunner.exe
4. crash
Makes me _very_ curious, but needs more polish / needs to be more user friendly. This was my experience:
fetched lp:grunner, open MD and compiled it. Ran the generated exe and got this error:
mnemo@kingfish:~/src/grunner$ GRunner/bin/Debug/GRunner.exe
** (GRunner:30530): WARNING **: The following assembly referenced from /home/mnemo/src/grunner/GRunner/bin/Debug/GRunner.exe could not be loaded:
Assembly: gnomedesktop-sharp (assemblyref_index=9)
Version: 2.20.0.0
Public Key: 35e10195dab3c99f
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/mnemo/src/grunner/GRunner/bin/Debug/).
** (GRunner:30530): WARNING **: Could not load file or assembly ‘gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f’ or one of its dependencies.
** (GRunner:30530): WARNING **: Missing method .ctor in assembly /home/mnemo/src/grunner/GRunner/bin/Debug/GRunner.exe, type Gnome.DesktopItem
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f’ or one of its dependencies.
File name: ‘gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f’
at GRunner.SystemUtils..ctor () [0x00000]
at GRunner.DBusController.Init () [0x00000]
at (wrapper remoting-invoke-with-check) GRunner.DBusController:Init ()
at GRunner.MainClass.Main (System.String[] args) [0x00000]
mnemo@kingfish:~/src/grunner$
then after some random guesswork and search apt-cache for a while I tried:
sudo apt-get install gnome-desktop-sharp2
but even after that I crashes on startup:
mnemo@kingfish:~/src/grunner/GRunner/bin/Debug$ ./GRunner.exe
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at GRunner.Item.parseExec (System.String exec) [0x00000]
at GRunner.Item.get_Exec () [0x00000]
at GRunner.SystemUtils.CreateApplicationsList () [0x00000]
at GRunner.SystemUtils..ctor () [0x00000]
at GRunner.DBusController.Init () [0x00000]
at (wrapper remoting-invoke-with-check) GRunner.DBusController:Init ()
at GRunner.MainClass.Main (System.String[] args) [0x00000]
At this point I just gave up.
Tell me, what does the grunner app do?
GRunner is in developing 🙂
It’s normal that there are some problems. It’s still a prototipe for now.
Anyway.. it seems that you did not install some required packages, try to install:
gnome-desktop-sharp2 libndesk-dbus1.0-cil
Ah, remember to kill any instance of GRunner (it works on dbus!).
This should replace the GNOME Run Dialog ^^, a nice middle ground between it and the heavy GNOME-Do.
I have both of those packages installed and I still get the error. If I investigate deeper, the problem is that the “exec” variable in parseExec() is null when it’s called from get_Exec() on startup.
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at GRunner.Item.parseExec (System.String exec) [0x00016] in /home/mnemo/src/grunner/GRunner/Base/Item.cs:114
at GRunner.Item.get_Exec () [0x00000] in /home/mnemo/src/grunner/GRunner/Base/Item.cs:68
at GRunner.SystemUtils.CreateApplicationsList () [0x000bf] in /home/mnemo/src/grunner/GRunner/Utils/SystemUtils.cs:143
at GRunner.SystemUtils..ctor () [0x00006] in /home/mnemo/src/grunner/GRunner/Utils/SystemUtils.cs:39
at GRunner.DBusController.Init () [0x00000] in /home/mnemo/src/grunner/GRunner/gtk-gui/generated.cs:1
at (wrapper remoting-invoke-with-check) GRunner.DBusController:Init ()
at GRunner.MainClass.Main (System.String[] args) [0x00023] in /home/mnemo/src/grunner/GRunner/Main.cs:26
It seems that you have some wrong files.desktop.
Try to investigate, in file Utils/SystemUtils.cs try to add this line at 149:
Pingback: GRunner.exe, clone di KRunner per GNOME « pollycoke :)
“GRUNNUR”
wow, it looks gorgeous!!
krunner+mono=grunner
Gee, I wonder where I’ve seen that before…
Hey Leo,
I found out why your program crashes on my machine. It’s because the program cannot handle items on the desktop which have a pipe (|) in the caption text or maybe in the filename.
If I do this:
+++ GRunner/Utils/SystemUtils.cs 2009-03-01 19:18:04 +0000
@@ -122,14 +122,20 @@
foreach (string file in Directory.GetFiles(dir,”*.desktop”))
{
+ Console.WriteLine(“file==” + file);
string fileName = file.Substring(dir.Length+1);
try{
– item = new Item(new DesktopItem(fileName,DesktopItemLoadFlags.NoTranslations));
+ DesktopItem di1 = new DesktopItem(fileName,DesktopItemLoadFlags.NoTranslations);
+ Console.WriteLine(“di1 created”);
+ item = new Item(di1);
}
– catch {
+ catch (Exception ex) {
+ Console.WriteLine(ex.GetType() + “: ” + ex.Message);
try
– {
– item = new Item(DesktopItem.NewFromFile(file,DesktopItemLoadFlags.NoTranslations));
+ {
+ DesktopItem di2 = DesktopItem.NewFromFile(file,DesktopItemLoadFlags.NoTranslations);
+ Console.WriteLine (“di2 created”);
+ item = new Item(di2);
}
catch
{
@@ -140,6 +146,7 @@
}
if(item.Exist)
{
+ Console.WriteLine(“file==” + fileName);
if (dict.ContainsKey(item.Exec))
{
if (dict[item.Exec].IsMissingIcon)
Then it prints this:
file==/home/mnemo/Desktop/a|b.desktop
GLib.GException: Error cannot find file id ‘a|b.desktop’
di2 created
file==a|b.desktop
exec is null
To repro the crash do this:
1. surf to: http://channel9.msdn.com/posts/Charles/IE8-Search/
2. drag the tiny icon just left of the URL bar onto your linux desktop (this will create a new .desktop file which has a pipe in both caption and filename)
3. run grunner.exe
4. crash
Thanks for the report…
I’ve solved problem in bzr…
GRunner will exclude every desktop file that does not present “Exec” string (that is not an application), at least for now.
I like your style (video + simplistic instructions to get it for the technical users :).
How will this fare with Gnome DO?
What do you mean? 😀
Thanks for the quick fix Leo. I synced bzr now and it works!
Pingback: Diario di bordo » Spreco di risorse o semplice idiozia?