Unable to open document and program crashes after ribbon customization

This is the second major bug I encountered after I bought Studio 2017. As with the other bug I reported a few days ago, I managed to pinpoint its origin and circumvent its happening, but it would be great if this could be fixed. When it first occurred, I had no idea what caused it. Whenever I tried to open a document, no matter in which way, it displayed an error message "The specified item is already part of the command bar" and part of or the whole ribbon turned black and the window became unresponsive, although I could still click on the Windows close button at the top right to exit it. I then deducted that "command bar" must refer to the ribbon, so I assumed that the various ribbon customizations I had just made were causing it, so I reset the ribbon and that solved the issue.

Since then I have left the ribbon as it is and the error disappeared. For the sake of this post I just now systematically tried to recreate the issue. I made one change in the ribbon under the Files View, removing the whole Groupshare group and restarted Studio. I could switch freely between the different views, but when I opened a document and closed it, thereby "falling back" to the Files View, this error occurred:

<SDLErrorDetails time="01/02/2018 10:35:09">
  <ErrorMessage>Failed to activate view 'Files'.</ErrorMessage>
  <Exception>
    <Type>Sdl.Desktop.Platform.StudioException, Sdl.Desktop.Platform, Version=5.0.0.0, Culture=neutral, PublicKeyToken=c28cdb26c445c888</Type>
    <HelpLink />
    <Source>Sdl.Desktop.Platform</Source>
    <HResult>-2146233088</HResult>
    <StackTrace><![CDATA[   at Sdl.Desktop.Platform.Implementation.StudioWindow.set_ActiveView(IViewReference value)
   at Sdl.TranslationStudio.Editor.EditorService.document_Closed(IDocument document)
   at Sdl.TranslationStudio.Api.Editor.DocumentEventHandler.Invoke(IDocument document)
   at Sdl.TranslationStudio.Api.Editor.AbstractInternalDocument.OnClosed()
   at Sdl.TranslationStudio.Editor.TranslationEditor.TranslatableDocument.OnClosed()
   at Sdl.TranslationStudio.Api.Editor.AbstractInternalDocument.CloseImpl()
   at Sdl.TranslationStudio.Api.Editor.AbstractInternalDocument.Close()
   at Sdl.TranslationStudio.Editor.TranslationEditor.TranslatableDocument.Close()
   at Sdl.TranslationStudio.Editor.Shared.Actions.CloseDocumentAction.Execute()
   at Sdl.Desktop.Platform.Implementation.CommandBars.StaticAction.Execute()
   at Sdl.Desktop.Platform.Implementation.CommandBars.ActionService.<>c__DisplayClass3.<ExecuteAction>b__2()
   at Sdl.Desktop.Platform.Implementation.Services.Log.Resources(Object message, Action action)
   at Sdl.Desktop.Platform.Implementation.CommandBars.ActionService.ExecuteAction(IAction action, ActionOrigin origin, Boolean allowToggle)
   at Sdl.Desktop.Platform.Implementation.CommandBars.ActionService.ExecuteActionForShortcut(Keys shortcut)
   at Sdl.Desktop.Platform.WinForms.StudioWindowForm.OnKeyDown(KeyEventArgs e)
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Form.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)]]></StackTrace>
    <InnerException>
      <Type>System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
      <ParamName>Key</ParamName>
      <HelpLink />
      <Source>Infragistics4.Shared.v14.2</Source>
      <HResult>-2147024809</HResult>
      <StackTrace><![CDATA[   at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKeyDoesNotExist(String key, IKeyedSubObject ignoreObject)
   at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKey(String key, IKeyedSubObject ignoreObject)
   at Infragistics.Win.UltraWinToolbars.RibbonGroupCollection.AddGroupHelper(RibbonGroup group, Int32 index, Boolean notify, Boolean validateKey)
   at Infragistics.Win.UltraWinToolbars.RibbonGroupCollection.Add(RibbonGroup group)
   at Sdl.Desktop.Platform.WinForms.IgRibbonGroup.Create(INativeCommandBarItemCollection nativeCommandBarItemCollection, Int32 index)
   at Sdl.Desktop.Platform.Implementation.CommandBars.SubCommandBarItem.Create(INativeCommandBarItemCollection nativeCommandBarItemCollection, Int32 index)
   at Sdl.Desktop.Platform.WinForms.IgRibbonTab.UpdateCommandBar(Boolean force)
   at Sdl.Desktop.Platform.WinForms.IgRibbonTab.Create(INativeCommandBarItemCollection nativeCommandBarItemCollection, Int32 index)
   at Sdl.Desktop.Platform.WinForms.IgRibbon.UpdateCommandBar(Boolean force)
   at Sdl.Desktop.Platform.Implementation.CommandBars.SubCommandBar.UpdateCommandBar(Boolean force)
   at Sdl.Desktop.Platform.Implementation.CommandBars.SubCommandBars.Update(Boolean force)
   at Sdl.Desktop.Platform.Implementation.CommandBars.SubCommandBars.set_VisibleInParent(Boolean value)
   at Sdl.Desktop.Platform.Implementation.ViewSite.OnActivate()
   at Sdl.Desktop.Platform.Implementation.StudioWindow.set_ActiveView(IViewReference value)]]></StackTrace>
    </InnerException>
  </Exception>
  <Environment>
    <ProductName>SDL Trados Studio</ProductName>
    <ProductVersion>14.0.0.0</ProductVersion>
    <EntryAssemblyFileVersion>14.1.6413.8</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 7 Home Premium </OperatingSystem>
    <ServicePack>Service Pack 1</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>Netbook-Shanti\Shanti</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>NETBOOK-SHANTI</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>5874352 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>

