Bug 59091 - StackOverflow Exception occur while using ListView
Summary: StackOverflow Exception occur while using ListView
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.4.0
Hardware: PC Mac OS
: Normal blocker
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on: 60966
Blocks:
  Show dependency tree
 
Reported: 2017-08-29 10:52 UTC by Paul Anderson
Modified: 2017-12-23 18:01 UTC (History)
6 users (show)

Tags: rotation, listview, ac
Is this bug a regression?: Yes
Last known good build:


Attachments
Issue reproducing Sample (331.89 KB, application/zip)
2017-08-29 10:52 UTC, Paul Anderson
Details
Sample (1.32 MB, application/zip)
2017-11-14 12:45 UTC, Paul Anderson
Details
Device Log (215.29 KB, text/plain)
2017-11-20 21:09 UTC, Chris King
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 59091 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Paul Anderson 2017-08-29 10:52:45 UTC
Created attachment 24453 [details]
Issue reproducing Sample

I have implemented the Syncfusion SfCalendar Component inside the ListView HeaderTemplate and it was work good in higher resolution Android devices. while checking with Android Version 4.2 and below version application gets crash with "StackOverFlow Exception" while changing the device orientation. 

Also without Listview this issue has not occur.

StackTrace Details:

07-28 09:45:13.421 D/android.widget.GridLayout(15474): horizontal constraints: x7-x0>=800, x7-x6<=114, x6-x5<=114, x5-x4<=114, x4-x3<=114, x3-x2<=114, x2-x1<=114, x1-x0<=114 are inconsistent; permanently removing: x7-x6<=114. 
07-28 09:45:13.421 D/android.widget.GridLayout(15474): vertical constraints: y1-y0>=265, y1-y0<=44 are inconsistent; permanently removing: y1-y0<=44. 
07-28 09:45:13.437 D/android.widget.GridLayout(15474): horizontal constraints: x7-x0>=800, x7-x6<=114, x6-x5<=114, x5-x4<=114, x4-x3<=114, x3-x2<=114, x2-x1<=114, x1-x0<=114 are inconsistent; permanently removing: x7-x6<=114. 
07-28 09:45:13.437 D/android.widget.GridLayout(15474): vertical constraints: y1-y0>=265, y1-y0<=44 are inconsistent; permanently removing: y1-y0<=44. 
07-28 09:45:13.437 D/android.widget.GridLayout(15474): horizontal constraints: x7-x0>=800, x7-x6<=114, x6-x5<=114, x5-x4<=114, x4-x3<=114, x3-x2<=114, x2-x1<=114, x1-x0<=114 are inconsistent; permanently removing: x7-x6<=114. 
07-28 09:45:13.444 D/android.widget.GridLayout(15474): vertical constraints: y1-y0>=265, y1-y0<=44 are inconsistent; permanently removing: y1-y0<=44. 
07-28 09:45:13.444 D/android.widget.GridLayout(15474): horizontal constraints: x7-x0>=800, x7-x6<=114, x6-x5<=114, x5-x4<=114, x4-x3<=114, x3-x2<=114, x2-x1<=114, x1-x0<=114 are inconsistent; permanently removing: x7-x6<=114. 
07-28 09:45:13.444 D/android.widget.GridLayout(15474): vertical constraints: y1-y0>=265, y1-y0<=44 are inconsistent; permanently removing: y1-y0<=44. 
07-28 09:45:13.460 D/android.widget.GridLayout(15474): horizontal constraints: x7-x0>=800, x7-x6<=114, x6-x5<=114, x5-x4<=114, x4-x3<=114, x3-x2<=114, x2-x1<=114, x1-x0<=114 are inconsistent; permanently removing: x7-x6<=114. 
07-28 09:45:13.460 D/android.widget.GridLayout(15474): vertical constraints: y1-y0>=265, y1-y0<=44 are inconsistent; permanently removing: y1-y0<=44. 
07-28 09:45:13.460 D/android.widget.GridLayout(15474): horizontal constraints: x7-x0>=800, x7-x6<=114, x6-x5<=114, x5-x4<=114, x4-x3<=114, x3-x2<=114, x2-x1<=114, x1-x0<=114 are inconsistent; permanently removing: x7-x6<=114. 
07-28 09:45:13.460 D/android.widget.GridLayout(15474): vertical constraints: y1-y0>=265, y1-y0<=44 are inconsistent; permanently removing: y1-y0<=44. 
07-28 09:45:13.507 D/AbsListView(15474): unregisterIRListener() is called 
07-28 09:45:13.523 I/dalvikvm(15474): threadid=1: stack overflow on call to Landroid/text/TextLine;.measure:FIZL
07-28 09:45:13.523 I/dalvikvm(15474):   method requires 124+20+24=168 bytes, fp is 0x40d91388 (136 left)
07-28 09:45:13.523 I/dalvikvm(15474):   expanding stack end (0x40d91300 to 0x40d91000)
07-28 09:45:13.523 I/dalvikvm(15474): Shrank stack (to 0x40d91300, curFrame is 0x40d916e8)
07-28 09:45:13.530 D/AndroidRuntime(15474): Shutting down VM
07-28 09:45:13.530 W/dalvikvm(15474): threadid=1: thread exiting with uncaught exception (group=0x40f4d960)
07-28 09:45:18.288 D/dalvikvm(15474): GC_CONCURRENT freed 289K, 13% free 9946K/11412K, paused 6ms+13ms, total 100ms
07-28 09:45:18.351 E/AndroidRuntime(15474): FATAL EXCEPTION: main
07-28 09:45:18.351 E/AndroidRuntime(15474): java.lang.StackOverflowError
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.text.TextLine.metrics(TextLine.java:472)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.text.Layout.getLineExtent(Layout.java:993)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.text.Layout.drawText(Layout.java:344)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.text.Layout.draw(Layout.java:220)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.text.BoringLayout.draw(BoringLayout.java:400)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.widget.TextView.onDraw(TextView.java:5780)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14636)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13568)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13612)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14349)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.drawChild(ViewGroup.java:3155)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3024)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13566)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13612)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14349)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.drawChild(ViewGroup.java:3155)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3024)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14639)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.widget.FrameLayout.draw(FrameLayout.java:467)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13568)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13612)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14349)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.drawChild(ViewGroup.java:3155)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3024)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14639)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.widget.FrameLayout.draw(FrameLayout.java:467)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13568)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13612)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14349)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.drawChild(ViewGroup.java:3155)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3024)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13566)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13612)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14349)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.drawChild(ViewGroup.java:3155)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3024)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13566)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13612)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14349)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.drawChild(ViewGroup.java:3155)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3024)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13566)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13612)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14349)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.drawChild(ViewGroup.java:3155)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3024)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13566)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13612)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14349)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.drawChild(ViewGroup.java:3155)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3024)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13566)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13612)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14349)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.drawChild(ViewGroup.java:3155)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3024)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13566)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13612)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14349)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.drawChild(ViewGroup.java:3155)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3024)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13566)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13612)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14349)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.drawChild(ViewGroup.java:3155)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3024)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14639)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.widget.FrameLayout.draw(FrameLayout.java:467)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13568)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.java:13612)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14349)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.drawChild(ViewGroup.java:3155)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3024)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.draw(View.java:14639)
07-28 09:45:18.351 E/AndroidRuntime(15474): at android.view.View.getDisplayList(View.jav
07-28 09:45:18.484 D/dalvikvm(15474): GC_CONCURRENT freed 390K, 15% free 9960K/11584K, paused 6ms+20ms, total 107ms
07-28 09:45:35.921 I/Process (15474): Sending signal. PID: 15474 SIG: 9
Comment 1 Paul DiPietro [MSFT] 2017-08-30 15:43:35 UTC
I've run this on an emulator against 4.2.2/API 17 using what I believe is the same resolution as an S3 Mini (which is mentioned in the code) and I cannot reproduce an actual crash on 2.3.4 or the 2.4.0-pre2 builds. Uncommenting the commented code causes the calendar to disappear from the view, but there is still no apparent crashing of the app. Is there any more information you could possibly provide in this case? Do you experience any difference in using an emulator with a similar resolution versus an actual device?
Comment 2 Hines Vaughan III 2017-08-30 20:41:14 UTC
Did you switch orientation from portrait to landscape and back to portrait? That would always cause it to crash for me on an actual device at least.
Comment 3 Paul DiPietro [MSFT] 2017-08-30 21:13:58 UTC
I apologize for not taking note of that part. It did do it, but upon rotating back from landscape. I will see that we have this looked into.
Comment 4 Hines Vaughan III 2017-10-13 18:44:19 UTC
Thank you for looking into it. Any updates on this?
Comment 5 Chris King 2017-11-10 21:18:46 UTC
What feed provides the calendar nuget?
Comment 7 Chris King 2017-11-11 00:42:16 UTC
I don't reproduce the crash on a 4.2 VS Windows Android Emulator with XF latest stable. I open the app, rotate left, then right, but no crash. Do I need to modify the repro? Un-comment something?
Comment 8 Paul Anderson 2017-11-14 12:44:32 UTC
Hi Chris,

I have checked the reported issue in Latest XF and it still occur from our side and we have attached the sample for your reference. Please check this issue in attached sample.
Comment 9 Paul Anderson 2017-11-14 12:45:17 UTC
Created attachment 25695 [details]
Sample
Comment 10 Chris King 2017-11-20 21:09:22 UTC
Created attachment 25768 [details]
Device Log

I no longer see a SO on the reproduction. But after rotating I do see an exception. Unfortunately, the debugger doesn't give any information about it so I'm reaching back out to you with the attached log to see if any of that looks familiar.

Any reduction of the reproduction would also help. Simply keep remove code (including comments/documentation unrelated to the issue) until the reproduction contains the minimum necessary to illustrate the issue.