StackOverflowException on start application with Catel beta

Topics: Issues / bugs
Nov 7, 2012 at 6:34 AM
Edited Nov 7, 2012 at 6:36 AM

All applications with Catel beta  3.3.1211021824-beta crashing with StackOverflowException.

Last messages from Output:

 

11:31:58:815 => [DEBUG] [Catel.IoC.ServiceLocator] Registering type 'Catel.MVVM.IViewModelFactory' to instance of type 'Catel.MVVM.ViewModelFactory'
11:31:58:815 => [DEBUG] [Catel.IoC.TypeFactory] Cleared type constructor cache
11:31:58:815 => [DEBUG] [Catel.IoC.ServiceLocator] Registered type 'Catel.MVVM.IViewModelFactory' to instance of type 'Catel.MVVM.ViewModelFactory'
System.Windows.Data Error: 40 : BindingExpression path error: 'DirectDependency' property not found on 'object' ''MainWindow' (Name='')'. BindingExpression:Path=DirectDependency; DataItem='MainWindow' (Name=''); target element is 'MainWindow' (Name=''); target property is 'CrashDemo_Views_MainWindow_DirectDependency' (type 'Object')
11:31:58:940 => [DEBUG] [Catel.Windows.Controls.MVVMProviders.Logic.LogicBase] Constructed behavior 'WindowLogic' for 'MainWindow'
CrashDemo.vshost.exe Warning: 0 : 11:31:58:971 => [WARNING] [Catel.Windows.WindowExtensions] Cannot set owner window to itself, no owner window set

  I want to test new version, but can't. Any ideas why this happens?

 

Coordinator
Nov 7, 2012 at 9:20 AM

Can you please give me a repro as issue? I will create a work item from this discussion.

Coordinator
Nov 7, 2012 at 9:20 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Nov 7, 2012 at 11:43 AM

Hi Geert,

i've noticed in the log from Ivan that he also gets the same strange binding error as i do. Does Catel cause this issue? (Maybe Catel UserControl because the binding errors pop up when i show views?)

System.Windows.Data Error: 40 : BindingExpression path error: 'DirectDependency' property not found on 'object' ''MainWindow' (Name='')'. 
BindingExpression:Path=DirectDependency; DataItem='MainWindow' (Name=''); target element is 'MainWindow' (Name=''); target property is 'CrashDemo_Views_MainWindow_DirectDependency' (type 'Object')

Many Thanks!
Coordinator
Nov 7, 2012 at 5:22 PM

I cannot reproduce on Win8 / VS2012 :(

Nov 8, 2012 at 3:00 PM

I have these binding errors to DirectDependency, too.

samples:

System.Windows.Data Error: 40 : BindingExpression path error: 'DirectDependency' property not found on 'object' ''ContactReferenceInfoPersonDetailsView' (Name='')'. BindingExpression:Path=DirectDependency; DataItem='ContactReferenceInfoPersonDetailsView' (Name=''); target element is 'ContactReferenceInfoPersonDetailsView' (Name=''); target property is 'StartP_UI_ContactManagement_Views_ContactReferenceInfoPersonDetailsView_DirectDependency' (type 'Object')
System.Windows.Data Error: 40 : BindingExpression path error: 'DirectDependency' property not found on 'object' ''ContactReferenceInfoCorporationDetailsView' (Name='')'. BindingExpression:Path=DirectDependency; DataItem='ContactReferenceInfoCorporationDetailsView' (Name=''); target element is 'ContactReferenceInfoCorporationDetailsView' (Name=''); target property is 'StartP_UI_ContactManagement_Views_ContactReferenceInfoCorporationDetailsView_DirectDependency' (type 'Object')
System.Windows.Data Error: 40 : BindingExpression path error: 'DirectDependency' property not found on 'object' ''ContactReferenceInfoPersonDetailsView' (Name='')'. BindingExpression:Path=DirectDependency; DataItem='ContactReferenceInfoPersonDetailsView' (Name=''); target element is 'ContactReferenceInfoPersonDetailsView' (Name=''); target property is 'StartP_UI_ContactManagement_Views_ContactReferenceInfoPersonDetailsView_DirectDependency' (type 'Object')
seems strange to me...
Alex. 

Coordinator
Nov 8, 2012 at 4:40 PM

Looks like if you don't have .net fx 4.5 installed, this occurs. I hope this doesn't mean I cannot target 4.0 libraries on a machine that has 4.5 installed...

Nov 8, 2012 at 6:30 PM

I use VisualStudio 2012 and my project targets .NET 4.5

Coordinator
Nov 8, 2012 at 6:43 PM

Can you please compile catel on your machine and provide the exact line of code where it fails? I cannot reproduce it :(

Nov 9, 2012 at 1:04 PM

I am kind of busy at the moment.
Maybe @facos can sort this out?
Beyond the debug message, I cannot see any issues caused by this binding error.

alex. 

Nov 10, 2012 at 8:03 PM
Edited Nov 11, 2012 at 2:24 AM

Hi,

I do get these binding errors to DirectDependency, too.

It seems catel.windows.control.usercontrol has some problem, after I change system.windows.cotrol.usercontrol it works.

------

Hi,

I just download .net framework 4.5 for my windows 7, program does work now.

My problem is .net 4.5 framework 4.5 does not support Win XP, my customer computer still work at Win XP.

If Catel framework can work under .net 4.0 framework should better for me.

Eric.

Nov 13, 2012 at 5:44 PM
Edited Nov 13, 2012 at 6:45 PM

Hi Geert,

sorry for being late with my response....

I compiled the following Catel changeset (91bb56bcc3ad) with VS 2010 SP1, .NET 4.0 (only), Release, Server 2008 R2, x64...

When i execute my application i get a stackoverflow exception in DependencyPropertyChangedHelper.cs, Line 206, function GetHandlerDependencyPropertyName, PropertyName = "ActualWidth" ....

The Binding errors (DirectDependency) still exist in the new release....

I've uploaded the compiled catel binaries to the issue tracker...

Hope this helps you...

Thanks!

Coordinator
Nov 13, 2012 at 6:38 PM

Yes, we found some issues with the ActualWidth. We are trying to figure out how to prevent that :)

Thanks for the heads-up and your support, more news soon!

Coordinator
Nov 14, 2012 at 6:54 PM

Good news, the issue should be solved in the latest beta via nuget.

Nov 17, 2012 at 8:45 PM

Hi Geert,

thanks a lot for this fast fix. The latest nuget beta does not has the stackoverflow exception anymore...