Pinta icon indicating copy to clipboard operation
Pinta copied to clipboard

Pinta crashed when I typed Chinese in text box.

Open Dangerise opened this issue 1 year ago • 3 comments

Description As the title

To Reproduce

  • Open a image
  • Add a text
  • Type chinese
  • crash

Additional Info pinta

Version image

Pinta version : 2.1.1

Dangerise avatar Feb 04 '24 11:02 Dangerise

If you launch Pinta from the terminal, is there any crash log? A hard crash like that probably indicates an issue in the GTK libraries

cameronwhite avatar Feb 04 '24 17:02 cameronwhite

@cameronwhite

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at Gtk.IMContext.Reset()

at Pinta.Tools.TextTool.OnIMCommit(System.Object, Gtk.CommitArgs)

at DynamicClass.InvokeStub_CommitHandler.Invoke(System.Object, System.Object, IntPtr*)

at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)

at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)

at System.Delegate.DynamicInvokeImpl(System.Object[])

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at Gtk.IMContext.Reset()

at Pinta.Tools.TextTool.OnIMCommit(System.Object, Gtk.CommitArgs)

at DynamicClass.InvokeStub_CommitHandler.Invoke(System.Object, System.Object, IntPtr*)

at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)

at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)

at System.Delegate.DynamicInvokeImpl(System.Object[])

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at Gtk.IMContext.Reset()

at Pinta.Tools.TextTool.OnIMCommit(System.Object, Gtk.CommitArgs)

at DynamicClass.InvokeStub_CommitHandler.Invoke(System.Object, System.Object, IntPtr*)

at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)

at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)

at System.Delegate.DynamicInvokeImpl(System.Object[])

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at Gtk.IMContext.Reset()

at Pinta.Tools.TextTool.OnIMCommit(System.Object, Gtk.CommitArgs)

at DynamicClass.InvokeStub_CommitHandler.Invoke(System.Object, System.Object, IntPtr*)

at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)

at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)

at System.Delegate.DynamicInvokeImpl(System.Object[])

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at Gtk.IMContext.Reset()

at Pinta.Tools.TextTool.OnIMCommit(System.Object, Gtk.CommitArgs)

at DynamicClass.InvokeStub_CommitHandler.Invoke(System.Object, System.Object, IntPtr*)

at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)

at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)

at System.Delegate.DynamicInvokeImpl(System.Object[])

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at Gtk.IMContext.Reset()

at Pinta.Tools.TextTool.OnIMCommit(System.Object, Gtk.CommitArgs)

at DynamicClass.InvokeStub_CommitHandler.Invoke(System.Object, System.Object, IntPtr*)

at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)

at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)

at System.Delegate.DynamicInvokeImpl(System.Object[])

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at Gtk.IMContext.Reset()

at Pinta.Tools.TextTool.OnIMCommit(System.Object, Gtk.CommitArgs)

at DynamicClass.InvokeStub_CommitHandler.Invoke(System.Object, System.Object, IntPtr*)

at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)

at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)

at System.Delegate.DynamicInvokeImpl(System.Object[])

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at Gtk.IMContext.Reset()

at Pinta.Tools.TextTool.OnIMCommit(System.Object, Gtk.CommitArgs)

at DynamicClass.InvokeStub_CommitHandler.Invoke(System.Object, System.Object, IntPtr*)

at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)

at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)

at System.Delegate.DynamicInvokeImpl(System.Object[])

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at Gtk.IMContext.Reset()

at Pinta.Tools.TextTool.OnIMCommit(System.Object, Gtk.CommitArgs)

at DynamicClass.InvokeStub_CommitHandler.Invoke(System.Object, System.Object, IntPtr*)

at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)

at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)

at System.Delegate.DynamicInvokeImpl(System.Object[])

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at Gtk.IMContext.Reset()

at Pinta.Tools.TextTool.OnIMCommit(System.Object, Gtk.CommitArgs)

at DynamicClass.InvokeStub_CommitHandler.Invoke(System.Object, System.Object, IntPtr*)

at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)

at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)

at System.Delegate.DynamicInvokeImpl(System.Object[])

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at Gtk.IMContext.Reset()

at Pinta.Tools.TextTool.OnIMCommit(System.Object, Gtk.CommitArgs)

at DynamicClass.InvokeStub_CommitHandler.Invoke(System.Object, System.Object, IntPtr*)

at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)

at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)

at System.Delegate.DynamicInvokeImpl(System.Object[])

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at Gtk.IMContext.Reset()

at Pinta.Tools.TextTool.OnIMCommit(System.Object, Gtk.CommitArgs)

at DynamicClass.InvokeStub_CommitHandler.Invoke(System.Object, System.Object, IntPtr*)

at System.Reflection.MethodInvoker.Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags)

at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)

at System.Delegate.DynamicInvokeImpl(System.Object[])

at GLib.Signal.ClosureInvokedCB(System.Object, GLib.ClosureInvokedArgs)

at GLib.SignalClosure.MarshalCallback(IntPtr, IntPtr, UInt32, IntPtr, IntPtr, IntPtr)

at GLib.Application.Run(System.String, System.String[])

at Pinta.MainClass.Main(System.String[])

fish: Job 1, 'pinta > log' terminated by signal SIGABRT (Abort)

Dangerise avatar Feb 05 '24 00:02 Dangerise

Thanks, it looks like there is some infinite recursion where resetting the input method context triggers another commit of the text.

cameronwhite avatar Feb 06 '24 02:02 cameronwhite

Got the same issue on macOS. Inputting in Chinese or Japanese will make Pinta crashed immediately.

vigorox avatar May 10 '24 00:05 vigorox

Thanks, I could reproduce this on macOS with the Chinese input method.

@Dangerise - would you be able to test the latest master branch (commit 3b385de) to see if it also fixes the crash on your platform?

cameronwhite avatar May 12 '24 04:05 cameronwhite

@cameronwhite seems to be fixed

Dangerise avatar May 12 '24 08:05 Dangerise

Great, thanks for confirming!

cameronwhite avatar May 12 '24 16:05 cameronwhite