Freemat crashes on the following code:
b = 0; w = 0; while w == 0 %disp(); % uncomment this and it does not crash w = crash_test_function(b); end
where
function m = crash_test_function(b) m = 4; return; % get rid of this and it also does not crash.
If you get it to not crash, then revert to the code that crashes, it doesn't crash again.
update: for the test code, deleting the return works, but for other code, it does not. to be clear, the return in the function is not the [only] cause of the problem.