Error in Simulink.messageviewer.internal.MsgIdToDataMap/addRecord - Caused by: Maximum recursion limit of 500 reached.
12 views (last 30 days)
Hello, I have recieved the following error message:
"Error in Simulink.messageviewer.internal.MsgIdToDataMap/addRecord
Caused by: Maximum recursion limit of 500 reached."
Or I will also (for no reason I have figured out yet) recieve
"Warning: The following error was caught while executing 'slmsgviewer' class destructor: Maximum recursion limit of 500 reached.
Error in slmsgviewer
Caused by: Maximum recursion limit of 500 reached. "
in mass on my command prompt. This occurs when I open a simulink file that has a distribution system (power system) set up. I am not running any simulations or anything yet I am simply opening the file.
I cannot find information on how this could trigger a maximum recursion limit from opening a simulink/simscape power systems file or where/what the Simulink.messageviewer.internal.MsgIdToDataMap/addRecord' is.
1) changed the blocks which are put in the system so that I know its not an issue with callbacks or initialization in the masking
2) commented out code which initializes the block parameters from the code (File is initially populated with blocks from code)
3) deleted sections of blocks to find if is a specific problem with one (its not at about 20/50 blocks the error message stops but it doesnt matter which blocks are deleted)
I do not have the first idea about what I am dealing with and despite many hours searching google, Matlab Wiki and even youtube.
The only solutions I have seen so far make no mention of this happening in a simulink/simscape file and usually advise to just increase the recursion limit. I would like to know what the issue is though to properly solve it. Any information on this will be greatly appreciated.
Thank you for your time.
Jan on 1 Oct 2018
Hello, I have had the same error while creating a distribution system with simulink. I fixed the problem by creating a new empty simulink model. I have copied the distribution system (all elements) into the new model. So far the error has not recurred in the new model.
VraelEnrique on 27 Jan 2020
Did you guys could find a solution to this problem? I have the same issue and i don´t get the solution to it /:
Shubhranshu Kumar Tiwary on 5 May 2021
I am not an expert, but I too faced a similar instance when I tried making an IEEE 57 Bus system model which was yet incomplete. When I closed MATLAB and opened it again next day I faced the same error "maximum recursion limit of 500 reached". I contacted the customer support. My problem was solved.
Solution: Before opening the model, run the following code in the command prompt
Then try opening the model.