gQSPSim / gQSPSim_public

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Logger seems to produce error when creating a new unnamed session after having closed one #16

Open feigelman opened 1 year ago

feigelman commented 1 year ago

closing an unnamed (new) session seems to leave an 'unnamed' logger singleton object in memory. when you go to create another session, clicking on the tree produces an error because it finds two objects with the matching name.

Error using fileparts Too many input arguments.

Error in QSPViewerNew.Widgets.Logger (line 19) [~,~,ext] = fileparts(obj.LogFile);

Error in QSP.Session/get.RelativeLoggerFilePathParts (line 947) loggerObj = QSPViewerNew.Widgets.Logger(obj.LoggerName);

Error in QSP.Session/copy (line 393) newObj.RelativeLoggerFilePathParts = obj.RelativeLoggerFilePathParts;

Error in QSPViewerNew.Application.SessionPane/attachNewSession (line 431) obj.TemporarySession = copy(obj.Session);

Error in QSPViewerNew.Application.PaneManager/openPane (line 84) pane.("attachNew" + type)(nodeData);

Error in QSPViewerNew.Application.MainView/onTreeSelectionChange (line 337) obj.paneManager.openPane(SelectedNodes.NodeData);

Error in QSPViewerNew.Application.MainView>@(varargin)obj.onTreeSelectionChange(varargin{:}) (line 243) obj.TreeCtrl.SelectionChangedFcn = @obj.onTreeSelectionChange;

Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback Error while evaluating Tree PrivateSelectionChangedFcn.

simkaryote commented 1 year ago

This was a bug in the Logger that I asked the maintainer to fix. Meanwhile, closing this issue and adding a test.

simkaryote commented 1 year ago

but do let me know if you see this again. By the time this is in the dev branch I think it will be fixed.