dwsim icon indicating copy to clipboard operation
dwsim copied to clipboard

[Bug] [Linux] Crash then use 'Copy as Image'

Open einhander opened this issue 8 months ago • 4 comments

Describe the bug

Dwsim crash then I do right click and select 'Copy as Image'

To Reproduce

  1. Open any flowsheet
  2. Do right click
  3. Select 'Copy as Image'
  4. See error

Expected behavior Screenshot of dwsim flowsheet copied to clipboard buffer, or can be saved to disk.

Desktop (please complete the following information):

  • OS: Linux Debian 13
  • Version 9.0.2

Additional context

$ dwsim
Marshaling activate signal
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> GLib.GException: Нераспознанный формат файла изображения
   at Gdk.PixbufLoader.Close()
   at Gdk.PixbufLoader.InitFromStream(Stream stream)
   at Gdk.PixbufLoader..ctor(Stream stream)
   at Gdk.Pixbuf..ctor(Stream stream)
   at Eto.GtkSharp.Drawing.BitmapHandler.Create(Stream stream)
   at Eto.Drawing.Bitmap..ctor(Stream stream)
   at DWSIM.UI.Forms.Flowsheet.CopyAsImage(Int32 Zoom)
   at DWSIM.UI.Forms.Flowsheet.<>c__DisplayClass71_0.<SetupDeselectedContextMenu>b__2(Object sender, EventArgs e)
   at Eto.Forms.MenuItem.OnClick(EventArgs e)
   at Eto.Forms.MenuItem.Callback.OnClick(MenuItem widget, EventArgs e)
   at Eto.GtkSharp.Forms.Menu.ButtonMenuItemHandler`2.ButtonMenuItemConnector.HandleActivated(Object sender, EventArgs e)
   at InvokeStub_EventHandler.Invoke(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at GLib.Signal.ClosureInvokedCB(Object o, ClosureInvokedArgs args)
   at GLib.SignalClosure.Invoke(ClosureInvokedArgs args)
   at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
   at GLib.ExceptionManager.RaiseUnhandledException(Exception e, Boolean is_terminal)
   at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
   at Gtk.Application.Run()
   at Eto.GtkSharp.Forms.ApplicationHandler.Run()
   at Eto.Forms.Application.Run(Form mainForm)
   at DWSIM.UI.Desktop.Program.MainApp(String[] args)
   at DWSIM.UI.Desktop.Program.Main(String[] args)

einhander avatar Apr 30 '25 15:04 einhander

@einhander not supported on Linux, unfortunately

DanWBR avatar Aug 07 '25 17:08 DanWBR

@DanWBR it's sad but, crush of entire app is bad thing for user. I think that 'Copy as Image' should be disabled in Linux builds.

einhander avatar Aug 07 '25 17:08 einhander

@einhander it should be already

DanWBR avatar Aug 07 '25 17:08 DanWBR

or not, I need to check it again

DanWBR avatar Aug 07 '25 17:08 DanWBR