|X-Windows Emulator: MATLAB Sometimes Fails to Start
error message: Xlib: unexpected async reply (sequence 0x13b)!
One workaround to this problem is to start MATLAB with the -nodesktop startup option.
Another workaround is to remove the MATLABDesktop.xml file from your preferences directory, which is the directory returned by MATLAB when you run the prefdir function. The preferences directory path is similar to this:
You should then be able to start MATLAB without a problem. Before quitting MATLAB, be sure the desktop is not maximized because that might cause the problem to happen again.