Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15365] EXC_ARM_DA_ALIGN in KrollContext StringFormatCallback()

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterPaul Mietz Egli
AssigneeUnknown
Created2013-09-13T20:26:11.000+0000
Updated2018-02-28T20:03:30.000+0000

Description

I started running into a memory alignment issue on iOS 7 that wasn't present in 6.1: the code for formatting a string has been throwing EXC_ARM_DA_ALIGN errors. I found [this web page](http://www.splinter.com.au/what-do-do-with-excarmdaalign-on-an-iphone-ap/) which briefly explains the cause and gives a workaround. I wasn't able to reproduce the bug with a simple test of different String.format() calls, but I was able to fix the problem in the app that was crashing by replacing lines 384-386 in KrollContext.m with the following:
double tmp = TiValueToNumber(jsContext, valueRef, NULL);
memcpy(argList, &tmp, sizeof(tmp));
argList += sizeof(double);
I made a similar change in the boolean arg value at lines 390-392.

Comments

No comments

JSON Source