Exception trying make reactoring "Move to class"

Bug reports.
hellboy81
Posts: 22
Joined: Sun Dec 10, 2017 8:52 pm

Exception trying make reactoring "Move to class"

Post by hellboy81 » Wed Feb 14, 2018 11:44 am

Ranorex Version: 7.2.0+git
.NET Runtime: 4.0

SD Version: Unknown

Strackrace:

Code: Select all

System.NotSupportedException: The given path's format is not supported.
---STACKTRACE---
System.NotSupportedException: The given path's format is not supported.
  System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath) +0x3e
  System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access,String fullPath,Boolean checkForDuplicates,Boolean needFullPath) +0x1f
  System.IO.File.GetAttributes(String path) +0x7
  ICSharpCode.SharpDevelop.FileService.IsFileReadOnly(String FileName) +0x8
  ICSharpCode.SharpDevelop.Gui.LockedViewsUpdateAutostart+<>c.<UpdateReadOnlyState>b__3_0(OpenedFile f) +0x0
  System.Linq.Enumerable.Any(IEnumerable`1 source,Func`2 predicate) +0x2c
  ICSharpCode.SharpDevelop.Gui.LockedViewsUpdateAutostart.UpdateReadOnlyState(IViewContent content) +0x2a
  ICSharpCode.SharpDevelop.Gui.LockedViewsUpdateAutostart.Workbench_ViewOpened(Object sender,ViewContentEventArgs e) +0x0
  ICSharpCode.SharpDevelop.Gui.ViewContentEventHandler.Invoke(Object sender,ViewContentEventArgs e) +0xffffffff
  ICSharpCode.SharpDevelop.Gui.WpfWorkbench.OnViewOpened(ViewContentEventArgs e) +0x8
  ICSharpCode.SharpDevelop.Gui.AvalonWorkbenchWindow.RegisterNewContent(IViewContent content) +0x60
  ICSharpCode.SharpDevelop.Gui.AvalonWorkbenchWindow+ViewContentCollection.InsertItem(Int32 index,IViewContent item) +0x8
  System.Collections.ObjectModel.Collection`1.Add(T item) +0x20
  ICSharpCode.SharpDevelop.Gui.AvalonDockLayout.ShowView(IViewContent content,Boolean switchToOpenedView) +0x7
  ICSharpCode.SharpDevelop.Gui.WpfWorkbench.ShowView(IViewContent content,Boolean switchToOpenedView) +0x2c
  ICSharpCode.SharpDevelop.Gui.WpfWorkbench.ShowView(IViewContent content) +0x0
  ICSharpCode.SharpDevelop.FileService.NewFile(String defaultName,Byte[] content) +0x90
  ICSharpCode.SharpDevelop.FileService.NewFile(String defaultName,String content) +0x0
  ICSharpCode.SharpDevelop.Refactoring.FindReferencesAndRenameHelper.MoveClassToFile(IClass c,String newFileName) +0xed
  SharpRefactoring.ContextActions.MoveClassToFile.Execute(EditorContext context) +0x0
  ICSharpCode.SharpDevelop.Refactoring.ContextAction.Execute() +0x0
  ICSharpCode.SharpDevelop.Refactoring.ContextActionCommand.Execute(Object parameter) +0x0
  MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource,Boolean userInitiated) +0x4a
  System.Windows.Controls.Primitives.ButtonBase.OnClick() +0x13
  System.Windows.Controls.Button.OnClick() +0x1a
  System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) +0x46
  System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender,MouseButtonEventArgs e) +0x1d
  System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler,Object genericTarget) +0x7
  System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler,Object target) +0x7
  System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target,RoutedEventArgs routedEventArgs) +0x30
  System.Windows.EventRoute.InvokeHandlersImpl(Object source,RoutedEventArgs args,Boolean reRaised) +0xe6
  System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender,RoutedEventArgs args,RoutedEvent newEvent) +0x65
  System.Windows.UIElement.OnMouseUpThunk(Object sender,MouseButtonEventArgs e) +0x3a
  System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler,Object genericTarget) +0x7
  System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler,Object target) +0x7
  System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target,RoutedEventArgs routedEventArgs) +0x30
  System.Windows.EventRoute.InvokeHandlersImpl(Object source,RoutedEventArgs args,Boolean reRaised) +0xe6
  System.Windows.UIElement.RaiseEventImpl(DependencyObject sender,RoutedEventArgs args) +0x57
  System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) +0x14
  System.Windows.UIElement.RaiseEvent(RoutedEventArgs args,Boolean trusted) +0x11
  System.Windows.Input.InputManager.ProcessStagingArea() +0x1ef
  System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) +0x24
  System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) +0x35
  System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd,InputMode mode,Int32 timestamp,RawMouseActions actions,Int32 x,Int32 y,Int32 wheel) +0x210
  System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd,WindowMessage msg,IntPtr wParam,IntPtr lParam,Boolean& handled) +0x0
  System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,Boolean& handled) +0x4a
  MS.Win32.HwndWrapper.WndProc(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,Boolean& handled) +0x30
  MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) +0x36
  System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback,Object args,Int32 numArgs) +0x77
  System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source,Delegate callback,Object args,Int32 numArgs,Delegate catchHandler) +0x2

---ORIGINAL STACKTRACE---
System.NotSupportedException: The given path's format is not supported.
   at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
   at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
   at System.IO.File.GetAttributes(String path)
   at ICSharpCode.SharpDevelop.FileService.IsFileReadOnly(String FileName)
   at ICSharpCode.SharpDevelop.Gui.LockedViewsUpdateAutostart.<>c.<UpdateReadOnlyState>b__3_0(OpenedFile f)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at ICSharpCode.SharpDevelop.Gui.LockedViewsUpdateAutostart.UpdateReadOnlyState(IViewContent content)
   at ICSharpCode.SharpDevelop.Gui.LockedViewsUpdateAutostart.Workbench_ViewOpened(Object sender, ViewContentEventArgs e)
   at ICSharpCode.SharpDevelop.Gui.ViewContentEventHandler.Invoke(Object sender, ViewContentEventArgs e)
   at ICSharpCode.SharpDevelop.Gui.WpfWorkbench.OnViewOpened(ViewContentEventArgs e)
   at ICSharpCode.SharpDevelop.Gui.AvalonWorkbenchWindow.RegisterNewContent(IViewContent content)
   at ICSharpCode.SharpDevelop.Gui.AvalonWorkbenchWindow.ViewContentCollection.InsertItem(Int32 index, IViewContent item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at ICSharpCode.SharpDevelop.Gui.AvalonDockLayout.ShowView(IViewContent content, Boolean switchToOpenedView)
   at ICSharpCode.SharpDevelop.Gui.WpfWorkbench.ShowView(IViewContent content, Boolean switchToOpenedView)
   at ICSharpCode.SharpDevelop.Gui.WpfWorkbench.ShowView(IViewContent content)
   at ICSharpCode.SharpDevelop.FileService.NewFile(String defaultName, Byte[] content)
   at ICSharpCode.SharpDevelop.FileService.NewFile(String defaultName, String content)
   at ICSharpCode.SharpDevelop.Refactoring.FindReferencesAndRenameHelper.MoveClassToFile(IClass c, String newFileName)
   at SharpRefactoring.ContextActions.MoveClassToFile.Execute(EditorContext context)
   at ICSharpCode.SharpDevelop.Refactoring.ContextAction.Execute()
   at ICSharpCode.SharpDevelop.Refactoring.ContextActionCommand.Execute(Object parameter)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Issue Number on SharpDevelop github issue tracker: #805 (direct link cannot be posted due on forum account restrictuions)

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

Re: Exception trying make reactoring "Move to class"

Post by odklizec » Wed Feb 14, 2018 12:47 pm

Hi,

At first, Ranorex 7.2.0 is obsolete and no longer supported. Please try to reproduce your problem with 7.2.1 and even better, 8.0.1.
At next, could you please post exact steps what you are trying to do and ideally, also with sample solution? You will most probably not be able to upload an attachment (due to "new user" account restriction). So please use a 3rd-party file sharing service (like onedrive or dropbox) and here post a link (it should work without www, http or with some added spaces ;)).
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