After restarting and doing the exact same thing again and again, the error didn't repeat itself, but when I then removed another group (Bookmarks) from the ribbon, the same or a similar error occurred in the same circumstances:

<SDLErrorDetails time="01/02/2018 10:47:25">
  <ErrorMessage>Failed to activate view 'Files'.</ErrorMessage>
  <Exception>
    <Type>Sdl.Desktop.Platform.StudioException, Sdl.Desktop.Platform, Version=5.0.0.0, Culture=neutral, PublicKeyToken=c28cdb26c445c888</Type>
    <HelpLink />
    <Source>Sdl.Desktop.Platform</Source>
    <HResult>-2146233088</HResult>
    <StackTrace><![CDATA[   at Sdl.Desktop.Platform.Implementation.StudioWindow.set_ActiveView(IViewReference value)
   at Sdl.TranslationStudio.Editor.EditorService.document_Closed(IDocument document)
   at Sdl.TranslationStudio.Api.Editor.DocumentEventHandler.Invoke(IDocument document)
   at Sdl.TranslationStudio.Api.Editor.AbstractInternalDocument.OnClosed()
   at Sdl.TranslationStudio.Editor.TranslationEditor.TranslatableDocument.OnClosed()
   at Sdl.TranslationStudio.Api.Editor.AbstractInternalDocument.CloseImpl()
   at Sdl.TranslationStudio.Api.Editor.AbstractInternalDocument.Close()
   at Sdl.TranslationStudio.Editor.TranslationEditor.TranslatableDocument.Close()
   at Sdl.TranslationStudio.Editor.EditorView.OnRemovingViewPart(IViewPartReference viewPartReference)
   at Sdl.Desktop.Platform.AbstractViewWithParts.Control_RemovingViewPart(IViewWithParts view, IViewPartReference viewPartReference, Boolean& cancel)
   at Sdl.Desktop.Platform.WinForms.DockingViewContentControl.OnRemovingViewPart(IViewPartReference viewPartReference)
   at Sdl.Desktop.Platform.WinForms.DockingViewContentControl.RemoveViewPartTab(IViewPartReference viewPartReference)
   at Sdl.Desktop.Platform.WinForms.DockingViewContentControl.RemoveViewPart(IViewPartReference viewPartReference)
   at Sdl.Desktop.Platform.WinForms.DockingViewContentControl.CloseTabButton.CloseTabButton_ElementClick(Object sender, UIElementEventArgs e)
   at Infragistics.Win.ButtonUIElementBase.FireClickEvent()
   at Infragistics.Win.ButtonWithTextUIElementBase.OnClick()
   at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)
   at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)
   at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
   at Infragistics.Win.UltraControlBase.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)]]></StackTrace>
    <InnerException>
      <Type>System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
      <ParamName>Key</ParamName>
      <HelpLink />
      <Source>Infragistics4.Shared.v14.2</Source>
      <HResult>-2147024809</HResult>
      <StackTrace><![CDATA[   at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKeyDoesNotExist(String key, IKeyedSubObject ignoreObject)
   at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKey(String key, IKeyedSubObject ignoreObject)
   at Infragistics.Win.UltraWinToolbars.RibbonGroupCollection.AddGroupHelper(RibbonGroup group, Int32 index, Boolean notify, Boolean validateKey)
   at Infragistics.Win.UltraWinToolbars.RibbonGroupCollection.Add(RibbonGroup group)
   at Sdl.Desktop.Platform.WinForms.IgRibbonGroup.Create(INativeCommandBarItemCollection nativeCommandBarItemCollection, Int32 index)
   at Sdl.Desktop.Platform.Implementation.CommandBars.SubCommandBarItem.Create(INativeCommandBarItemCollection nativeCommandBarItemCollection, Int32 index)
   at Sdl.Desktop.Platform.WinForms.IgRibbonTab.UpdateCommandBar(Boolean force)
   at Sdl.Desktop.Platform.WinForms.IgRibbonTab.Create(INativeCommandBarItemCollection nativeCommandBarItemCollection, Int32 index)
   at Sdl.Desktop.Platform.WinForms.IgRibbon.UpdateCommandBar(Boolean force)
   at Sdl.Desktop.Platform.Implementation.CommandBars.SubCommandBar.UpdateCommandBar(Boolean force)
   at Sdl.Desktop.Platform.Implementation.CommandBars.SubCommandBars.Update(Boolean force)
   at Sdl.Desktop.Platform.Implementation.CommandBars.SubCommandBars.set_VisibleInParent(Boolean value)
   at Sdl.Desktop.Platform.Implementation.ViewSite.OnActivate()
   at Sdl.Desktop.Platform.Implementation.StudioWindow.set_ActiveView(IViewReference value)]]></StackTrace>
    </InnerException>
  </Exception>
  <Environment>
    <ProductName>SDL Trados Studio</ProductName>
    <ProductVersion>14.0.0.0</ProductVersion>
    <EntryAssemblyFileVersion>14.1.6413.8</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 7 Home Premium </OperatingSystem>
    <ServicePack>Service Pack 1</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>Netbook-Shanti\Shanti</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>NETBOOK-SHANTI</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>5874352 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>

