热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

iOS:Crashwhenpoppingpages

ThishappensquiteoftenwhenIclosesomemodalpages,whenrunningonmyiPadPro12.9

This happens quite often when I close some modal pages, when running on my iPad Pro 12.9" with iOS 14:

1
2
3
4
5
6
7
8
9
10
11
12
SIGABRT: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index



List`1[T].get_Item (System.Int32 index)

Application+NavigationImpl.OnPopModal (System.Boolean animated)

ModalWrapper.DidDismiss (UIKit.UIPresentationController presentationController)

AsyncMethodBuilderCore&#043;<>c.b__7_0 (System.Object state)

NSAsyncSynchronizationContextDispatcher.Apply ()

(wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)

UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate)

UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName)

Application.Main (System.String[] args)


Xamarin.Forms 4.8.0.1560.

该提问来源于开源项目:xamarin/Xamarin.Forms

After 3 days of testing, we were successful in isolating an iOS app crash problem and concluded the problem is the same as other problems described in this thread. The combination of the iOS 14.0 SDK, a CollectionView control, and a Navigation.PopAsync call from a page in the Master-Detail Page’s Detail page queue triggers the problem. We tested both ObservableCollection<> and List<> data structures for the ItemsSource binding. In our case, test results remained the same for both data structures. Please note, the iOS app has not exhibited similar problems on any page serving as a root detail page—needless to say, PopAsync is never called on root pages, one root instance reference is replaced with another instance reference. Additionally, this only impacts an iOS app, not its Android app sibling.



Prior to the introduction of the CollectionView control, we became big fans of the FlowListView control, created by Daniel Luberda. FlowListView has been an extremely useful wrapper for the now outdated ListView control, introducing logic to configure multiple columns. We began replacing FlowListView instances with CollectionView instances throughout our suite of mobile apps a year ago. Fortunately, we are less than halfway through the effort, replacing upwards of 100 of a couple hundred list controls. Simply reverting to the FlowListView control on the impacted page has served as an effective workaround.

The mobile app experiencing the problem is one of our oldest mobile apps. When factoring in that known fact, our current best guess as to root cause is outdated csprj files in the shared, Android, and iOS projects. A csprj config setting, or a combination of multiple settings, could be root cause. This could explain why MS Engineers have struggled to repro the problem. The csprj files in our impacted mobile app may have been created in VS2017 or possibly VS2015. At some point in the near future, we will recreate the csprj files to conform to the latest VS2019 standards and reintroduce dependent project and NuGet package references. Unfortunately, we estimate another 2-3 days of effort to update the csprj files and execute a couple hundred end-to-end regression tests via MS App Center Cloud Test Service.





   



推荐阅读
  • 本文概述了JNI的原理以及常用方法。JNI提供了一种Java字节码调用C/C++的解决方案,但引用类型不能直接在Native层使用,需要进行类型转化。多维数组(包括二维数组)都是引用类型,需要使用jobjectArray类型来存取其值。此外,由于Java支持函数重载,根据函数名无法找到对应的JNI函数,因此介绍了JNI函数签名信息的解决方案。 ... [详细]
  • 如何自行分析定位SAP BSP错误
    The“BSPtag”Imentionedintheblogtitlemeansforexamplethetagchtmlb:configCelleratorbelowwhichi ... [详细]
  • Java容器中的compareto方法排序原理解析
    本文从源码解析Java容器中的compareto方法的排序原理,讲解了在使用数组存储数据时的限制以及存储效率的问题。同时提到了Redis的五大数据结构和list、set等知识点,回忆了作者大学时代的Java学习经历。文章以作者做的思维导图作为目录,展示了整个讲解过程。 ... [详细]
  • 本文介绍了C++中省略号类型和参数个数不确定函数参数的使用方法,并提供了一个范例。通过宏定义的方式,可以方便地处理不定参数的情况。文章中给出了具体的代码实现,并对代码进行了解释和说明。这对于需要处理不定参数的情况的程序员来说,是一个很有用的参考资料。 ... [详细]
  • 本文介绍了OC学习笔记中的@property和@synthesize,包括属性的定义和合成的使用方法。通过示例代码详细讲解了@property和@synthesize的作用和用法。 ... [详细]
  • 本文讨论了一个关于cuowu类的问题,作者在使用cuowu类时遇到了错误提示和使用AdjustmentListener的问题。文章提供了16个解决方案,并给出了两个可能导致错误的原因。 ... [详细]
  • 近来有一个需求,是需要在androidjava基础库中插入一些log信息,完成这个工作需要的前置条件有编译好的android源码具体android源码如何编译,这 ... [详细]
  • imnewtotheswiftandxcodeworld,soimhavingaproblemtryingtointegrateapackagetomypro ... [详细]
  • Myappcrashedandthecodeisthefollowing:我的应用程序崩溃,代码如下:elseif(){CGDetailVie ... [详细]
  • JavaSE笔试题-接口、抽象类、多态等问题解答
    本文解答了JavaSE笔试题中关于接口、抽象类、多态等问题。包括Math类的取整数方法、接口是否可继承、抽象类是否可实现接口、抽象类是否可继承具体类、抽象类中是否可以有静态main方法等问题。同时介绍了面向对象的特征,以及Java中实现多态的机制。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • 本文介绍了在多平台下进行条件编译的必要性,以及具体的实现方法。通过示例代码展示了如何使用条件编译来实现不同平台的功能。最后总结了只要接口相同,不同平台下的编译运行结果也会相同。 ... [详细]
  • 如何用JNI技术调用Java接口以及提高Java性能的详解
    本文介绍了如何使用JNI技术调用Java接口,并详细解析了如何通过JNI技术提高Java的性能。同时还讨论了JNI调用Java的private方法、Java开发中使用JNI技术的情况以及使用Java的JNI技术调用C++时的运行效率问题。文章还介绍了JNIEnv类型的使用方法,包括创建Java对象、调用Java对象的方法、获取Java对象的属性等操作。 ... [详细]
  • Mono为何能跨平台
    概念JIT编译(JITcompilation),运行时需要代码时,将Microsoft中间语言(MSIL)转换为机器码的编译。CLR(CommonLa ... [详细]
  • 【CTF 攻略】第三届 SSCTF 全国网络安全大赛—线上赛 Writeup
    【CTF 攻略】第三届 SSCTF 全国网络安全大赛—线上赛 Writeup ... [详细]
author-avatar
手机用户2602939883
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有