Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug MATLAB (java) error: timeout waiting for window to show up?

I'm trying to run a MATLAB program that creates a GUI in six different figures. The last figure(...) command times out with:

"UIJ_AreThereWindowShowsPending - timeout waiting for window to show up"

It works on a different computer with the exact same setup (OS X 10.7.2, Java 1.6.0_26-b03-383-11A511 and MATLAB R2011a).

I've found a few threads from people with a similar problem but no solutions yet. Some suggest that it's a java memory problem. I've already tried increasing the memory for java within MATLAB. I've also setup the Java preferences to show the console, but it won't show and I cannot find any java log file anywhere.

Does anyone have an idea how I could get to the root of this problem? Why does the Java console not open with MATLAB? Where can I find MATLAB related java logs?

like image 685
Lukas Avatar asked Oct 17 '11 07:10

Lukas


1 Answers

As someone who had the same problem there is no magic bullet here.

I've seen this argument as one used by the python scientific community as anti matlab.

old versions of matlab are buggy when many figures are open - they have a issues with syncing all the threads.

Here is what I would suggest:

  1. as noted by another user, look at the post in the matlab forums. putting a pause(0.1); drawnow() helped me.
  2. limit your number of figures. once you go above 10, things start going haywire for repeated code runs.
  3. the guys at mathworks revamped the entire figure architecture in 2014b. I have yet to try it but you should give it a try, it might be solved there.

best of luck

like image 172
user2324712 Avatar answered Sep 29 '22 19:09

user2324712