The property 'DpiChanged' doesn't exist on System.Windows.Window

オープン
#88 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
csharp
領域
desktop, tooling

調査の方向性

ICSharpCode.WpfDesign.XamlDom.XamlObject.FindOrCreateProperty から開始し、スタックトレースに記載された PropertyGrid.Reload の呼び出し経路をたどってください。報告された WPF デザイナーのシナリオを再現し、DpiChanged プロパティが存在しない場合でもワークベンチが終了しなくなったことを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Hi,

I am using SD in an Autodesk software called Revit, and I am experiencing this error:

SharpDevelop Version : 4.2.0.8783-27231549
.NET Version : 4.0.30319.42000
OS Version : Microsoft Windows NT 6.2.9200.0
Current culture : Invariant Language (Invariant Country) ()
Current UI language : en
Running as 64 bit process
Working Set Memory : 389192kb
GC Heap Memory : 195512kb

Unhandled exception terminated the workbench
Exception thrown:
System.ArgumentException: The property 'DpiChanged' doesn't exist on System.Windows.Window
Parameter name: propertyName
at ICSharpCode.WpfDesign.XamlDom.XamlObject.FindOrCreateProperty(String propertyName)
at ICSharpCode.WpfDesign.Designer.Xaml.XamlModelPropertyCollection.GetProperty(String name)
at ICSharpCode.WpfDesign.Designer.PropertyGrid.PropertyGrid.<>c__DisplayClass4.b__3(DesignItem item)
at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at ICSharpCode.WpfDesign.Designer.PropertyGrid.PropertyGrid.AddNode(MemberDescriptor md)
at ICSharpCode.WpfDesign.Designer.PropertyGrid.PropertyGrid.Reload()
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)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
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.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(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)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at ICSharpCode.SharpDevelop.Commands.WorkbenchStartup.Run(IList`1 fileList)
at ICSharpCode.SharpDevelop.Sda.CallHelper.RunWorkbenchInternal(Object settings)

---- Recent log messages:
09:06:53.857 [19] DEBUG - Removing part C:\ProgramData\Autodesk\Revit\Macros\2023\Revit\AppHookup\WPFs\Source\WPFs\Window1.xaml from compound class WPFs.Window1
09:06:53.857 [19] DEBUG - Second-to-last part removed (old part count = 2), overwriting compound with last part
09:06:53.857 [19] DEBUG - Adding existing class Window1 from Window1.xaml
09:06:53.857 [19] DEBUG - Creating compound for WPFs.Window1
09:06:53.858 [SDmain] DEBUG - ParseInformationUpdated C:\ProgramData\Autodesk\Revit\Macros\2023\Revit\AppHookup\WPFs\Source\WPFs\Window1.xaml new!=null:True
09:06:54.638 [SDmain] DEBUG - Removing part C:\ProgramData\Autodesk\Revit\Macros\2023\Revit\AppHookup\WPFs\Source\WPFs\Window1.xaml from compound class WPFs.Window1
09:06:54.638 [SDmain] DEBUG - Second-to-last part removed (old part count = 2), overwriting compound with last part
09:06:54.638 [SDmain] DEBUG - Adding existing class Window1 from Window1.xaml
09:06:54.638 [SDmain] DEBUG - Creating compound for WPFs.Window1
09:06:54.639 [SDmain] DEBUG - Removing part C:\ProgramData\Autodesk\Revit\Macros\2023\Revit\AppHookup\WPFs\Source\WPFs\Window1.xaml from compound class WPFs.Window1
09:06:54.639 [SDmain] DEBUG - Second-to-last part removed (old part count = 2), overwriting compound with last part
09:06:54.639 [SDmain] DEBUG - Adding existing class Window1 from Window1.xaml
09:06:54.639 [SDmain] DEBUG - Creating compound for WPFs.Window1
09:06:54.680 [SDmain] DEBUG - TypeResolutionService: AssemblyResolveEventHandler: ICSharpCode.WpfDesign.AddIn.resources, Version=4.2.0.8783, Culture=en, PublicKeyToken=null
09:06:54.680 [SDmain] DEBUG - TypeResolutionService: AssemblyResolveEventHandler: ICSharpCode.WpfDesign.AddIn.resources, Version=4.2.0.8783, Culture=en, PublicKeyToken=null
09:06:54.687 [SDmain] DEBUG - TypeResolutionService: AssemblyResolveEventHandler: ICSharpCode.WpfDesign.resources, Version=4.2.0.8783, Culture=en, PublicKeyToken=f829da5c02be14ee
09:06:54.687 [SDmain] DEBUG - TypeResolutionService: AssemblyResolveEventHandler: ICSharpCode.WpfDesign.resources, Version=4.2.0.8783, Culture=en, PublicKeyToken=f829da5c02be14ee
09:06:54.816 [SDmain] INFO - Unloading services...
09:06:54.816 [SDmain] INFO - CurrentProject changed to null
09:06:54.821 [SDmain] DEBUG - Removing part C:\ProgramData\Autodesk\Revit\Macros\2023\Revit\AppHookup\WPFs\Source\WPFs\ThisApplication.cs from compound class WPFs.ThisApplication
09:06:54.821 [SDmain] DEBUG - Second-to-last part removed (old part count = 2), overwriting compound with last part
09:06:54.821 [SDmain] DEBUG - Removing part C:\ProgramData\Autodesk\Revit\Macros\2023\Revit\AppHookup\WPFs\Source\WPFs\Window1.xaml from compound class WPFs.Window1
09:06:54.821 [SDmain] DEBUG - Second-to-last part removed (old part count = 2), overwriting compound with last part
09:06:54.859 [SDmain] INFO - Finished running workbench.
09:06:54.860 [SDmain] FATAL - System.ArgumentException: The property 'DpiChanged' doesn't exist on System.Windows.Window
Parameter name: propertyName
at ICSharpCode.WpfDesign.XamlDom.XamlObject.FindOrCreateProperty(String propertyName)
at ICSharpCode.WpfDesign.Designer.Xaml.XamlModelPropertyCollection.GetProperty(String name)
at ICSharpCode.WpfDesign.Designer.PropertyGrid.PropertyGrid.<>c__DisplayClass4.b__3(DesignItem item)
at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at ICSharpCode.WpfDesign.Designer.PropertyGrid.PropertyGrid.AddNode(MemberDescriptor md)
at ICSharpCode.WpfDesign.Designer.PropertyGrid.PropertyGrid.Reload()
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)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
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.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(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)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at ICSharpCode.SharpDevelop.Commands.WorkbenchStartup.Run(IList`1 fileList)
at ICSharpCode.SharpDevelop.Sda.CallHelper.RunWorkbenchInternal(Object settings)