After another restart and a few tries, the error didn't occur again. I then opened a document and added the Advanced tab to the ribbon in the Editor View, restarted Studio and tried to open a document from the Files View. Now the message I quoted in the beginning of this post appeared:

<SDLErrorDetails time="01/02/2018 10:49:10">
  <ErrorMessage>The specified item is already part of a command bar.</ErrorMessage>
  <Exception>
    <Type>System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
    <ParamName />
    <HelpLink />
    <Source>Sdl.Desktop.Platform</Source>
    <HResult>-2147024809</HResult>
    <StackTrace><![CDATA[   at Sdl.Desktop.Platform.Implementation.CommandBars.AbstractCommandBar.InsertAfter(String itemId, ICommandBarItem item)
   at Sdl.Desktop.Platform.Implementation.CommandBars.SubCommandBar.InsertAfter(String itemId, ICommandBarItem item)
   at Sdl.TranslationStudio.Editor.TranslationEditor.Ribbons.RibbonTabHelper.InsertAfter(String itemId)
   at Sdl.TranslationStudio.Editor.TranslationEditor.TranslatableDocumentEditor.CreateRibbonActions(ICommandBars editorCommandBars, IActionService actionService, TranslatableDocumentEditorActionsHelper translatableDocumentEditorActionsHelper)
   at Sdl.TranslationStudio.Editor.TranslationEditor.TranslatableDocumentEditor.FillCommandBars(ICommandBars editorCommandBars)
   at Sdl.TranslationStudio.Editor.Shared.InternalEditorCommandBarProvider.FillCommandBars(ICommandBars commandBars)
   at Sdl.Desktop.Platform.AbstractViewWithParts.CreateSharedCommandBars(IViewPartReference viewPartReference)
   at Sdl.Desktop.Platform.AbstractViewWithParts.EnsureViewPartSite(IViewPartReference viewPartReference)
   at Sdl.Desktop.Platform.AbstractViewWithParts.Control_ShowingViewPart(IViewWithParts view, IViewPartReference viewPartReference)
   at Sdl.Desktop.Platform.WinForms.DockingViewContentControl.OnShowingViewPart(IViewPartReference viewPartReference)
   at Sdl.Desktop.Platform.WinForms.DockingViewContentControl.EnsureDockedViewPartControl(DockableControlPane pane)
   at Sdl.Desktop.Platform.WinForms.DockingViewContentControl.AddViewPartPane(IViewPartReference viewPartReference, DockingViewPartLayoutInfo layoutInfo)
   at Sdl.Desktop.Platform.WinForms.DockingViewContentControl.AddViewPart(IViewPartReference viewPartReference)
   at Sdl.Desktop.Platform.WinForms.DockingViewContentControl.Init(IViewWithParts view)
   at Sdl.Desktop.Platform.AbstractDockingView.OnInitControl()
   at Sdl.Desktop.Platform.AbstractViewWithParts.GetContentControl()
   at Sdl.Desktop.Platform.WinForms.ViewPane.set_ViewReference(IViewReference value)
   at Sdl.Desktop.Platform.WinForms.StudioWindowForm.UpdateActiveView()
   at Sdl.Desktop.Platform.Implementation.StudioWindow.set_ActiveView(IViewReference value)
   at Sdl.Desktop.Platform.WinForms.StudioWindowForm._explorerBar_ActiveGroupChanged(Object sender, GroupEventArgs e)
   at Infragistics.Win.UltraWinExplorerBar.UltraExplorerBar.OnActiveGroupChanged(GroupEventArgs e)
   at Infragistics.Win.UltraWinExplorerBar.UltraExplorerBar.FireEvent(UltraExplorerBarEventIds id, EventArgs e)
   at Infragistics.Win.UltraWinExplorerBar.UltraExplorerBar.set_ActiveGroup(UltraExplorerBarGroup value)
   at Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroupHeaderUIElement.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement)
   at Infragistics.Win.UIElement.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement)
   at Infragistics.Win.ControlUIElementBase.ProcessMouseDownHelper(Object sender, MouseEventArgs e)
   at Infragistics.Win.ControlUIElementBase.ProcessMouseDown(Object sender, MouseEventArgs e)
   at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
   at Infragistics.Win.UltraWinExplorerBar.UltraExplorerBar.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)]]></StackTrace>
  </Exception>
  <Environment>
    <ProductName>SDL Trados Studio</ProductName>
    <ProductVersion>14.0.0.0</ProductVersion>
    <EntryAssemblyFileVersion>14.1.6413.8</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 7 Home Premium </OperatingSystem>
    <ServicePack>Service Pack 1</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>Netbook-Shanti\Shanti</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>NETBOOK-SHANTI</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>5874352 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>

