WebKit抛出异常

时间:2012-07-31 11:57:52

标签: c# exception-handling mono webkit monodevelop

我在Ubuntu 12.04中安装了MonoDevelop和CLI WebKit绑定,并且能够在我的参考资料中添加webkit-sharp软件包。但是我运行的程序窗口没有显示,dubugger显示:

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for WebKit.WebView ---> System.DllNotFoundException: webkit-1.0.so.2
at (wrapper managed-to-native) WebKit.Download:webkit_download_get_type ()
at WebKit.Download.get_GType () [0x00000] in <filename unknown>:0 
at GtkSharp.WebkitSharp.ObjectManager.Initialize () [0x00000] in <filename unknown>:0 
at WebKit.WebView..cctor () [0x00000] in <filename unknown>:0 
--- End of inner exception stack trace ---
at MainWindow..ctor () [0x00000] in <filename unknown>:0 
at PePaDa.MainClass.Main (System.String[] args) [0x00005] in /home/aditya/Projects/PePaDa/PePaDa/Main.cs:11 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for WebKit.WebView ---> System.DllNotFoundException: webkit-1.0.so.2
at (wrapper managed-to-native) WebKit.Download:webkit_download_get_type ()
at WebKit.Download.get_GType () [0x00000] in <filename unknown>:0 
at GtkSharp.WebkitSharp.ObjectManager.Initialize () [0x00000] in <filename unknown>:0 
at WebKit.WebView..cctor () [0x00000] in <filename unknown>:0 
--- End of inner exception stack trace ---
at MainWindow..ctor () [0x00000] in <filename unknown>:0 
at PePaDa.MainClass.Main (System.String[] args) [0x00005] in /home/aditya/Projects/PePaDa/PePaDa/Main.cs:11 
The application was terminated by a signal: SIGHUP

我试过了:

sudo link /usr/lib/libwebkitgtk-1.0.so.0 /usr/lib/webkit-1.0.so.2

它仍然无效。现在它给了我:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at MainWindow..ctor () [0x00022] in /home/aditya/Projects/PePaDa/PePaDa/MainWindow.cs:12 
at PePaDa.MainClass.Main (System.String[] args) [0x00005] in /home/aditya/Projects/PePaDa/PePaDa/Main.cs:11 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at MainWindow..ctor () [0x00022] in /home/aditya/Projects/PePaDa/PePaDa/MainWindow.cs:12 
at PePaDa.MainClass.Main (System.String[] args) [0x00005] in /home/aditya/Projects/PePaDa/PePaDa/Main.cs:11 
The application was terminated by a signal: SIGHUP

我做错了什么?

另外我不介意使用gecko-sharp,但我找不到二进制或源代码形式。

0 个答案:

没有答案