Cross-thread operation not valid: Control '_noFilesLabel' accessed from a thread other than the thread it was created on.

Hi,

I tried to debug our plugin on Trados2021. Then i got following exception during debug session.

According to exception message, _noFilesLabel is updated by other thread. 

I checked our plugin and our plugin doesn't have _noFilesLabel  control. I think that FileDetailsViewPartControl has this control and it updated incorrectly.

Is it bug of Trados?

Is there any workarounds to prevent exception from trados controls ?

System.InvalidOperationException
HResult=0x80131509
Message=Cross-thread operation not valid: Control '_noFilesLabel' accessed from a thread other than the thread it was created on.
Source=System.Windows.Forms
StackTrace:
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at Sdl.TranslationStudio.ProjectManagement.FilesView.FileDetailsViewPartControl.RefreshContent()
at Sdl.TranslationStudio.ProjectManagement.FilesView.FileDetailsViewPartControl.set_Files(IProjectFile[] value)
at Sdl.TranslationStudio.ProjectManagement.FilesView.FileDetailsViewPart._service_SelectedFilesChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at Sdl.TranslationStudio.ProjectManagement.FilesView.FilesViewService.OnSelectedFilesChanged()
at Sdl.TranslationStudio.ProjectManagement.FilesView.FilesViewService._controller_SelectedFilesChanged(Object sender, EventArgs e)
at Sdl.TranslationStudio.Common.Files.FileDataController.OnSelectedFilesChanged(DataList list)
at Sdl.Desktop.Common.DataList.OnPermanentSelectedRowsChanged()
at Sdl.Desktop.Common.DataList._selectiontimer_Tick(Object o)
at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()
at System.Threading.TimerQueue.AppDomainTimerCallback(Int32 id)

Parents Reply Children
No Data