And this time the error kept repeating whenever I tried to open a document. Even just switching to Editor View without a document actually being opened triggered the error. Again the only way I could fix this, was to reset the ribbon. And by the way, I also noticed certain issues that others have already reported: after I removed Bookmarks from the ribbon, the Groupshare group returned to it. It's not a deal-breaker not to be able to customize the ribbon, but it would definitely be handy if it would work, especially working on a small-screen laptop.

Parents
  • Hi ,

    I have just tried to reproduce these twice and don't get any errors, so leads me to believe it's not so simple as this being a bug in everyone's machine. There can be many reasons for issues on a computer since the technologies used can depend on libraries in windows and these vary from one machine to another, and also the impact of drivers and other bits of software that might conflict under certain conditions that lead to a huge number of variables.

    Certainly the ribbon customisation has it's share of problems but the steps you have outlined here don't help me to reproduce the issue. If we can't repeat the problem then we can't fix anything as we don't know what to provide to development with a bug report. I note you use W7 and this may be a factor for you, I'm on 8.1. Mainstream support for W7 ended 3 years ago and for W8.1 it ended last month (I think). Extended support is available a little while longer but the reason I mention this is because the older it is the less likely we are to fix problems that occur only on that platform. We may eventually look at them if they are serious enough and climb up the priority list but I don't think this one falls into that category.

    But thank you for reporting this anyway, it's noted.

    Paul Filkin | RWS

    Design your own training!
    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Reply
  • Hi ,

    I have just tried to reproduce these twice and don't get any errors, so leads me to believe it's not so simple as this being a bug in everyone's machine. There can be many reasons for issues on a computer since the technologies used can depend on libraries in windows and these vary from one machine to another, and also the impact of drivers and other bits of software that might conflict under certain conditions that lead to a huge number of variables.

    Certainly the ribbon customisation has it's share of problems but the steps you have outlined here don't help me to reproduce the issue. If we can't repeat the problem then we can't fix anything as we don't know what to provide to development with a bug report. I note you use W7 and this may be a factor for you, I'm on 8.1. Mainstream support for W7 ended 3 years ago and for W8.1 it ended last month (I think). Extended support is available a little while longer but the reason I mention this is because the older it is the less likely we are to fix problems that occur only on that platform. We may eventually look at them if they are serious enough and climb up the priority list but I don't think this one falls into that category.

    But thank you for reporting this anyway, it's noted.

    Paul Filkin | RWS

    Design your own training!
    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Children
No Data