I'm getting a windows error rather than the recursion limit error

1 view (last 30 days)
I'm a student assistant at University of Twente, and while reviewing work of my students I stumped on a failure at my own matlab. If I should get an error thanx to the recursion limit (IE: recursion limit reached, you can reset it but it might crash your computer and matlab... lovely error) I don't get that message but Matlab just closes. IE) function [ result ] = test( x ) result = test(x); Gets Windows to close my Matlab without getting the recursionlimit-error.
I rechecked my recursion limit by get(0,'RecursionLimit') but that just gives me an answer of '500'. Which should be fine.
But in stead of the normal matlab-error-message I get a windows-error-message saying 'a problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available' Proper recursion codes work normally, it's specificly the ones that I know will get into an infinite loop.
(FYI: I'm running a legal windows 7 and Matlab 7.12.0 R2011a with university licence)
Any idea's?

Accepted Answer

Walter Roberson
Walter Roberson on 19 Jan 2013
Sounds to me like MATLAB is running out of memory in a situation that is not (for whatever reason) nicely caught. MATLAB's recursion limit is designed to assist in finding program bugs, but is not promised to be fool-proof.
  2 Comments
Pepijn
Pepijn on 20 Jan 2013
Tried 'clear' and 'clear all' due to your suggestion, did not fix it. Though your suggestion did get me to try to reset the recursion limit. First at 10, working up till 400. 450 crashes, but 400 works fine for what I'll need it for.
Thanx for contributing the food for thought :)
Walter Roberson
Walter Roberson on 20 Jan 2013
I don't recall ever suggesting "clear all". Sometimes running out of memory cannot be avoided.

Sign in to comment.

More Answers (0)

Categories

Find more on Loops and Conditional Statements 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!