deepforge icon indicating copy to clipboard operation
deepforge copied to clipboard

Don't create OperationCodeEditor instance from the outputViewer panel when not in debug mode

Open umesh-timalsina opened this issue 4 years ago • 3 comments

While working on #1800 , I found that all other TextEditorWidget sub-classes on the prototypical inheritance chain are created only once when the particular visualizer is selected. However, the UI creates multiple (3) instances of LogViewerWidget when loading. This will be a problem since monaco relies on DisposableStore which requires widgets to be properly disposed/destroyed. Regardless of monaco, I think this needs some investigation on why multiple widgets are instantiated.

umesh-timalsina avatar Aug 17 '20 14:08 umesh-timalsina

Branch: 571-monaco-text-editor image Branch: master image

umesh-timalsina avatar Aug 17 '20 14:08 umesh-timalsina

I found that this error stems from TilingVizPanel in which upon selection of LogViewerWidget to view the output OperationCodeEditor panel is also selected (Which should not be the case because the execution was not run in debug mode) and the problem with disposable entries goes away when using monaco-editor from #1800 for any operation in debug mode.

umesh-timalsina avatar Aug 18 '20 17:08 umesh-timalsina

Hmm... When I added logs for text editors being destroyed as well, it looks like the first two should be deleted correctly: DeepinScreenshot_chromium_20200909091101

brollb avatar Sep 09 '20 14:09 brollb