dwsim icon indicating copy to clipboard operation
dwsim copied to clipboard

[Bug] Persistent Crash on Ubuntu 22.04

Open TheMicksha opened this issue 7 months ago • 5 comments

Permanently crashes on very simple actions like changing a flow. Tried to solve with AI help; no sucess. I run Linux Mint 21 (Ubuntu 22.04). .NET version 8.0.16. I tried the .deb package, and the portable version.

The only line shown in terminal after crash is: Speicherzugriffsfehler (Speicherabzug geschrieben)

I tried software rendering (LIBGL_ALWAYS_SOFTWARE=1), GTK fallback (GDK_BACKEND=x11), and GDB backtrace (thread pool segfault)

I found this: Thread 21 ".NET TP Worker" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fbeb7fff640 (LWP 6049)] 0x00007fff7ae7a095 in ?? ()

Find the flowsheet in attachment; I just changed a stream (i.e. WDS) from 75 to 150kg. Then, crash. however it seems to happen on any usage of DWSIM in my environment. Tried on another linux mint system - same issue.

Hope you can find something about it. Thanks in advance.

waste-gas-system_optimized.dwxmz_FILES.zip

TheMicksha avatar May 24 '25 06:05 TheMicksha

Quick update: I rebuild the simulation; it works until I add the recycle block.

TheMicksha avatar May 24 '25 06:05 TheMicksha

It may be related to #738 .

einhander avatar May 24 '25 07:05 einhander

@TheMicksha @einhander I'll try your flowsheet on my computer to see what happens. If you guys find out how to run a dotnet app in debug mode I would be very thankful, because I couldn't find anything about it. With mono we only had to do mono --debug DWSIM.UI.Desktop.exe and then we would get a full stack trace after crashes...

DanWBR avatar May 24 '25 11:05 DanWBR

@DanWBR there debugger included in VS code available on Linux https://code.visualstudio.com/docs/csharp/debugging. Some debugging techniques written in this post: https://community.ibm.com/community/user/blogs/amit-sirohi/2023/04/14/basic-debugging-techniques-for-net-applications

You can use netcoredbg, a debugger released by Samsung under the MIT license. The tool suports cli (command line), GDB/MI and VSCode Debug Adapterprotocol. The sample usage are: $ netcoredbg --interpreter=cli -- dotnet /path/to/program.dll

They released a guide with more information https://github.com/Samsung/netcoredbg/blob/master/docs/cli.md

einhander avatar May 24 '25 12:05 einhander

@DanWBR I've made a coredump then I get segmentation fault with dwsim. I hope to done this right.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/dotnet DWSIM.UI.Desktop.exe'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f94400dcc12 in g_type_check_instance_is_fundamentally_a () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
[Current thread is 1 (Thread 0x7f94d1aea100 (LWP 1503062))]
(gdb) bt
#0  0x00007f94400dcc12 in g_type_check_instance_is_fundamentally_a () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1  0x00007f94400c2b2f in g_object_remove_toggle_ref () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#2  0x00007f9452c5bedb in ??? ()
#3  0x00007ffd4741cf20 in ??? ()
#4  0x000000000cf255ec in ??? ()
#5  0x00007f94d1472588 in ??? () at /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.15/libcoreclr.so
#6  0x00007ffd4741d268 in ??? ()
#7  0x0000000000000000 in ??? ()

einhander avatar May 28 '25 15:05 einhander