Hi,
I got an error while trying to package application for iOS. I am using AIR SDK 26.0.0.118 release version not beta.
When I package for Android everything works fine the error is only occurring when packaging for iOS.
Until now everything was working fine until I have added a lot of ActionScript files (classes that are factories for vertices) and that classes have a lot of lines of code where one method have a huge switch statement and all cases in that switch are returning vectors instances.
There are around 50 of those files ranging from 12000 to 2000 lines of code. The average is around 4000 lines of code.
This is the sample of the code in switch statement that returns vector:
public function create(scale:Number):Vector.<Vector.<b2Vec2>> { switch(scale) { case 0.1: return new Vector.<Vector.<b2Vec2>>(3, true)[ new Vector.<b2Vec2>(4, true)[new b2Vec2(0.03645833333333333, 0.03645833333333333), new b2Vec2(0.03645833333333333, 0.028645833333333332), new b2Vec2(0.06510416666666666, 0.028645833333333332), new b2Vec2(0.06510416666666666, 0.03645833333333333)], new Vector.<b2Vec2>(5, true)[new b2Vec2(0.028645833333333332, 0.0013020833333333333), new b2Vec2(0.028645833333333332, 0), new b2Vec2(0.03645833333333333, 0), new b2Vec2(0.03645833333333333, 0.06510416666666666), new b2Vec2(0.028645833333333332, 0.06510416666666666)], new Vector.<b2Vec2>(4, true)[new b2Vec2(0.028645833333333332, 0.028645833333333332), new b2Vec2(0.028645833333333332, 0.03645833333333333), new b2Vec2(0, 0.03645833333333333), new b2Vec2(0, 0.028645833333333332)] ]; break; case 0.11: return new Vector.<Vector.<b2Vec2>>(5, true)[ new Vector.<b2Vec2>(4, true)[new b2Vec2(0.03092391304347826, 0.03253849637681159), new b2Vec2(0.03125, 0.04036458333333333), new b2Vec2(0, 0.04036458333333333), new b2Vec2(0, 0.03125)], new Vector.<b2Vec2>(4, true)[new b2Vec2(0.0390625, 0.03125), new b2Vec2(0.07161458333333333, 0.03125), new b2Vec2(0.07161458333333333, 0.0390625), new b2Vec2(0.038679800724637683, 0.04043478260869565)], new Vector.<b2Vec2>(4, true)[new b2Vec2(0.038679800724637683, 0.04043478260869565), new b2Vec2(0.04036458333333333, 0.04036458333333333), new b2Vec2(0.04036458333333333, 0.07161458333333333), new b2Vec2(0.03738064236111111, 0.07161458333333331)], new Vector.<b2Vec2>(4, true)[new b2Vec2(0.03738064236111111, 0.07161458333333331), new b2Vec2(0.03255208333333333, 0.07161458333333333), new b2Vec2(0.03092391304347826, 0.03253849637681159), new b2Vec2(0.0389948006932409, 0.032874783362218406)], new Vector.<b2Vec2>(5, true)[new b2Vec2(0.0389948006932409, 0.032874783362218406), new b2Vec2(0.03125, 0.03255208333333333), new b2Vec2(0.03125, 0.0013020833333333333), new b2Vec2(0.03125, 0), new b2Vec2(0.04036458333333333, 0)] ]; break; case 0.12: return new Vector.<Vector.<b2Vec2>>(5, true)[ new Vector.<b2Vec2>(4, true)[new b2Vec2(0.03350308641975308, 0.03514274691358024), new b2Vec2(0.033854166666666664, 0.04427083333333333), new b2Vec2(0, 0.04427083333333333), new b2Vec2(0, 0.033854166666666664)], new Vector.<b2Vec2>(4, true)[new b2Vec2(0.04296875, 0.033854166666666664), new b2Vec2(0.078125, 0.033854166666666664), new b2Vec2(0.078125, 0.04296875), new b2Vec2(0.04256558641975309, 0.04433641975308642)], new Vector.<b2Vec2>(4, true)[new b2Vec2(0.04256558641975309, 0.04433641975308642), new b2Vec2(0.04427083333333333, 0.04427083333333333), new b2Vec2(0.04427083333333333, 0.078125), new b2Vec2(0.04126602564102564, 0.07812499999999999)], new Vector.<b2Vec2>(4, true)[new b2Vec2(0.04126602564102564, 0.07812499999999999), new b2Vec2(0.03515625, 0.078125), new b2Vec2(0.03350308641975308, 0.03514274691358024), new b2Vec2(0.04290528064992614, 0.035504369768586994)], new Vector.<b2Vec2>(5, true)[new b2Vec2(0.04290528064992614, 0.035504369768586994), new b2Vec2(0.033854166666666664, 0.03515625), new b2Vec2(0.033854166666666664, 0.0013020833333333333), new b2Vec2(0.033854166666666664, 0), new b2Vec2(0.04427083333333333, 0)] ]; break; } }
Here is the zip file of the files I have added that caused packaging error:
I tried to compile 3 times for iOS and I got these 3 errors:
Error occurred while packaging the application:
0x01626B16 (0x00202000 0x36D4207C 0x00000000 0x00000004)
0x0174DBF5 (0x01C4DE08 0x37EBE80C 0x6F328898 0x0B7D9E88)
0x0169B237 (0x0C2F0E48 0x31D0EBA8 0x00000004 0x37EBE80C)
0x01671600 (0x37EBE80C 0x31D0EBA8 0x02CEF508 0x31D0EBA8)
0x01695732 (0x37EBE80C 0x00000028 0x02CEF508 0x31D0EBA8)
0x014F99FA (0x37EBE80C 0x02CEF508 0x00000004 0x02CEF508)
0x014F998B (0x43E9A20C 0x02CEF508 0x37EBE84C 0x00000004)
0x014F998B (0x43E99C0C 0x02CEF508 0x37EBE84C 0x31D0EBA8)
0x0150139E (0x37EBE84C 0x31D0EBA8 0x31D0EBD0 0x02CEF540)
0x01510771 (0x37EBE84C 0x37EBE84C 0x37EBE40C 0x31D0EBA8)
0x01698180 (0x37EBE84C 0x1478C474 0x36D4237C 0x0A582760)
0x0162B8BE (0x1478C474 0x00000000 0x0A582760 0x02814FE0)
0x0162F7EB (0x02385008 0x02CEF69C 0x01746EEA 0x02385008)
0x01492762 (0x02385008 0x0A582760 0x02CEF6EC 0x01A4B13B)
0x01746EEA (0x1478C474 0x00000000 0x0B22A000 0x1478C474)
0x01A4B13B (0x1478C474 0x02814FD0 0x0B22A0A4 0x00000000)
0x01A4B20A (0x0B22A034 0x00000000 0x023EF9B0 0x0BBEE000)
0x01A4B391 (0x0B22A034 0x0B22A034 0x027B7890 0x0BBEE028)
0x01A4ADCD (0x0B22A034 0x083FDED8 0x029075E0 0x772DB250)
0x01324BD2 (0x083FDED8 0x029075E0 0x772DB250 0x083FDED8)
0x0B22A034 (0x029075E0 0x772DB250 0x083FDED8 0x08002010) <unknown module>
0x083FDED8 (0x772DB250 0x083FDED8 0x08002010 0x00000000) <unknown module>
0x029075E0 (0x083FDED8 0x08002010 0x00000000 0x01F63008) <unknown module>
0x772DB250 (0x00001704 0x772D15CA 0x00000000 0x0000000F), RtlLeaveCriticalSection
0x772D1927 (0x0B22E3F8 0x76A31148 0x00000000 0x00000000), RtlGetCurrentServiceSessionId() + 0xAA7 bytes(s)
0x772D09DB (0x76A31148 0x00000000 0x00000000 0x00000000), RtlFreeHeap() + 0x11B bytes(s)
0x0B22E3F8 (0x00000000 0x00000000 0x00000000 0x00000000) <unknown module>
0x76A31148 (0x00000000 0x00000000 0x00000000 0x00000000), WakeConditionVariable() + 0x1078 bytes(s)
Error occurred while packaging the application:
0x01492F95 (0x012CF41C 0x50BC5970 0x7EF8CED8 0x00000000) <unknown module>
0x014FAE0F (0x00000004 0x012CF474 0x012CF458 0x00000000) <unknown module>
0x015013C9 (0x80209B91 0x05470B78 0x05470BA0 0x00000028) <unknown module>
0x01510771 (0x1324350C 0x1324350C 0x0ABF66EC 0x05470B78) <unknown module>
0x01698180 (0x1324350C 0x2624757C 0x19AE437C 0x007D0AD0) <unknown module>
0x0162B8BE (0x2624757C 0x00000000 0x007D0AD0 0x0D4AD130) <unknown module>
0x0162F7EB (0x0836B3D8 0x012CF5EC 0x01746EEA 0x0836B3D8) <unknown module>
0x01492762 (0x0836B3D8 0x007D0AD0 0x012CF63C 0x01A4B13B) <unknown module>
0x01746EEA (0x2624757C 0x00000000 0x058F34A8 0x2624757C) <unknown module>
0x01A4B13B (0x2624757C 0x0D4AD120 0x058F354C 0x00000000) <unknown module>
0x01A4B20A (0x058F34DC 0x00000000 0x008521D0 0x40104000) <unknown module>
0x01A4B391 (0x058F34DC 0x058F34DC 0x0086ABA8 0x40104008) <unknown module>
0x01A4ADCD (0x058F34DC 0x0898F350 0x00CE75E0 0x772DB250) <unknown module>
0x01324BD2 (0x00000059 0x05FFC01F 0xFFFFFFFF 0x00000000) <unknown module>
0x06ABB900 (0x00000000 0x012CF880 0x00000000 0x00000000) <unknown module>
0x772D0AD7 (0x00000088 0x00000088 0x772E8FCF 0x002300F8) <unknown module>
0x772E8FB3 (0x012CF938 0x00000000 0x01BFD420 0x0000000B) <unknown module>
Error occurred while packaging the application:
0x01B8369A (0x0019EB60 0x0234F0EC 0x0234F220 0x00000008) <unknown module>
0x014D4C73 (0x000002E6 0x00000000 0x00000000 0x00000000) <unknown module>
0x016C9D80 (0x0234F19C 0x5C4556A0 0x00000000 0x00000000) <unknown module>
0x016CAEB4 (0x5C4587F8 0x5C458500 0x772D0900 0x0234F244) <unknown module>
0x016A1DA7 (0x06335030 0x00121E10 0x3034A558 0x00121E10) <unknown module>
0x01628FF7 (0x383B50DC 0x7EDA8188 0x5C4554C0 0x00000001) <unknown module>
0x0162BDAA (0x383B50DC 0x383B558C 0x0234F4D3 0x22FB125C) <unknown module>
0x0162BAA6 (0x22FB125C 0x00000000 0x00121E10 0x409C6140) <unknown module>
0x0162F7EB (0x0019EB60 0x0234F59C 0x01746EEA 0x0019EB60) <unknown module>
0x01492762 (0x0019EB60 0x00121E10 0x0234F5EC 0x01A4B13B) <unknown module>
0x01746EEA (0x22FB125C 0x00000000 0x0B0C54A0 0x22FB125C) <unknown module>
0x01A4B13B (0x22FB125C 0x409C6130 0x0B0C5544 0x00000000) <unknown module>
0x01A4B20A (0x0B0C54D4 0x00000000 0x00180218 0x37CEF000) <unknown module>
0x01A4B391 (0x0B0C54D4 0x0B0C54D4 0x00528998 0x37CEF010) <unknown module>
0x01A4ADCD (0x0B0C54D4 0x057B0F20 0x002B75E0 0x772DB250) <unknown module>
0x01324BD2 (0x00000201 0x772D15CA 0x0B0C555C 0x21B6F000) <unknown module>
0x772D16DC (0x0B0C555C 0x21B6F000 0x11000104 0x00020000) <unknown module>
0x772D15CA (0x00000000 0x0234F830 0x00000000 0x00000000) <unknown module>
0x772D0AD7 (0x0000013C 0x0000013C 0x772E8FCF 0x000200B8) <unknown module>
0x772E8FB3 (0x0234F8E8 0x00000000 0x01BFD420 0x0000000B) <unknown module>