MATLAB: Using findjobj in R2013a

fexpossible bug

I am trying to use Yair's FEX:findjobj in R2013a on Linux to basically do what he did in his blog post
desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
jEditor = desktop.getGroupContainer('Editor').getTopLevelAncestor;
jEditor.findjobj
This causes MATLAB to become unresponsive and basically hang. I unfortunately don't have any other versions of MATLAB currently. Can anyone reproduce this?

Best Answer

I did a little profiling and found the problem. The findobj function calls home to the FEX and checks for a newer version in the checkVersion subfunction. On my system this fails because urlread times out (which takes a long time). The checkVersion subfunction catches the error and then discards it, which makes it tough to figure out what is going on. Using the undocumented feature of findobj
addpref('FindJObj','dontCheckNewerVersion', true)
stops from calling home and avoids the problems. I wonder if an error on trying to check the newer version should automatically set the preference to not check for updates.