@html.raw(model.scheduler.generateHTML()) stackoverflow

I’m currently using the CarRental example as the basis for an event booking project. This has been working fine since the “evaluation expired” issue was resolved (Thank you!) but now I find that a stackoverflow error is being generated when calling @html.raw(model.scheduler.generateHTML()).

I’ve tried to insert a break point to see where & when precisely this is being triggered but I’m having no joy.

Has this occurred to anyone before?

Any suggestions would be welcomed.

Thanks in advance.

Derek

Hello,
do you get this exception on an unmodified demo, or does it happen in your application?
I’ve just runned both versions of CarRent applications (MVC3 and MVC5), both seemed to work normally.

One possible reason is that if you load a resources into Timeline and Units view, and that resources model can have two-side relations with another table. So the model class has a property that refers to the related instance of another Model which in it’s turn has a link to that object as well, which creates a cyclic link when the data is serialized to JSON.
For example such models:[code]class Category
{

public IEnunerable Events { get; set;}
}

class Event
{

public Category Category { get; set;}
}[/code]
As a solution, you can add a serialization attribute in order to make scheduler skip such properties
scheduler-net.com/docs/loading-d … the_client[code]class Category
{

[DHXJson(Ignore=true)]
public IEnunerable Events { get; set;}
}

class Event
{

[DHXJson(Ignore=true)]
public Category Category { get; set;}
}[/code]