I want to test an example of an application of a simple browser. Here is the source code:
using System;
using Gtk;
using Gecko;
class Browser{
public static void Main(string[] args)
{
Application.Init();
Browser b=new Browser();
Application.Run();
}
Gecko.WebControl webctl;
Gtk.Entry urlbox;
static string greeting =
"<html><head><title>My Browser</title></head>" +
"<body><h1>Hello!</h1><p>Type a URL in the box " +
"and press enter.</p></body></html>";
public Browser ( )
{
Window w = new Window ("Browser test");
VBox v = new VBox ( );
w.Add (v);
urlbox=new Entry();
urlbox.Activated += Load_Url;
webctl= new WebControl();
webctl.SetSizeRequest(450,350);
v.PackStart(urlbox,false,false,0);
v.PackEnd(webctl,true,true,0);
w.ShowAll();
w.DeleteEvent +=Window_Delete;
webctl.RenderData(greeting,"file://tmp","text/html");
}
void Load_Url(object o, EventArgs args)
{
webctl.LoadUrl(urlbox.Text);
}
void Window_Delete(object o, DeleteEventArgs args)
{
Application.Quit();
}
}
There is no error of compilation. But when I want to execute the application, there is the following error:
Stacktrace:
at (wrapper managed-to-native) Gecko.WebControl.gtk_moz_embed_render_data (intptr,intptr,uint,intptr,intptr) <0x00004>
at (wrapper managed-to-native) Gecko.WebControl.gtk_moz_embed_render_data (intptr,intptr,uint,intptr,intptr) <0xffffffff>
at Gecko.WebControl.RenderData (string,string,string) <0x00079>
at Browser..ctor () [0x00096] in /home/raemyn04/Browser/Browser/Main.cs:37
at Browser.Main (string[]) [0x00005] in /home/raemyn04/Browser/Browser/Main.cs:9
at (wrapper runtime-invoke) Browser.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
/usr/bin/mono [0x81796be]
/usr/bin/mono [0x807d2db]
[0xb7fcb40c]
/usr/lib/xulrunner-1.9/libxul.so [0x27a1552]
/usr/lib/xulrunner-1.9/libxul.so [0x217ef92]
/usr/lib/xulrunner-1.9/libxul.so(gtk_moz_embed_render_data+0x8d) [0x217d382]
[0xb77de7a5]
[0xb77de742]
[0xb77daef6]
[0xb77d22f7]
[0xb77d21c3]
/usr/bin/mono(mono_runtime_exec_main+0xb6) [0x809a746]
/usr/bin/mono(mono_runtime_run_main+0x16d) [0x809ad6d]
/usr/bin/mono(mono_main+0x623) [0x8058b53]
/usr/bin/mono [0x8058042]
/lib/libc.so.6(__libc_start_main+0xe6) [0x8ba5d6]
/usr/bin/mono [0x8057f81]
Debug info from gdb:
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb7fb2960 (LWP 6327)]
[New Thread 0xb69f5b90 (LWP 6332)]
[New Thread 0xb7274b90 (LWP 6329)]
[New Thread 0xb7fc9b90 (LWP 6328)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xb7fcb416 in __kernel_vsyscall ()
4 Thread 0xb7fc9b90 (LWP 6328) 0xb7fcb416 in __kernel_vsyscall ()
3 Thread 0xb7274b90 (LWP 6329) 0xb7fcb416 in __kernel_vsyscall ()
2 Thread 0xb69f5b90 (LWP 6332) 0xb7fcb416 in __kernel_vsyscall ()
* 1 Thread 0xb7fb2960 (LWP 6327) 0xb7fcb416 in __kernel_vsyscall ()
Thread 4 (Thread 0xb7fc9b90 (LWP 6328)):
#0 0xb7fcb416 in __kernel_vsyscall ()
#1 0x00a4e436 in nanosleep () from /lib/libpthread.so.0
#2 0x0810ed08 in ?? ()
#3 0x00a4732f in start_thread () from /lib/libpthread.so.0
#4 0x0098220e in clone () from /lib/libc.so.6
Thread 3 (Thread 0xb7274b90 (LWP 6329)):
#0 0xb7fcb416 in __kernel_vsyscall ()
#1 0x00a4aba5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2 0x08112757 in ?? ()
#3 0x08114d2c in ?? ()
#4 0x08114d6c in ?? ()
#5 0x0812783f in ?? ()
#6 0x080b38fa in ?? ()
#7 0x080d3c54 in ?? ()
#8 0x08125cde in ?? ()
#9 0x0813e107 in ?? ()
#10 0x00a4732f in start_thread () from /lib/libpthread.so.0
#11 0x0098220e in clone () from /lib/libc.so.6
Thread 2 (Thread 0xb69f5b90 (LWP 6332)):
#0 0xb7fcb416 in __kernel_vsyscall ()
#1 0x00977a57 in poll () from /lib/libc.so.6
#2 0x07273b64 in ?? () from /usr/lib/libnspr4.so
#3 0x021f0259 in ?? () from /usr/lib/xulrunner-1.9/libxul.so
#4 0x021f076e in ?? () from /usr/lib/xulrunner-1.9/libxul.so
#5 0x021f0a2a in ?? () from /usr/lib/xulrunner-1.9/libxul.so
#6 0x029caa52 in ?? () from /usr/lib/xulrunner-1.9/libxul.so
#7 0x029978d0 in ?? () from /usr/lib/xulrunner-1.9/libxul.so
#8 0x021f0485 in ?? () from /usr/lib/xulrunner-1.9/libxul.so
#9 0x029caaae in ?? () from /usr/lib/xulrunner-1.9/libxul.so
#10 0x029978d0 in ?? () from /usr/lib/xulrunner-1.9/libxul.so
#11 0x029cb35c in ?? () from /usr/lib/xulrunner-1.9/libxul.so
#12 0x07277f81 in ?? () from /usr/lib/libnspr4.so
#13 0x00a4732f in start_thread () from /lib/libpthread.so.0
#14 0x0098220e in clone () from /lib/libc.so.6
Thread 1 (Thread 0xb7fb2960 (LWP 6327)):
#0 0xb7fcb416 in __kernel_vsyscall ()
#1 0x0097a671 in select () from /lib/libc.so.6
#2 0x00ad7a30 in g_spawn_sync () from /lib/libglib-2.0.so.0
#3 0x00ad7e2c in g_spawn_command_line_sync () from /lib/libglib-2.0.so.0
#4 0x08179775 in ?? ()
#5 0x0807d2db in ?? ()
#6 <signal handler called>
#7 0x027a1552 in ?? () from /usr/lib/xulrunner-1.9/libxul.so
#8 0x0217ef92 in ?? () from /usr/lib/xulrunner-1.9/libxul.so
#9 0x0217d382 in gtk_moz_embed_render_data ()
from /usr/lib/xulrunner-1.9/libxul.so
#10 0xb77de7a5 in ?? ()
#11 0x087e7d40 in ?? ()
#12 0x08a26b60 in ?? ()
#13 0x0000007c in ?? ()
#14 0x088999c8 in ?? ()
#15 0x08a26be8 in ?? ()
#16 0xbf8164b4 in ?? ()
#17 0xb77de742 in ?? ()
#18 0x08711650 in ?? ()
#19 0x0000007c in ?? ()
#20 0x000000f6 in ?? ()
#21 0x0005aa40 in ?? ()
#22 0x08a26be8 in ?? ()
#23 0x08a26b60 in ?? ()
#24 0x088999c8 in ?? ()
#25 0xbf816480 in ?? ()
#26 0xb77de774 in ?? ()
#27 0xbf8164b4 in ?? ()
#28 0xb77de742 in ?? ()
#29 0x087e7d40 in ?? ()
#30 0x08a26b60 in ?? ()
#31 0x0000007c in ?? ()
#32 0x088999c8 in ?? ()
#33 0x08a26be8 in ?? ()
#34 0x0000007c in ?? ()
#35 0x08a26b60 in ?? ()
#36 0x087e7d40 in ?? ()
#37 0x0003ff60 in ?? ()
#38 0x00063fa0 in ?? ()
#39 0x00051af0 in ?? ()
#40 0xbf8164e0 in ?? ()
#41 0xb77daef6 in ?? ()
#42 0x0003fea0 in ?? ()
#43 0x00056ee0 in ?? ()
#44 0x00050af0 in ?? ()
#45 0x0005aa40 in ?? ()
#46 0x0003fea0 in ?? ()
#47 0x00063fa0 in ?? ()
#48 0x00063fa0 in ?? ()
#49 0x087186a4 in ?? ()
#50 0x00000000 in ?? ()
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
I also executed the command: MONO_LOG_LEVEL=debug mono Browser.exe. Everything is OK until:
Mono-INFO: Searching for 'gtk_widget_show_all'.
Mono-INFO: Probing 'gtk_widget_show_all'.
Mono-INFO: Found as 'gtk_widget_show_all'.
Stacktrace:
at (wrapper managed-to-native) Gtk.Widget.gtk_widget_show_all (intptr) <0x00004>
at (wrapper managed-to-native) Gtk.Widget.gtk_widget_show_all (intptr) <0xffffffff>
at Gtk.Widget.ShowAll () <0x0001a>
at Browser..ctor () <0x0011e>
at Browser.Main (string[]) <0x0001e>
at (wrapper runtime-invoke) Browser.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff>
Has anybody already had this kind of error? Please help me...
Thanks
PS: I use: Fedora 9, monodevelop 1.0.7, mono 1.9.1