Skip to content

Exception when opening a saved session. #595

@jfkguidant

Description

@jfkguidant

Invalid Content: ActiveContent must be one of the visible contents, or null if there is no visible content.\n\n
InvalidOperationException
at WeifenLuo.WinFormsUI.Docking.DockPane.set_ActiveContent(IDockContent value)
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Activate()
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.SetParent(Control value)
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.SetPane(DockPane pane)
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.SetPaneAndVisible(DockPane pane)
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.SetDockState(Boolean isHidden, DockState visibleState, DockPane oldPane)
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_PanelPane(DockPane value)
at WeifenLuo.WinFormsUI.Docking.DockPane.InternalConstruct(IDockContent content, DockState dockState, Boolean flagBounds, Rectangle floatWindowBounds, DockPane prevPane, DockAlignment alignment, Double proportion, Boolean show)
at WeifenLuo.WinFormsUI.Docking.DockPane..ctor(IDockContent content, DockState visibleState, Boolean show)
at WeifenLuo.WinFormsUI.ThemeVS2013.VS2013DockPane..ctor(IDockContent content, DockState visibleState, Boolean show)
at WeifenLuo.WinFormsUI.ThemeVS2013.VS2013DockPaneFactory.CreateDockPane(IDockContent content, DockState visibleState, Boolean show)
at WeifenLuo.WinFormsUI.Docking.DockPanel.Persistor.LoadFromXml(DockPanel dockPanel, Stream stream, DeserializeDockContent deserializeContent, Boolean closeStream)
at WeifenLuo.WinFormsUI.Docking.DockPanel.LoadFromXml(Stream stream, DeserializeDockContent deserializeContent, Boolean closeStream)
at LogExpert.UI.Controls.LogTabWindow.LogTabWindow.RestoreLayout(String layoutXml) in C:\dev\LogExpert\src\LogExpert.UI\Dialogs\LogTabWindow\LogTabWindow.cs:line 1627
at LogExpert.UI.Controls.LogTabWindow.LogTabWindow.LoadProject(String projectFileName, Boolean restoreLayout) in C:\dev\LogExpert\src\LogExpert.UI\Dialogs\LogTabWindow\LogTabWindow.cs:line 1506
at LogExpert.UI.Services.FileOperationService.FileOperationService.LoadFilesWithOption(String[] fileNames, Boolean invertLogic) in C:\dev\LogExpert\src\LogExpert.UI\Services\FileOperationService\FileOperationService.cs:line 221
at LogExpert.UI.Services.FileOperationService.FileOperationService.LoadStartupFiles(IList`1 lastOpenFiles, String[] startupFileNames) in C:\dev\LogExpert\src\LogExpert.UI\Services\FileOperationService\FileOperationService.cs:line 324
at LogExpert.UI.Controls.LogTabWindow.LogTabWindow.OnLogTabWindowLoad(Object sender, EventArgs e) in C:\dev\LogExpert\src\LogExpert.UI\Dialogs\LogTabWindow\LogTabWindow.cs:line 1679
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, UInt32 msg, WPARAM wparam, LPARAM lparam)

Here is the session file:
{
"FileNames": [
"C:\Tmp\C__Tmp_testlog.txt.lxp"
],
"TabLayoutXml": "\r\n\r\n<DockPanel FormatVersion="1.0" DockLeftPortion="0.25" DockRightPortion="0.25" DockTopPortion="0.25" DockBottomPortion="0.25" ActiveDocumentPane="0" ActivePane="0">\r\n <Contents Count="1">\r\n <Content ID="0" PersistString="LogWindow#C:\Tmp\testlog.txt" AutoHidePortion="0.25" IsHidden="False" IsFloat="False" />\r\n \r\n <Panes Count="1">\r\n <Pane ID="0" DockState="Document" ActiveContent="0">\r\n <Contents Count="1">\r\n <Content ID="0" RefID="0" />\r\n \r\n \r\n \r\n \r\n <DockWindow ID="0" DockState="Document" ZOrderIndex="1">\r\n <NestedPanes Count="1">\r\n <Pane ID="0" RefID="0" PrevPane="-1" Alignment="Right" Proportion="0.5" />\r\n \r\n \r\n <DockWindow ID="1" DockState="DockLeft" ZOrderIndex="4">\r\n <NestedPanes Count="0" />\r\n \r\n <DockWindow ID="2" DockState="DockRight" ZOrderIndex="5">\r\n <NestedPanes Count="0" />\r\n \r\n <DockWindow ID="3" DockState="DockTop" ZOrderIndex="6">\r\n <NestedPanes Count="0" />\r\n \r\n <DockWindow ID="4" DockState="DockBottom" ZOrderIndex="7">\r\n <NestedPanes Count="0" />\r\n \r\n \r\n <FloatWindows Count="0" />\r\n",
"ProjectFilePath": null
}

And the lxp:
{
"$id": "1",
"BookmarkList": {
"$id": "2"
},
"BookmarkListPosition": 300,
"BookmarkListVisible": false,
"Columnizer": {
"TypeName": "LogExpert.Core.Entities.DefaultLogfileColumnizer, LogExpert.Core, Version=1.40.0.0, Culture=neutral, PublicKeyToken=4f1de4c770adbe0a",
"DisplayName": "Default (single line)",
"CustomName": "Default (single line)",
"State": {}
},
"ColumnizerName": null,
"CurrentLine": 0,
"Encoding": "utf-8",
"FileName": "C:\Tmp\testlog.txt",
"FilterAdvanced": false,
"FilterParamsList": [],
"FilterPosition": 486,
"FilterSaveListVisible": false,
"FilterTabDataList": [],
"CellSelectMode": false,
"FirstDisplayedLine": 0,
"FollowTail": true,
"HighlightGroupName": "[Default]",
"FilterVisible": false,
"LineCount": 1,
"MultiFile": false,
"MultiFileMaxDays": 3,
"MultiFileNames": [],
"MultiFilePattern": "*$J(.)",
"RowHeightList": {
"$id": "3"
},
"SessionFileName": null,
"ShowBookmarkCommentColumn": false,
"TabName": "testlog.txt",
"SettingsSaveLoadLocation": null
}

The lxp works fine. I can double click on it.

I can run it under Visual Studio to understand more but not right now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions