This is a migrated thread and some comments may be shown as answers.

[Solved] Bug: Out of stack space error

4 Answers 34 Views
Pagination for HTML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Max
Top achievements
Rank 1
Max asked on 14 Sep 2014, 06:37 AM
Hi

I develop an application that uses flipview and repeater inside the flipView. So, my model contains a text field (it is showed inside the flipview) and a list (it is showed inside the repeater)
When I assign a rad pagination control to the flipview, the application crashes with 'Out of stack space' error. it happens due to the list in my model. If I remove
the list from model, it works well.

The issue can be easily reproduced. Source code below has been taken from Rad Pagination control demo. I just added lines ##4 and 12.

01.var imageData = [],
02.        baseImageUrl = "/examples/Pagination/FirstLook/images/",
03.        pagination, template,
04.        nums = [{ name: 1 }, { name: 2 }, { name: 3 }, { name: 4 }];
05. 
06.//generate image URLs
07.for (var i = 1; i <= 6; i++)
08.{
09.    imageData.push({
10.        imageUrl: baseImageUrl + i + ".jpg",
11.        thumbnail: baseImageUrl + i + "s.jpg",
12.        arr: new WinJS.Binding.List(nums)
13.    });
14.}


Just update \Telerik\UI for Windows 8.1 HTML Q1 2014\Demos\examples\Pagination\FirstLook\default.js file with changes above and run the app - it will crash

Thanks!

4 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetina
Telerik team
answered on 17 Sep 2014, 02:52 PM
Hello Max,

This happens because of the way RadPagination handles data taken from the FlipView source (it builds its own hierarchy of observable objects). You can easily prevent RadPagination from trying to process a specific field by prefixing it with "_". This is needed only for fields containing complex data like the BindingList type.

imageData.push({
    imageUrl: baseImageUrl + i + ".jpg",
    thumbnail: baseImageUrl + i + "s.jpg",
    _arr: new WinJS.Binding.List(nums)
});



Regards,
Tsvetina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Max
Top achievements
Rank 1
answered on 17 Sep 2014, 09:49 PM
Thanks for the workaround. But are you going to fix this issue?
0
Tsvetina
Telerik team
answered on 23 Sep 2014, 09:59 AM
Hello Max,

We have logged the bug in our system but we cannot give you a timeframe for when it will be fixed. Is the problem critical for your development and is the fix good for use for now? As long as you do not need the data from the inner BindingList for your RadPagination template, you should be able to ignore this piece of data within the pagination logic.

Regards,
Tsvetina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Max
Top achievements
Rank 1
answered on 25 Sep 2014, 02:44 AM
Thanks, the workaround works for me.
It's not critical, bur requires to perform changes in code and markup
Tags
Pagination for HTML
Asked by
Max
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Max
Top achievements
Rank 1
Share this question
or