Autor Beitrag
ebber
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 239
Erhaltene Danke: 1

Win XP, Win 7
C# (VS 2010), Delphi (2007), Expression 4
BeitragVerfasst: So 07.03.10 01:14 
Hallo,

ich bekomme diese Exception:

ausblenden Quelltext
1:
The specified Visual is not an ancestor of this Visual.					


bei einem
ausblenden C#-Quelltext
1:
SomeICollectionView.Refresh();					

Welche an WPF DataGrid gebindet ist, aber nur wenn ich mein Fenster minimiert/versteckt habe. Also die Exception tritt nicht in dieser Zeile auf, es kann dazu kein Code angezeigt werden...

Irgendwie kann ich mir das beim besten Willen nicht erklären, auch nicht wo denn das Problem herkommen könnte. Kann mir da irgendjemand in irgendeine Richtung weiterhelfen?

MfG
Kha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: So 07.03.10 13:52 
user profile iconebber hat folgendes geschrieben Zum zitierten Posting springen:
Also die Exception tritt nicht in dieser Zeile auf, es kann dazu kein Code angezeigt werden...
Na dann schau mal im "Call Stack"-Fenster nach, welche Methode es wirklich ist (ggf. erst "Just My Code" in den Debugging-Optionen deaktivieren). Ich tippe einfach mal auf einen Bug im DataGrid, vielleicht hilft dir bei der Methode dann auch der Reflector weiter.

_________________
>λ=
ebber Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 239
Erhaltene Danke: 1

Win XP, Win 7
C# (VS 2010), Delphi (2007), Expression 4
BeitragVerfasst: So 07.03.10 18:52 
Ich wollte mal den besagten Haken "Just My Code" entfernen. Das hat auch funktioniert :)
Nach dem built startet mein Programm dann aber nicht. VS kommt dann irgendwie in eine endlosschleife. Seltsame Sache?

Aufjedenfall habe ich hier den Stack Trace:

ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
   at System.Windows.Media.Visual.TrySimpleTransformToAncestor(Visual ancestor, Boolean inverse, GeneralTransform& generalTransform, Matrix& simpleTransform)
   at System.Windows.Media.Visual.TransformToAncestor(Visual ancestor)
   at System.Windows.Controls.DataGridCellsPanel.ComputeCellsPanelHorizontalOffset()
   at System.Windows.Controls.DataGridHelper.GetParentCellsPanelHorizontalOffset(IProvideDataGridColumn cell)
   at System.Windows.Controls.DataGrid.InvalidateCellsPanelHorizontalOffset(Object args)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext 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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(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.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at er.App.Main() in E:\er\obj\Debug\App.g.cs:line 0
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()


wirklich was anderes ist in der Exception auch nicht zu sehen.

Aber wenn du sagst Bug. Vielleicht sollte ich mal von der Beta auf den RC umsteigen.
ebber Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 239
Erhaltene Danke: 1

Win XP, Win 7
C# (VS 2010), Delphi (2007), Expression 4
BeitragVerfasst: Mo 08.03.10 23:51 
Meine Idee am Ende hat das Problem wohl gelöst. Nach dem Upadte auf .Net 4 RC tritt das Problem nicht mehr auf.

Hätte ich eigentlich schon länger machen sollen.

Trotzdem Danke.

MfG