Open glunardi opened 6 years ago
Happened again after 30 minutes (real uptime)
real 30m19.093s
user 0m21.296s
sys 0m16.781s
So it does not take that long. The stack is virtually identical:
Exception in Gtk# callback delegate
Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
GLib.MissingIntPtrCtorException: Unable to construct instance of type SparkleShare.EventLog+SparkleWebView from native object handle. Instance of managed subclass may have been prematurely disposed.
at GLib.ObjectManager.CreateObject (System.IntPtr raw) [0x00064] in <3eb93253711f4c08b41956dc83a81a30>:0
at GLib.Object.GetObject (System.IntPtr o, System.Boolean owned_ref) [0x00089] in <3eb93253711f4c08b41956dc83a81a30>:0
at WebKit2.WebView.DecidePolicy_cb (System.IntPtr inst, System.IntPtr decision, System.Int32 decision_type) [0x00000] in <6c1e1be6960844fe8a7266ffdb9ef388>:0
at GLib.ExceptionManager.RaiseUnhandledException (System.Exception e, System.Boolean is_terminal) [0x00000] in <3eb93253711f4c08b41956dc83a81a30>:0
at WebKit2.WebView.DecidePolicy_cb (System.IntPtr inst, System.IntPtr decision, System.Int32 decision_type) [0x00000] in <6c1e1be6960844fe8a7266ffdb9ef388>:0
at GLib.Application.g_application_run (System.IntPtr , System.Int32 , System.IntPtr ) [0x00000] in <440c5998093e4fc6a6ba2819c12be9f9>:0
at GLib.Application.Run (System.Int32 argc, System.String argv) [0x00000] in <440c5998093e4fc6a6ba2819c12be9f9>:0
at SparkleShare.UserInterface.Run (System.String[] args) [0x00000] in <04fab172dbfc471193322bca3923cb3a>:0
at SparkleShare.SparkleShare.Main (System.String[] args) [0x00000] in <04fab172dbfc471193322bca3923cb3a>:0
Trying to instrument CreateWebView () and SparkleWebView : WebView {} to see if anything obvious happens.
It is quite possible this is related to this build time warning:
./EventLog.cs(237,69): warning CS0612: `WebKit2.NavigationPolicyDecision.Request' is obsolete
This is native, not inside the flatpak right?
In my testing it is native install on F27.
Others have reported what seems like a similar crash using the flatpak but I have received to confirm or deny that. There is nothing in their logs.
It could well be the WebKit2.NavigationPolicyDecision.Request call. I couldn't find a a way to replace the deprecated call warnings with something in the current API.
Which WebKit2 bindings are you using? The ones from hbons/webkit2-sharp?
rpm -qi webkit2-sharp-0-0.3.20170219gita59fd76.fc27.x86_64 Name : webkit2-sharp Version : 0 Release : 0.3.20170219gita59fd76.fc27 Architecture: x86_64 Install Date: Thu 28 Dec 2017 05:57:59 PM EST Group : Unspecified Size : 417536 License : MIT Signature : RSA/SHA256, Wed 27 Sep 2017 02:59:19 AM EDT, Key ID f55e7430f5282ee4 Source RPM : webkit2-sharp-0-0.3.20170219gita59fd76.fc27.src.rpm Build Date : Wed 27 Sep 2017 02:36:50 AM EDT Build Host : buildvm-25.phx2.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project URL : https://github.com/hbons/webkit2-sharp Summary : C# bindings for WebKit 2 with GTK+ 3 Description : C# bindings for WebKit 2 with GTK+ 3
Are you able to open the Recent Events window at all?
Indeed, I had checked and it does work. The crash does not happen when I actually try to open the "History..." dialog but rather all by itself and seemingly randomly.
Sorry all my colleagues are boring and no one has an avatar :-).
It could well be the WebKit2.NavigationPolicyDecision.Request call. I couldn't find a a way to replace the deprecated call warnings with something in the current API.
Could this possibly be any harder to track down?
I quickly looked and was not even able to figure out where or when the call was deprecated. Even worse, I can not figure out what it should be changed to.
Could we try without using the decision rule at all? If you have a link to what interface documentation to what you used for WebKit2 integration, I could try a few things.
It could be that the logic around https://github.com/hbons/SparkleShare/blob/release/2.0.0/SparkleShare/Linux/EventLog.cs#L226 is no longer needed because some behaviour in WebKit changed. You could try commenting some stuff out and see if the all the links still work?
I have commented out the whole override method for now. It builds and runs. Will report back if it still crashes (or not).
Will try to look at why most of the links were already not working properly before (might be related). I had not noticed that before. Will open another issue if I can figure it out.
Will report back if it still crashes (or not).
Just an update that it is still going. Will update tomorrow.
Will report back if it still crashes (or not).
Just an update that it is still going. Will update tomorrow.
That looks like it might do the trick (still running). If still good tomorrow, I will submit a pull request.
Adding here that this crash still occurs with the latest version (master)
Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. GLib.MissingIntPtrCtorException: Unable to construct instance of type SparkleShare.EventLog+SparkleWebView from native object handle. Instance of managed subclass may have been prematurely disposed. at GLib.ObjectManager.CreateObject (System.IntPtr raw) [0x00064] in <3eb93253711f4c08b41956dc83a81a30>:0 at GLib.Object.GetObject (System.IntPtr o, System.Boolean owned_ref) [0x00089] in <3eb93253711f4c08b41956dc83a81a30>:0 at WebKit2.WebView.DecidePolicy_cb (System.IntPtr inst, System.IntPtr decision, System.Int32 decision_type) [0x00000] in <6c1e1be6960844fe8a7266ffdb9ef388>:0 at GLib.ExceptionManager.RaiseUnhandledException (System.Exception e, System.Boolean is_terminal) [0x00000] in <3eb93253711f4c08b41956dc83a81a30>:0 at WebKit2.WebView.DecidePolicy_cb (System.IntPtr inst, System.IntPtr decision, System.Int32 decision_type) [0x00000] in <6c1e1be6960844fe8a7266ffdb9ef388>:0 at GLib.Application.g_application_run (System.IntPtr , System.Int32 , System.IntPtr ) [0x00000] in <440c5998093e4fc6a6ba2819c12be9f9>:0 at GLib.Application.Run (System.Int32 argc, System.String argv) [0x00000] in <440c5998093e4fc6a6ba2819c12be9f9>:0 at System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod , System.Object , System.Object[] , System.Exception& ) [0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0 at SparkleShare.UserInterface.Run (System.String[] args) [0x00000] in <df31390bf39347f4b067f58a2e0f4610>:0 at SparkleShare.SparkleShare.Main (System.String[] args) [0x00000] in <df31390bf39347f4b067f58a2e0f4610>:0
I was not trying to open any of the dialogs. It was an unattended crash (which seems odd). Will try to keep an eye on it. Everything else appears to be working great now.
I think this happens when the web content is updated after a pull? The only thing that I can see that disposes the webview is:
this.web_view.Dispose ();
this.web_view = CreateWebView ();
What if you remove these two lines in EventLog.UpdateContent()
?
What if you remove these two lines in EventLog.UpdateContent()?
I have decorated those lines with log entries for now to see if something comes of it. will report back. Quite stable otherwise.
Interestingly it would seem that the crash after "CreateWebView". Happened a couple of times that way now.
10:34:25 EventLog | Invoking Dispose webview in UpdateContent method 10:34:25 EventLog | Invoking CreateWebView in UpdateContent method Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. GLib.MissingIntPtrCtorException: Unable to construct instance of type SparkleShare.EventLog+SparkleWebView from native object handle. Instance of managed subclass may have been prematurely disposed. at GLib.ObjectManager.CreateObject (System.IntPtr raw) [0x00064] in <3eb93253711f4c08b41956dc83a81a30>:0 at GLib.Object.GetObject (System.IntPtr o, System.Boolean owned_ref) [0x00089] in <3eb93253711f4c08b41956dc83a81a30>:0 at WebKit2.WebView.DecidePolicy_cb (System.IntPtr inst, System.IntPtr decision, System.Int32 decision_type) [0x00000] in <6c1e1be6960844fe8a7266ffdb9ef388>:0 at GLib.ExceptionManager.RaiseUnhandledException (System.Exception e, System.Boolean is_terminal) [0x00000] in <3eb93253711f4c08b41956dc83a81a30>:0 at WebKit2.WebView.DecidePolicy_cb (System.IntPtr inst, System.IntPtr decision, System.Int32 decision_type) [0x00000] in <6c1e1be6960844fe8a7266ffdb9ef388>:0 at GLib.Application.g_application_run (System.IntPtr , System.Int32 , System.IntPtr ) [0x00000] in <440c5998093e4fc6a6ba2819c12be9f9>:0 at GLib.Application.Run (System.Int32 argc, System.String argv) [0x00000] in <440c5998093e4fc6a6ba2819c12be9f9>:0 at System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod , System.Object , System.Object[] , System.Exception& ) [0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0 at SparkleShare.UserInterface.Run (System.String[] args) [0x00000] in <6fd2d8cb6e0e4f22b3f075fbe8dece50>:0 at SparkleShare.SparkleShare.Main (System.String[] args) [0x00000] in <6fd2d8cb6e0e4f22b3f075fbe8dece50>:0
Will run it a little more this way and try to remove the disposal. You probably had a reason for it.
Just confirming that the occasional crash is still happening with these lines in:
this.web_view.Dispose ();
this.web_view = CreateWebView ();
Will test again taking them out. I ran without them for a few days and noticed no side-effect.
Caught another instance of this exception today with the latest master:
Exception in Gtk# callback delegate
Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
GLib.MissingIntPtrCtorException: Unable to construct instance of type SparkleShare.EventLog+SparkleWebView from native object handle. Instance of managed subclass may have been prematurely disposed.
at GLib.ObjectManager.CreateObject (System.IntPtr raw) [0x00064] in <3eb93253711f4c08b41956dc83a81a30>:0
at GLib.Object.GetObject (System.IntPtr o, System.Boolean owned_ref) [0x00089] in <3eb93253711f4c08b41956dc83a81a30>:0
at WebKit2.WebView.DecidePolicy_cb (System.IntPtr inst, System.IntPtr decision, System.Int32 decision_type) [0x00000] in <6c1e1be6960844fe8a7266ffdb9ef388>:0
at GLib.ExceptionManager.RaiseUnhandledException (System.Exception e, System.Boolean is_terminal) [0x00000] in <3eb93253711f4c08b41956dc83a81a30>:0
at WebKit2.WebView.DecidePolicy_cb (System.IntPtr inst, System.IntPtr decision, System.Int32 decision_type) [0x00000] in <6c1e1be6960844fe8a7266ffdb9ef388>:0
at GLib.Application.g_application_run (System.IntPtr , System.Int32 , System.IntPtr ) [0x00000] in <440c5998093e4fc6a6ba2819c12be9f9>:0
at GLib.Application.Run (System.Int32 argc, System.String argv) [0x00000] in <440c5998093e4fc6a6ba2819c12be9f9>:0
at System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod , System.Object , System.Object[] , System.Exception& ) [0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0
at SparkleShare.UserInterface.Run (System.String[] args) [0x00000] in <ce41a37f2b5149a386aefc0939c3e31d>:0
at SparkleShare.SparkleShare.Main (System.String[] args) [0x00000] in <ce41a37f2b5149a386aefc0939c3e31d>:0
These lines are not currently patched out. I could make that change if you think it would be a useful test:
this.web_view.Dispose ();
this.web_view = CreateWebView ();
so did you get any crashes with the lines commented out before?
so did you get any crashes with the lines commented out before?
I think so. I commented a few days back that:
Just confirming that the occasional crash is still happening with these lines in:
Just a quick update that despite the issue still being there I believe, good uptime (probably 72hrs+)
What happened:
Gtk# exception crashes SS (master) on F27.
Here are the last entries in the log before the crash:
The trace:
What I expected to happen:
Apparently SparkleShare.EventLog+SparkleWebView failed which might imply a change underneath in webkit2gtk?
You can reproduce the issue like this:
Have not managed to reproduce manually. It appears to take quite a few hours of uptime before the crash would manifest itself.