---- Post-error application state information:
Installed 3rd party AddIns: [SharpDevelop 4.2.0.8783], [CodeAnalysis 0.0.0.0], [SourceAnalysis 0.0.0.0], [Unit Testing Addin 0.0.0.0], [C# Binding 0.0.0.0], [Python Binding 0.0.0.0], [Ruby Binding 0.0.0.0], [VB .NET Binding 0.0.0.0], [XAML binding 0.0.0.0], [Debugger 0.0.0.0], [AvalonEdit.AddIn 0.0.0.0], [Class Diagram 0.0.0.0], [Data Addin 0.0.0.0], [ILSpyAddIn 0.0.0.0], [Forms Designer 0.0.0.0], [HexEditor 0.0.0.0], [IconViewerAddIn 0.0.0.0], [Resource Editor 0.0.0.0], [WPF Designer AddIn 0.0.0.0], [XML Editor 0.0.0.0], [AddInManager 0.0.0.0], [Microsoft Help System v1.0], [PInvoke Add-in 0.0.0.0], [Regular expressions toolkit 0.0.0.0], [Hornung.ResourceToolkit 0.0.0.0], [Search & Replace 0.0.0.0], [SharpRefactoring 0.0.0.0]
ProjectService.OpenSolution:
ProjectService.CurrentProject:

Regards,

主要言語
C#
スター
1.1k
フォーク
281
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

icsharpcode/WpfDesigner のほかの issue

icsharpcode/WpfDesigner の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。