Community
Participate
Working Groups
Import org.eclipse.edt.rui.dojo.samples_0.7.0. Select GraphSample in dojo.samples and right-click. Debug As > EGL Rich UI Application. Get error: Could not render UI () GraphSample.js?contextKey=124:161 () GraphSample.js?contextKey=124:32 () egl.js:801 () GraphSample.html?contextKey=124:80 ([object Array],(function () {egl.localeInfo = {locale: "en_US", nlsCode: "ENU", shortMask: "MM/dd/yyyy", mediumMask: "MM-dd-yyyy", longMask: "MM-dd-yyyy", currencySymbol: "$", decimalSeparator: ".", groupingSeparator: ","};try {egl.handleIDEEvent();egl.rootHandler = new (egl.dojo.samples.GraphSample);if (egl.rootHandler.targetWidget || !egl.rootHandler.egl$isWidget) {egl.rootHandler.setParent(egl.Document);} else {var package = egl.rootHandler.eze$$package;var typename = egl.rootHandler.eze$$typename;egl.rootHandler = egl.Document;egl.rootHandler.eze$$package = package;egl.rootHandler.eze$$typename = typename;}egl.startup();} catch (e) {if (e instanceof egl.egl.debug.DebugTermination) {if (e.msg) {egl.println(e.msg);}} else {egl.crashTerminateSession();if (!egl.dojo.samples.GraphSample) {egl.println("Internal generation error. Found no definition for dojo.samples.GraphSample. Try Project > Clean...", e);} else {egl.printError("Could not render UI", e);throw e;}}}})) GraphSample.html?contextKey=124:54 () GraphSample.html?contextKey=124:52 ([object Event]) GraphSample.html?contextKey=124:40 egl.dojo.widgets.DojoBubbleChart is not a constructor [CRRUI2095E] Could not find the EGL function calls leading to this error start() at line 161 egl.dojo.widgets.DojoBubbleChart is not a constructor org.eclipse.edt.rui.dojo.samples_0.7.0/dojo/samples/GraphSample.js?contextKey=124:161 [CRRUI2095E] Could not find the EGL function calls leading to this error
What's happening is IRUtils.getReferencedPartsFor() is not returning the external type references when passing in the IR read off disk. The VE is compiling a new IR and passing that in and it's resolving the external type references. So if using debug, or if you remove the contextKey parameter from the external browser (meaning use saved IR, not live IR), it hits this problem. Note that the external type references are nested within expressions: ui.addPortlet(new Portlet { title = "Overview", width = 320, children = [new DojoBubbleChart{ If I add a global field "blah DojoBubbleChart;" then the external type is included in the list and the page loads correctly.
Paul - I reverted your recent change to IRUtils and it still happens, so it's not caused by that change.
I tracked this down to the generation step in the VE. The code was not cloning the part before sending it to the JS generator. Because of this, the part in the environment was getting "corrupted" by the ReorganizeCode class. I am attaching my patch for this and routing the bug to IDE UI. Please review the patch and release the change if this change will not have any undesireable side effects in the VE.
Created attachment 207117 [details] Patch for VE problem
I've tested the patch, it worked fine and fixed the problem. The question is why is debugger using the preview IR which is supposed to be used only by VE. The problem turn out to be that Egl2Mof.convert() method will try to save the convert result IR. And PreviewIREnvironment inherited the saving behavior from ProjectIREnvironment which finally saves the result to the ProjectIREnvironment's objectStore. It means the VE workingcopy's compiling result will always replace the project's IR. This is incorrect and could cause issues in many places (deployment for example). I fixed the PreviewIREnvironment so that it only saves to the PreviewObjectStore which is the temp context directory. I have tested the patch together with Paul's patch on RUISample, DojoSample and Mortgage. Things are working as expect. (In reply to comment #4) > Created attachment 207117 [details] > Patch for VE problem
Created attachment 207133 [details] fix to previewirenvironment
Created attachment 207175 [details] Fix VE environment corruption Hi Tony, Paul and I reviewed your change and found it wasn't complete. Attached is a new patch. There are parts like from Bootstrap.java that need to go into the objectCache, not be ignored. The new patch makes sure that any parts to be cached are only ever cached in the preview store OR objectCache, and never put into one of the other caching object stores.
I've applied Paul's patch and my patch. Heavy VE regression testing should be done next week, in conjunction with the other VE fixes that have gone in recently.
(In reply to comment #8) > I've applied Paul's patch and my patch. Heavy VE regression testing should be > done next week, in conjunction with the other VE fixes that have gone in > recently. Justin, I have big concern for your mentioned 'heavy VE regression testing should be done next week'. We've already finished the VE regression testing, and next week we'll only perform simple green thread testing to make sure no major regression. If the fix has big impact on the VE, I vote not to include the fix in 0.7. Jing, what's you comments?
The problem has to be fixed otherwise, unpredictable error can happen in deployment, debugger and maybe more areas that uses IR. We still have a week, we can do a regression of VE instead of just doing simple green thread testing.
Brian had indicated that due to the other recent performance changes made to the VE that it was already going to be regression tested next week. And like Tony said, this is a change we had to make, if we left it alone it can really screw things up elsewhere (like we saw with RUI debug).
Created attachment 207222 [details] Screen shot of Could not render UI
I'm on the 201111180901 build and still have the problem. I started with a clean workspace, created a RUI project, and checked out the samples from CVS. Clicked debug and got: Could not render UI. Screen shot attached.
I forgot to release the changes, a new build is now available and I've verified it loads correctly in debug.
Rocky, the heavy regression has to be done next week. because Tony also had other 3 performances fixes in the VE area which requires regression tests. I think the regression needs to include - simple green thread (CRUD application) - application development of the complex green thread (popcorn app?) - other existing VE regression tests already created in current TTT phase.
Verified in 20111121 build.