We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date


what I want to achieve is a bit complex but I always get the exception in the subject.
My goal is to create a page having a SfPopupLayout, a SfNavigationDrawer and a SfListView nested in another SfListView. If I create the page piece by piece, starting from the nested SfListView, I can compile and view the result until I put the last step, despite what this step is: SfListView + SfListView + SfNavigationDrawer works, SfListView + SfListView + SfPopupLayout works, SfListView + SfListView + SfNavigationDrawer + SfPopupLayout doesn't work, SfListView + SfListView + SfPopupLayout + SfNavigationDrawer doesn't work.

The listviews read data from a SQLite database and everything is binded in MVVM pattern.

Here's the relevant part of my code:

<sfPopup:SfPopupLayout x:Name="popUpLayout" HorizontalOptions="FillAndExpand" IsOpen="{Binding IsOpenAlert, Mode=TwoWay}" VerticalOptions="FillAndExpand">
<sfPopup:SfPopupLayout.Content HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<navigationdrawer:SfNavigationDrawer x:Name="navigationDrawer" BackgroundColor="{StaticResource AppBackgroundColor}" DrawerHeaderHeight="200" DrawerWidth="300" HorizontalOptions="FillAndExpand" IsOpen="{Binding IsOpen, Mode=TwoWay}" VerticalOptions="FillAndExpand">
<Grid BackgroundColor="{StaticResource AppBackgroundColor}">
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<StackLayout Margin="0" Padding="0" HorizontalOptions="FillAndExpand" Orientation="Horizontal" VerticalOptions="FillAndExpand">
<Button />
<Label />
<StackLayout Grid.Column="1" Margin="0" Padding="0" HorizontalOptions="FillAndExpand" Orientation="Horizontal" VerticalOptions="FillAndExpand">
<Button />
<Button />
<Button />
<listView:SfListView x:Name="listView" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,20,0,0" AutoFitMode="Height" ItemsSource="{Binding ListaStati}" Loaded="ListView_Loaded">
<Grid Margin="0,0,0,15">
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<StackLayout Margin="0" Padding="20,0,0,0" HorizontalOptions="FillAndExpand" Orientation="Horizontal" VerticalOptions="FillAndExpand">
<Image Aspect="AspectFit" Source="{Binding Immagine}" VerticalOptions="CenterAndExpand" />
<Label Margin="10,0,0,0" FontAttributes="Bold" FontSize="Medium" Text="{Binding DescStato}" VerticalOptions="CenterAndExpand" VerticalTextAlignment="Center" />
<ctrl:ExtendedListView Grid.Row="1" AutoFitMode="Height" HeightRequest="{Binding InnerListHeight}" ItemSize="200" ItemsSource="{Binding Audits}" Orientation="Horizontal" SelectionMode="SingleDeselect">
<local:AuditViewTabletMode />
<local:PopUpLogout AcceptButtonText="{i18n:Translate Text=ConfirmButtonText}" AcceptCommand="{Binding AcceptButtonCustomCommand}" DeclineButtonText="{i18n:Translate Text=CancelButtonText}" DeclineCommand="{Binding DeclineButtonCustomCommand}" />

The ExtendedListView class is taken from one of your examples (here)

How can I achieve the result?

Thanks in advance,

5 Replies

JN Jayaleshwari N Syncfusion Team December 7, 2018 09:30 AM UTC

Hi Matteo,  
Thanks for Contacting Syncfusion Support. 
We have checked the reported query “Java.Lang.StackOverflowError” from our side. We have prepared the sample based on the template given by you and checked the issue. Unfortunately, the reported crash does not replicate at our end. Listview is loaded in the view as expected.    
We have attached the tested sample for your reference and you can download the same from the below link.    
Can you please check the reported issue occurs in our sample also? If not, we would request you to modify our sample to replicate the issue which would highly help us to analyze the query better and provide an appropriate solution.     
Jayaleshwari N 

MC Matteo Comi December 11, 2018 11:27 AM UTC

I think I solved it, thanks.
I'm waiting for a physical Android device to arrive and I will test it there.

JN Jayaleshwari N Syncfusion Team December 12, 2018 07:13 AM UTC

Hi Matteo, 
Thanks for the update. 
We will wait to hear from you. 
Jayaleshwari N. 

FM filler mark December 9, 2019 04:40 AM UTC

A StackOverflowError is simply signals that there is no more memory available. It is to the stack what an OutOfMemoryError is to the heap: it simply signals that there is no more memory available. JVM has a given memory allocated for each stack of each thread, and if an attempt to call a method happens to fill this memory, JVM throws an error. Just like it would do if you were trying to write at index N of an array of length N. No memory corruption can happen. The stack can not write into the heap.

The common cause for a stackoverflow is a bad recursive call. Typically, this is caused when your recursive functions doesn't have the correct termination condition, so it ends up calling itself forever. Or when the termination condition is fine, it can be caused by requiring too many recursive calls before fulfilling it.

Here's an example:

public class Overflow {
    public static final void main(String[] args) {

That function calls itself repeatedly with no termination condition. Consequently, the stack fills up because each call has to push a return address on the stack, but the return addresses are never popped off the stack because the function never returns, it just keeps calling itself.

GP Gnana Priya Namasivayam Syncfusion Team December 9, 2019 12:34 PM UTC

Hi Filler Mark, 
Can you please let us know whether you have shared the suggestion for Matteo or provided suggestion on our side. We are just confirming whether you need any help from our side regarding the reported issue in this forum. 
If any kindly let us know. We will happy to help you as always. 
Gnana Priya N 

Live Chat Icon For mobile
Up arrow icon