Matlab crashing on complition of Simulation
13 views (last 30 days)
Show older comments
Hi,
I’m simulating a Microgrid system in Simscape Electrical (MATLAB R2025a) that includes:
- A Grid source
- A Battery Energy Storage System (BESS) modeled using the Battery Builder app
- A load profile of up to 5 MW, triggered at different intervals
- A PQ control strategy (using 4 PID controllers: for active power, reactive power, and two current controllers)
The objective is to simulate PQ control at the Point of Common Coupling (PCC) between the grid and BESS.Issue:
When the simulation completes (after running for 5 seconds), MATLAB crashes immediately after reaching 100%. No error message is displayed; the software simply shuts down.
Simulation Settings:
- Solver Type: Variable-step
- Solver: ode15s
- Relative Tolerance: 1e-3
- Minimum Step Size: 1e-6
The Crash log shows
MATLAB Log File: C:\Users\kdivy\AppData\Local\Temp\matlab_crash_dump.3940-1
------------------------------------------------
MATLAB Log File
------------------------------------------------
--------------------------------------------------------------------------------
Access violation detected at 2025-07-30 11:27:31 +0530
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Uninitialized hardware
Graphics card 1 : Intel Corporation ( 0x8086 ) Intel(R) Iris(R) Xe Graphics Version 30.0.101.2079 (2022-5-26)
Interpreter 0 : Executing request: 736C5F73696D2F44656661756C7453696D756C6174696F6E457865637574696F6E496E7374616E63652E637070
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : win64
MATLAB Entitlement ID : 5847230
MATLAB Root : C:\Program Files\MATLAB\R2025a
MATLAB Version : 25.1.0.2943329 (R2025a)
OpenGL : hardware
Operating System : Microsoft Windows 11 Home Single Language
Process ID : 3940
Processor ID : x86 Family 6 Model 154 Stepping 4, GenuineIntel
Session Key : 6l7y0uk5jxnt5so8gxeqendov
Window System : Version 10.0 (Build 22631)
Fault Count: 1
Abnormal termination:
Access violation
Current Thread: '' id 6588
Register State (from fault):
RAX = 00000000004fdee8 RBX = 00000220a4c2b060
RCX = 0000000000000054 RDX = 00000000013f7bf4
RSP = 000000a694eff818 RBP = 00000220a4c2b060
RSI = 0000021e1cfaec20 RDI = 00000000004fdee8
R8 = 0000021e1cfaed18 R9 = 000000a694eff8c0
R10 = 0000021f19f39e68 R11 = 0000000000000054
R12 = 0000000000000000 R13 = 0000021f18f55670
R14 = 0000021e39a05c78 R15 = 0000000000000004
RIP = 00007ff84f9862cf EFL = 00010202
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x00007ff84f9862cf C:\Program Files\MATLAB\R2025a\bin\win64\dspwebscopesimpl.dll+00484047 magnitude_phase_response_filter+00007823
[ 1] 0x00007ff84f9a095e C:\Program Files\MATLAB\R2025a\bin\win64\dspwebscopesimpl.dll+00592222 sl_input_port_parameters_handler_filter+00003198
[ 2] 0x00007ff83bb6869b C:\Program Files\MATLAB\R2025a\toolbox\shared\spcuilib\webscopesasyncio\bin\win64\webscopesasyncio\webscopesfilterplugin.dll+00034459
[ 3] 0x00007ff83bb6d179 C:\Program Files\MATLAB\R2025a\toolbox\shared\spcuilib\webscopesasyncio\bin\win64\webscopesasyncio\webscopesfilterplugin.dll+00053625 createFilter+00007497
[ 4] 0x00007ff876832f8f C:\Program Files\MATLAB\R2025a\bin\win64\asynciocore.dll+00077711 asynciocore::SynchronousOutputNotPossible::SynchronousOutputNotPossible+00005151
[ 5] 0x00007ff8768360b8 C:\Program Files\MATLAB\R2025a\bin\win64\asynciocore.dll+00090296 asynciocore::OutputStream::read+00000040
[ 6] 0x00007ff87682fbe4 C:\Program Files\MATLAB\R2025a\bin\win64\asynciocore.dll+00064484 asynciocore::Converter::init+00036484
[ 7] 0x00007ff9a09c8fba C:\Program Files\MATLAB\R2025a\bin\win64\mwboost_thread-vc143-mt-x64-1_81.dll+00036794 mwboost::detail::win32::handle_manager::swap+00000650
[ 8] 0x00007ff9b6e69333 C:\WINDOWS\System32\ucrtbase.dll+00168755 recalloc+00000163
[ 9] 0x00007ff9b8ff259d C:\WINDOWS\System32\KERNEL32.DLL+00075165 BaseThreadInitThunk+00000029
[ 10] 0x00007ff9b9b8af78 C:\WINDOWS\SYSTEM32\ntdll.dll+00372600 RtlUserThreadStart+00000040
Program State:
Most Recent Simulink Activity:
playSimulationAction : OK in editor 1 at Wed Jul 30 10:59:27 2025
Parameter Changes : OK in editor 1 at Wed Jul 30 10:59:14 2025
2 Comments
Jacob Mathew
on 31 Jul 2025
It is best to get in touch with MathWorks Support as the stack trace in the crash shows DLL files which are compiled and packaged source code and us in the community cannot decode that.
Answers (0)
See Also
Categories
Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!