Closed Dev-iL closed 6 years ago
Sounds like we need some unit tests ;)
Upon further investigation, it appears that the issue above is not because of the version change, but rather because of some edge case I had the misfortune to encounter. As far as I understand, the command to list open webwindow
objects,
matlab.internal.webwindowmanager.instance.findAllWebwindows()
might also return entries that do not correspond to a uifigure
. Such webwindows don't have the usual set of attached JS libraries ~(most notably - dojo), so the dojo.require
module is not recognized (which leads to the error above)~ (the difference important for this error is react
). In my case, the returned "incorrect" webwindow was related to the login dialog where one enters their TMW account.
A possible solution is either to make sure that the webwindow is indeed associated with a uifigure
, or simply always create a new uifigure
, just in case.
While investigating the above I noticed something strange: if I run the following code
F = uifigure(); drawnow; close(F);
then switch focus from the MATLAB window to something else, then back to MATLAB - it crashes (tested on a fully updated Win10 machine). I'd love to hear if anybody else can reproduce this on their R2018a...
Not confirmed - Tested on R2017b Win10. No crash or any other unexpected behavior.
Hi Yair,
I had some inaccuracies in my previous post, so I'll try to provide additional information.
All errors I encountered are in R2018a. It's possible that the uifigure
-deletion crashes are due to some strange software/hardware combination on my machine (I tried clearing/refreshing prefdir
+ updating the GPU driver, but this didn't help).
Regarding the login window,
its webwindow URL is this:
'https://localhost:31515/toolbox/matlab/matlab_login_framework/web/LoginPanelContainer.html?snc=CSQTEJ'
and not what we're used to seeing in uifigures:
https://localhost:31515/toolbox/matlab/uitools/uifigureappjs/cefComponentContainer.html?channel=/uifigure/20a743fe-49f8-4d0b-8833-18024283877b&snc=234VQA
While my previous statement that it comes without dojo was incorrect, this alternate path does not recognize the react-js library (which, for uifigures, is defined inside gbtclient.js
), and results in the error I got earlier.
I am yet to find a use for react in this tool, so maybe we should just revert the change where react version reporting was added.
The library doesn't work as-is in the new release, adaptations needed. Easiest example: