The "Unexpected exception encountered" window is displayed when opening any file in project

Experiences, small talk, and other automation gossip.
ngocRose
Posts: 4
Joined: Thu Jun 24, 2021 9:24 am

The "Unexpected exception encountered" window is displayed when opening any file in project

Post by ngocRose » Fri Jul 23, 2021 4:02 am

Hi everyone,
I recently encountered the following problem:
after i merge the code and run the script i cant open any files in my project it shows the window like attached image.
I tried reinstalling ranorex but it still doesn't work
ranorex: 9.3.2
OS: windows
Please help me, many thanks
Ranorex: 9.3.2
OS: Windows 10
Details of error

Code: Select all

System.NullReferenceException: Object reference not set to an instance of an object.
---STACKTRACE---
System.NullReferenceException: Object reference not set to an instance of an object.
  ICSharpCode.SharpDevelop.Gui.AvalonDockLayout.get_WorkbenchWindows() +0x0
  ICSharpCode.SharpDevelop.Gui.WpfWorkbench.get_WorkbenchWindowCollection() +0xd
  ICSharpCode.SharpDevelop.Gui.WpfWorkbench+<>c__DisplayClass55_0.<get_ViewContentCollection>b__0() +0x0
  ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.SafeThreadCall(Action method) +0x11
  ICSharpCode.SharpDevelop.Gui.WpfWorkbench.get_ViewContentCollection() +0x2a
  ICSharpCode.SharpDevelop.FileService.GetOpenFile(String fileName,Type viewContentType) +0x0
  ICSharpCode.SharpDevelop.FileService.OpenFile(String fileName,Boolean switchToOpenedView,FileOperationResult& fileResult) +0x12
  ICSharpCode.SharpDevelop.Project.FileNode.ActivateItem() +0x42
  ICSharpCode.SharpDevelop.Gui.ExtTreeView.OnMouseDoubleClick(MouseEventArgs e) +0x22
  System.Windows.Forms.TreeView.WndProc(Message& m) +0x5a4
  Ranorex.Controls.ScrollTreeView.WndProc(Message& m) +0x0
  System.Windows.Forms.Control+ControlNativeWindow.OnMessage(Message& m) +0xc
  System.Windows.Forms.Control+ControlNativeWindow.WndProc(Message& m) +0x9a
  System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam) +0x25
  MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) +0xffffffff
  System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) +0x40
  System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) +0x65
  System.Windows.Application.RunDispatcher(Object ignore) +0x24
  System.Windows.Application.RunInternal(Window window) +0xee
  System.Windows.Application.Run(Window window) +0x1f
  ICSharpCode.SharpDevelop.Commands.WorkbenchStartup.Run(IList`1 fileList) +0x1c6
  ICSharpCode.SharpDevelop.Sda.CallHelper.RunWorkbenchInternal(Object settings) +0x3a
  ICSharpCode.SharpDevelop.Sda.CallHelper.RunWorkbench(WorkbenchSettings settings) +0x3b
  ICSharpCode.SharpDevelop.Sda.SharpDevelopHost.RunWorkbench(WorkbenchSettings settings) +0x1e
  ICSharpCode.SharpDevelop.SharpDevelopMain.RunApplication() +0x18b
  ICSharpCode.SharpDevelop.SharpDevelopMain.Run() +0x99
  ICSharpCode.SharpDevelop.SharpDevelopMain.Main(String[] args) +0x28

---ORIGINAL STACKTRACE---
System.NullReferenceException: Object reference not set to an instance of an object.
   at ICSharpCode.SharpDevelop.Gui.AvalonDockLayout.get_WorkbenchWindows()
   at ICSharpCode.SharpDevelop.Gui.WpfWorkbench.get_WorkbenchWindowCollection()
   at ICSharpCode.SharpDevelop.Gui.WpfWorkbench.<>c__DisplayClass55_0.<get_ViewContentCollection>b__0()   at ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.STAThreadCaller.Call(WaitHandle cancelWaitHandle, Delegate method, Object[] arguments, Int32 skipFrams)
   at ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.STAThreadCaller.Call(Delegate method, Object[] arguments)
   at ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.SafeThreadCall(Action method)
   at ICSharpCode.SharpDevelop.Gui.WpfWorkbench.get_ViewContentCollection()
   at ICSharpCode.SharpDevelop.FileService.GetOpenFile(String fileName, Type viewContentType)
   at ICSharpCode.SharpDevelop.FileService.OpenFile(String fileName, Boolean switchToOpenedView, FileOperationResult& fileResult)
   at ICSharpCode.SharpDevelop.Project.FileNode.ActivateItem()
   at ICSharpCode.SharpDevelop.Gui.ExtTreeView.OnMouseDoubleClick(MouseEventArgs e)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at Ranorex.Controls.ScrollTreeView.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)

Attachments
popup.PNG
popup.PNG (44.22 KiB) Viewed 402 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7062
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: The "Unexpected exception encountered" window is displayed when opening any file in project

Post by odklizec » Fri Jul 23, 2021 9:48 pm

Duplicated post. Already answered here:
the-unexpected-exception-encountered-wi ... 20034.html
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration