Updated to Xcode 5.1.1 causes strange crash of iOS app

风格不统一 提交于 2019-12-22 19:31:24

问题


Unfortunately I auto-updated Xcode to Version 5.1.1 (5B1008), and now one of my apps crashes in a very strange way.

The app is a PhoneGap 3.4 (+ jQuery Mobile 1.3.1) hybrid app, the crash happens when I try to open a JQM page that contains ~20 JQM checkbox.

The crash happens in CoreGraphics CGPathAddLineToPoint called by WebCore WebCore::RenderThemeIOS::paintCheckboxDecorations in the WebThread, I guess when WebCore attempts to render the checkboxes on then JQM page.

The console reads:

Assertion failed: (CGFloatIsValid(x) && CGFloatIsValid(y)), function void CGPathAddLineToPoint(CGMutablePathRef, const CGAffineTransform *, CGFloat, CGFloat), file Paths/CGPath.cc, line 224. (lldb)

Any other JQM page NOT containing checkboxes is displayed properly, and it does not crash the app.

EDIT: interestingly, the crash is triggered by this line of Javascript:

$('#my_checkbox').prop("checked", my_boolean_value).checkboxradio("refresh");

If I disable it, the JQM page shows up. But then, even if the above line is disabled, if I click on any checkbox, it crashes again, with the same above Assertion failed message. (I guess because JQM toggles the check/unchecked class.)

I already performed all the tricks I could think of (clean, disable debugger, reboot, reinstalled Xcode), with no luck.

Any ideas on how to solve this issue?


回答1:


I discovered the following very irritating fact: the crash is triggered by a

opacity:.01

directive, attached to the JQM .ui-checkbox class in my CSS.

Changing it to:

opacity:0

prevents the crash (which I still do not know if it is due to an Xcode bug or an iOS bug).

Interestingly, setting any value greater than 0 triggers the crash.




回答2:


I had a similar issue,but it was caused by an attributed text link. I ended up having to change "Continue..." to "Continue"



来源:https://stackoverflow.com/questions/23413205/updated-to-xcode-5-1-1-causes-strange-crash-of-ios-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!