Standalone application shut down itself for no reasons after working for days

1 次查看(过去 30 天)
Hello,
I have developped an application that is supposed to run 24 hours a day 7 days on 7. For some reasons, after working for 4 days it suddenly closed by itself. It also disapeared from task manager. I don't think that it is due to an error that appeared during the run since I placed try-catch statement at different places where errors could occurs.
Is there a reason from Matlab itself to stops applications if they are running for too long? Memory usage ?
Thank you,
  6 个评论
Bruno Luong
Bruno Luong 2023-3-10
编辑:Bruno Luong 2023-3-10
I would log/monitor the memory to eventually observe if there is any memory leak.
I have observed in the passed memory leak from graphical library, but I guess there are many potential sources of such leak.
Steven Lord
Steven Lord 2023-3-10
What operating system are you on? There may be some system log files that provide more data about why the application shut down, but how to access them depends on whether you're on Windows, Linux, or Mac.

请先登录,再进行评论。

回答(1 个)

Dinesh
Dinesh 2023-4-6
Hi Romain.
You might need to add more extensive logging to the application's code to find the cause of the crash. Without knowing more details, it's very hard for me to tell you why this is happening. There might be a lot of reasons. Some of them which can help you track down the problem are as follows:
  1. Memory issues: If your application continuously allocates memory without releasing it, this could lead to memory leaks and eventually exhaust available memory, causing the application to crash. To address this issue, you should regularly monitor memory usage and ensure proper deallocation of memory by clearing variables when they are no longer needed. This is specific to how you are coding the application.
  2. Resource limitations: Your application might consume other system resources (such as file handles, threads, or CPU usage) that, if not managed properly could lead to system instability and cause your application to crash. Make sure your application is efficiently using system resources and releasing them when they're no longer needed. This management issue can also be caused by the Operating System itself.
  3. Unhandled exceptions: Although you mentioned using try-catch blocks in your code, there might still be some unhandled exceptions that are causing your application to terminate. Make sure you have try-catch blocks around all critical sections of your code and that you're logging any caught errors to a file for further analysis.

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by