dwsim icon indicating copy to clipboard operation
dwsim copied to clipboard

[Bug] [macOS] Crash after first iteration when using Recycle block on Apple Silicon

Open volkan-a opened this issue 9 months ago • 7 comments

When running a flowsheet that includes a Recycle block on macOS with Apple Silicon, the simulation crashes after the first iteration. The same flowsheet runs without any issues on Windows.

I suspect it might be related to the system's locale settings, especially the decimal separator being a comma (",") instead of a dot (".").

Expected behavior The simulation should converge without crashing, as it does on Windows.

Screenshots (Not applicable — crash occurs without visible error)

Desktop (please complete the following information):

OS: macOS 15.5 Chip: Apple Silicon M2 Locale: Turkish - uses comma as decimal separator DWSIM Version: 9.0.2

volkan-a avatar Jul 04 '25 20:07 volkan-a

@volkan-a can you share the lasterror.txt file from Documents/DWSIM Application Data folder?

DanWBR avatar Jul 14 '25 16:07 DanWBR

Sorry for the late reply. Here's lasterror.txt:

System.MissingMethodException: Method not found: void Eto.Forms.Control.DoDragDrop(Eto.Forms.DataObject,Eto.Forms.DragEffects,Eto.Drawing.Image,Eto.Drawing.PointF)
  at Eto.PropertyStore.TriggerEvent[T] (System.Object key, System.Object sender, T args) [0x0000e] in <23bf6400f02d49eba883a8238fbdb959>:0
  at Eto.Forms.Control.OnMouseDown (Eto.Forms.MouseEventArgs e) [0x00006] in <23bf6400f02d49eba883a8238fbdb959>:0
  at Eto.Forms.Control+Callback.OnMouseDown (Eto.Forms.Control widget, Eto.Forms.MouseEventArgs e) [0x0000c] in <23bf6400f02d49eba883a8238fbdb959>:0
  at Eto.Mac.Forms.MacView`3[TControl,TWidget,TCallback].TriggerMouseDown (System.IntPtr sender, System.IntPtr sel, System.IntPtr e) [0x0005f] in <5970afe3335542568b2416b8242cdff2>:0
  at (wrapper native-to-managed) Eto.Mac.Forms.MacView`3[AppKit.NSView,Eto.Forms.TableLayout,Eto.Forms.Control+ICallback].TriggerMouseDown(intptr,intptr,intptr)
  at (wrapper managed-to-native) AppKit.NSApplication.NSApplicationMain(int,string[])
  at AppKit.NSApplication.Main (System.String[] args) [0x00040] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.14.0.110/src/Xamarin.Mac/AppKit/NSApplication.cs:100
  at Eto.Mac.Forms.ApplicationHandler.Run () [0x00047] in <5970afe3335542568b2416b8242cdff2>:0
  at Eto.Forms.Application.Run (Eto.Forms.Form mainForm) [0x0002c] in <23bf6400f02d49eba883a8238fbdb959>:0
  at DWSIM.UI.Desktop.Program.MainApp (System.String[] args) [0x00559] in <929025c9c3024e3e81ccc71e2590a404>:0

volkan-a avatar Aug 04 '25 13:08 volkan-a

@volkan-a please try it with 9.0.3, as I fixed a similar issue that might work here

DanWBR avatar Aug 05 '25 18:08 DanWBR

I’m trying every new version but ir’s the same. I’m pretty sure it was working on 8.xxxs.

volkan-a avatar Aug 05 '25 18:08 volkan-a

@volkan-a I'm from Brazil and here we also use comma as decimal separator. Can you share your flowsheet or at least something that I can use to reproduce the issue?

DanWBR avatar Aug 05 '25 18:08 DanWBR

Dear Daniel, I've opened simulation file with 9.0.4 and saved it again. Now it started to work again.

However, may be you should check this window again. There are commas and points together.

Image

UPDATE:

App doesn't crash but simulation stops after 1 iteration.

volkan-a avatar Aug 05 '25 19:08 volkan-a

simple_recycle_block.dwxmz.zip

I modelled a simple rankine cycle to demonstrate what's happening. This simulation works on Windows but crashes on Apple Silicon. Image

volkan-a avatar Aug 06 '25 07:08 volkan-a