Crash during Core Data store migration - ios

I have an app that is currently in App Store and works fine. I'm developing an update for the app, but sometimes when the update is installed over the original app the app crashes right on the line below:
let userStore: NSPersistentStore? = coordinator!.addPersistentStoreWithType(NSSQLiteStoreType, configuration: "Userdata", URL: storeURL, options: self.storeOptions() as [NSObject : AnyObject], error: &errorUser)
The storeOptions() function is:
func storeOptions() -> NSDictionary {
return [NSMigratePersistentStoresAutomaticallyOption:true,
NSInferMappingModelAutomaticallyOption:true,
NSPersistentStoreRemoveUbiquitousMetadataOption:true] as NSDictionary
}
The crash I get is:
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 'Can't use fetch request with
fetched property description (entity model mismatch).'
I created a new version of the model for Core Data.The differences between Core Data versions are: 1) 5 Fetched Properties added; 2) 1 entity added.
If the Core Data store has few objects to migrate, everything works fine without crash; but if store have hundreds objects to migrate, the crash occurs.
The crash only happens the first time I run the app after the update. After the crash, if I re-launch the app one or two times, everything works fine.
Thanks for the help!
This is console log with migration debug activated:
2015-05-11 15:47:25.635 MedAbility[36991:4938505] CoreData: annotation: Incompatible version schema for persistent store 'file:///var/mobile/Containers/Data/Application/F2E6CD21-1F14-45E4-8522-D3B21E6C2129/Documents/MedAbility.sqlite'. store metadata = {
NSPersistenceFrameworkVersion = 519;
NSStoreModelVersionHashes = {
Area = <af6226b7 0266c871 51907548 889dd0a0 cd8bb41b a5fac48e a9b6b26d 2c302f51>;
Argomento = <78466321 1b0def24 d9fd617b a5293137 6a500d03 7c970176 bd0a6fff 4119ba6a>;
Domanda = <e43a3011 c52b29d5 baa25106 2d620206 f896a866 c17f66f4 83dfe95f 5bb64011>;
Preferita = <2fd53f7e ae85e1e5 955d512e 96f33ec4 b25b5bb4 0298d201 cb5e0578 02a8ae84>;
Risposta = <cf5ea36c e2885c4a 1ea1a929 801ed4f0 35069831 911e599d 1fb011dd 9817833d>;
StatDomanda = <b4a01246 05e5504a 8c73ebcd d857b549 1ed3cb8a d0ada1eb f7e63fea 1971ef09>;
StatSimulazione = <2ebd70dc 7b935642 75957196 68eab9c4 6d53bfb7 acf7ed28 fc859da3 742e06f3>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = SQLite;
NSStoreUUID = "F74702C7-518C-4DCF-9555-1895DFF79608";
"_NSAutoVacuumLevel" = 2;
} and current model versions = {
Area = <af6226b7 0266c871 51907548 889dd0a0 cd8bb41b a5fac48e a9b6b26d 2c302f51>;
Argomento = <78466321 1b0def24 d9fd617b a5293137 6a500d03 7c970176 bd0a6fff 4119ba6a>;
Domanda = <e43a3011 c52b29d5 baa25106 2d620206 f896a866 c17f66f4 83dfe95f 5bb64011>;
Preferita = <2fd53f7e ae85e1e5 955d512e 96f33ec4 b25b5bb4 0298d201 cb5e0578 02a8ae84>;
Risposta = <cf5ea36c e2885c4a 1ea1a929 801ed4f0 35069831 911e599d 1fb011dd 9817833d>;
Segnalibro = <7edc9c5d 72fd8f12 703cfbd8 c3e46ae7 71c7708d bbd096c5 5d278d18 40a43d38>;
StatDomanda = <b4a01246 05e5504a 8c73ebcd d857b549 1ed3cb8a d0ada1eb f7e63fea 1971ef09>;
StatSimulazione = <2ebd70dc 7b935642 75957196 68eab9c4 6d53bfb7 acf7ed28 fc859da3 742e06f3>;
}
2015-05-11 15:47:25.637 MedAbility[36991:4938505] CoreData: annotation: (migration) will attempt automatic schema migration
2015-05-11 15:47:25.804 MedAbility[36991:4938505] CoreData: annotation: (migration) looking for mapping model with
source hashes:
{
Area = <af6226b7 0266c871 51907548 889dd0a0 cd8bb41b a5fac48e a9b6b26d 2c302f51>;
Argomento = <78466321 1b0def24 d9fd617b a5293137 6a500d03 7c970176 bd0a6fff 4119ba6a>;
Domanda = <e43a3011 c52b29d5 baa25106 2d620206 f896a866 c17f66f4 83dfe95f 5bb64011>;
Preferita = <2fd53f7e ae85e1e5 955d512e 96f33ec4 b25b5bb4 0298d201 cb5e0578 02a8ae84>;
Risposta = <cf5ea36c e2885c4a 1ea1a929 801ed4f0 35069831 911e599d 1fb011dd 9817833d>;
StatDomanda = <b4a01246 05e5504a 8c73ebcd d857b549 1ed3cb8a d0ada1eb f7e63fea 1971ef09>;
StatSimulazione = <2ebd70dc 7b935642 75957196 68eab9c4 6d53bfb7 acf7ed28 fc859da3 742e06f3>;
}
destination hashes: {
Area = <af6226b7 0266c871 51907548 889dd0a0 cd8bb41b a5fac48e a9b6b26d 2c302f51>;
Argomento = <78466321 1b0def24 d9fd617b a5293137 6a500d03 7c970176 bd0a6fff 4119ba6a>;
Domanda = <e43a3011 c52b29d5 baa25106 2d620206 f896a866 c17f66f4 83dfe95f 5bb64011>;
Preferita = <2fd53f7e ae85e1e5 955d512e 96f33ec4 b25b5bb4 0298d201 cb5e0578 02a8ae84>;
Risposta = <cf5ea36c e2885c4a 1ea1a929 801ed4f0 35069831 911e599d 1fb011dd 9817833d>;
Segnalibro = <7edc9c5d 72fd8f12 703cfbd8 c3e46ae7 71c7708d bbd096c5 5d278d18 40a43d38>;
StatDomanda = <b4a01246 05e5504a 8c73ebcd d857b549 1ed3cb8a d0ada1eb f7e63fea 1971ef09>;
StatSimulazione = <2ebd70dc 7b935642 75957196 68eab9c4 6d53bfb7 acf7ed28 fc859da3 742e06f3>;
}
2015-05-11 15:47:25.811 MedAbility[36991:4938505] CoreData: annotation: (migration) checking mapping model /private/var/mobile/Containers/Bundle/Application/9CC3C576-AECB-4A57-9736-D84362930F86/MedAbility.app/MappingModel.cdm
source hashes:
{(
<51547408 0740f420 b6856444 4c3c831e 3bc0f6fb 6aee554a 873c28f4 3f79869d>,
<cf5ea36c e2885c4a 1ea1a929 801ed4f0 35069831 911e599d 1fb011dd 9817833d>,
<dca9a9da 863a890a 75944b3d cad52b45 ad9e87c3 d4c5e157 4d00600f f66ce9e4>,
<78466321 1b0def24 d9fd617b a5293137 6a500d03 7c970176 bd0a6fff 4119ba6a>,
<e04dcc45 a70018ae 00de4f4d ef5378ae 3de3b718 6a961ae9 b916288e 14573c83>
)}
destination hashes: {(
<af6226b7 0266c871 51907548 889dd0a0 cd8bb41b a5fac48e a9b6b26d 2c302f51>,
<e43a3011 c52b29d5 baa25106 2d620206 f896a866 c17f66f4 83dfe95f 5bb64011>,
<2fd53f7e ae85e1e5 955d512e 96f33ec4 b25b5bb4 0298d201 cb5e0578 02a8ae84>,
<cf5ea36c e2885c4a 1ea1a929 801ed4f0 35069831 911e599d 1fb011dd 9817833d>,
<b4a01246 05e5504a 8c73ebcd d857b549 1ed3cb8a d0ada1eb f7e63fea 1971ef09>,
<2ebd70dc 7b935642 75957196 68eab9c4 6d53bfb7 acf7ed28 fc859da3 742e06f3>,
<78466321 1b0def24 d9fd617b a5293137 6a500d03 7c970176 bd0a6fff 4119ba6a>
)}
2015-05-11 15:47:25.812 MedAbility[36991:4938505] CoreData: annotation: (migration) mismatched source and hashes for mapping model MappingModel.cdm
2015-05-11 15:47:25.812 MedAbility[36991:4938505] CoreData: annotation: (migration) no match found for 5 of 7 mapping model source hashes
2015-05-11 15:47:25.817 MedAbility[36991:4938505] CoreData: annotation: (migration) checking mapping model /System/Library/PrivateFrameworks/Notes.framework/ExternalSequenceNumberToAttachmentMappingModel.cdm
source hashes:
{(
<0f8744bb 376b0605 81c1356b 4a5cd8ce 297be0d7 76945132 057fb167 7514a61c>,
<ed35016c 16ce0c08 62093859 d635d684 c45984e6 053e9bff bf658180 3280b941>,
<9419ea78 017a215a f515f895 8a29c4a1 78b2bbd2 1a717a07 b383378f f0ae4b78>,
<e5d70b6b 962b999a 13401655 abb95b65 3048836f 47ea07c3 27d40938 5659382b>,
<2591278c 6d7773dd 13079513 fef234f6 e8f58e5a ca00f5d2 de2ab6f4 56b5b614>,
<06ae957e c9080f85 7cbd5291 4d16c9f4 9d86e1f8 92019b63 e8af3bc6 08735b9c>,
<14f5af3b 1601e79c e2a3674d d30d39ea eb55377f 132c73e9 30b9be3f 861b0450>
)}
destination hashes: {(
<68b4bd84 a77d29ef 5129d209 0bb2d107 1f549168 8eb1c43c 08e8aeb7 eece004a>,
<0f8744bb 376b0605 81c1356b 4a5cd8ce 297be0d7 76945132 057fb167 7514a61c>,
<e5d70b6b 962b999a 13401655 abb95b65 3048836f 47ea07c3 27d40938 5659382b>,
<14f5af3b 1601e79c e2a3674d d30d39ea eb55377f 132c73e9 30b9be3f 861b0450>,
<3cac738a 7e9ab953 8d2e8dd0 11c60c82 4f8dfbe4 be285cbb e0fd4d7f 003784ab>,
<2591278c 6d7773dd 13079513 fef234f6 e8f58e5a ca00f5d2 de2ab6f4 56b5b614>,
<06ae957e c9080f85 7cbd5291 4d16c9f4 9d86e1f8 92019b63 e8af3bc6 08735b9c>,
<2468f7b0 631a290c bc83720a 7287e359 3c222e59 057e9deb 6a13bd85 339bd5ef>
)}
2015-05-11 15:47:25.817 MedAbility[36991:4938505] CoreData: annotation: (migration) mismatched source and destination hashes for mapping model ExternalSequenceNumberToAttachmentMappingModel.cdm
2015-05-11 15:47:25.818 MedAbility[36991:4938505] CoreData: annotation: (migration) no suitable mapping model found
2015-05-11 15:47:25.818 MedAbility[36991:4938505] CoreData: annotation: (migration) inferring a mapping model between data models with
source hashes:
{
Area = <af6226b7 0266c871 51907548 889dd0a0 cd8bb41b a5fac48e a9b6b26d 2c302f51>;
Argomento = <78466321 1b0def24 d9fd617b a5293137 6a500d03 7c970176 bd0a6fff 4119ba6a>;
Domanda = <e43a3011 c52b29d5 baa25106 2d620206 f896a866 c17f66f4 83dfe95f 5bb64011>;
Preferita = <2fd53f7e ae85e1e5 955d512e 96f33ec4 b25b5bb4 0298d201 cb5e0578 02a8ae84>;
Risposta = <cf5ea36c e2885c4a 1ea1a929 801ed4f0 35069831 911e599d 1fb011dd 9817833d>;
StatDomanda = <b4a01246 05e5504a 8c73ebcd d857b549 1ed3cb8a d0ada1eb f7e63fea 1971ef09>;
StatSimulazione = <2ebd70dc 7b935642 75957196 68eab9c4 6d53bfb7 acf7ed28 fc859da3 742e06f3>;
}
destination hashes: {
Area = <af6226b7 0266c871 51907548 889dd0a0 cd8bb41b a5fac48e a9b6b26d 2c302f51>;
Argomento = <78466321 1b0def24 d9fd617b a5293137 6a500d03 7c970176 bd0a6fff 4119ba6a>;
Domanda = <e43a3011 c52b29d5 baa25106 2d620206 f896a866 c17f66f4 83dfe95f 5bb64011>;
Preferita = <2fd53f7e ae85e1e5 955d512e 96f33ec4 b25b5bb4 0298d201 cb5e0578 02a8ae84>;
Risposta = <cf5ea36c e2885c4a 1ea1a929 801ed4f0 35069831 911e599d 1fb011dd 9817833d>;
Segnalibro = <7edc9c5d 72fd8f12 703cfbd8 c3e46ae7 71c7708d bbd096c5 5d278d18 40a43d38>;
StatDomanda = <b4a01246 05e5504a 8c73ebcd d857b549 1ed3cb8a d0ada1eb f7e63fea 1971ef09>;
StatSimulazione = <2ebd70dc 7b935642 75957196 68eab9c4 6d53bfb7 acf7ed28 fc859da3 742e06f3>;
}
2015-05-11 15:47:25.878 MedAbility[36991:4938505] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Can't use fetch request with fetched property description (entity model mismatch).'
*** First throw call stack:
(0x1847b82d8 0x195fdc0e4 0x1847b8218 0x1844e6310 0x1844e6468 0x1844dd7c4 0x184511694 0x184449564 0x18444922c 0x18457f494 0x18451e168 0x1845780ec 0x184577180 0x184578ad8 0x1845281c0 0x184534028 0x100894f94 0x10089f08c 0x184525e98 0x1844496e8 0x1000bc0d4 0x1000bb074 0x1000ba544 0x10015ff84 0x10016092c 0x1891f8c84 0x1892aef68 0x1892aee64 0x1892ae2f0 0x1892adf9c 0x1892adcbc 0x1892adc3c 0x1891f5760 0x188b3de1c 0x188b38884 0x188b38728 0x188b37ebc 0x188b37c3c 0x189484838 0x18948571c 0x189483778 0x18cfc13c8 0x18477027c 0x18476f384 0x18476d9a8 0x1846992d4 0x18926443c 0x18925efac 0x10007bc90 0x19665aa08)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Related

Attempt to call a nil value (field 'getn')

Could you guys help me fix this lua code?
I'm getting a problem on line 89 if IsMouseButtonPressed(1) and indexP < table.getn(weapon[indexW]) then getting the error attempt to call a nil value (field 'getn')
"it" is asking me to add more details, so I will just add some letters down here.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AK47 = {{0,0}, {-0.56, 0.92}, {-0.55, 0.79}, {-0.45, 0.82}, {-0.27, 1.01}, {0.06, 2.49}, {0.65, 2.16}, {0.78, 2.17}, {0.46, 2.5}, {-0.04, 3.86}, {-0.41, 3.39}, {-0.54, 3.39}, {-0.41, 3.86}, {-0.36, 4.06}, {-0.36, 3.58}, {-0.1, 3.57}, {0.41, 4.02}, {1.14, 4.42}, {1.56, 3.73}, {1.74, 3.69}, {1.7, 4.28}, {1.05, 3.73}, {0.74, 3.34}, {0.84, 3.3}, {1.37, 3.6}, {1.9, 2.64}, {2.28, 2.1}, {1.8, 2.17}, {0.47, 2.85}, {-0.97, 2.71}, {-1.86, 1.95}, {-2.51, 1.4}, {-2.92, 1.06}, {-5.4, 0.71}, {-4.89, -0.84}, {-4.96, -1.29}, {-5.62, -0.64}, {-3.39, -0.37}, {-3.3, -0.53}, {-2.72, 0.24}, {-1.64, 1.95}, {0.7, 1.73}, {2.42, 0.96}, {2.49, 0.98}, {0.92, 1.79}, {-0.99, 1.83}, {-1.91, 0.87}, {-2.42, 0.28}, {-2.54, 0.05}, {-3.53, -0.87}, {-3.0, -1.9}, {-2.94, -1.57}, {-3.34, 0.1}, {-0.75, 0.42}, {-0.58, 0.61}, {-0.28, 0.72}, {0.15, 0.75}, {3.19, 2.01}, {4.93, -0.32}, {5.85, -0.97}, {5.95, 0.06}, {2.62, 0.6}, {2.26, 0.72}, {2.18, 0.93}, {2.39, 1.23}, {1.91, 1.37}, {1.51, 1.5}, {1.56, 1.38}, {2.07, 1.0}, {3.51, 0.62}, {3.18, -0.16}, {3.2, -0.6}, {3.59, -0.7}, {5.44, -0.2}, {5.49, 0.1}, {4.17, -0.95}, {1.46, -3.35}, {-1.57, -2.44}, {-3.26, -1.15}, {-3.41, 0.33}, {-2.02, 2.01}, {0.28, 0.57}, {0.98, 0.12}, {1.12, 0.12}, {0.68, 0.57}, {0.02, 1.49}, {-0.72, 1.24}, {-1.17, 1.1}, {-1.35, 1.06}, {-1.35, 0.49}, {-1.54, 0.11}, {-1.19, 0.22}, {-0.28, 0.84}, {1.38, 1.16}, {2.36, -0.91}, {2.85, -1.41}, {2.87, -0.36}, {1.28, 0.36}, {1.21, 0.51}, {0.8, 0.73}, {0.06, 1.01}, {-1.64, 1.63}, {-2.58, -0.2}, {-3.09, -0.97}, {-3.17, -0.69}, {-4.36, -0.19}, {-3.85, -0.15}, {-3.81, -0.39}, {-4.24, -0.91}, {-6.19, -2.43}, {-5.14, -2.99}, {-5.16, -2.9}, {-6.26, -2.15}, {-1.9, -0.25}, {-1.69, 0.03}, {-1.71, 0.15}, {-1.93, 0.09}}
M4A4 = {{0,0}, {0.27, 1.1}, {0.24, 0.98}, {0.18, 1.12}, {0.16, 1.58}, {0.03, 1.42}, {-0.16, 1.58}, {-0.9, 2.81}, {-1.15, 2.42}, {-0.62, 2.84}, {0.71, 3.66}, {1.42, 3.17}, {0.72, 3.66}, {-0.77, 4.13}, {-1.54, 3.53}, {-1.48, 4.03}, {-1.55, 4.55}, {-1.24, 4.1}, {0.38, 4.49}, {2.06, 3.13}, {2.97, 2.07}, {3.13, 2.51}, {1.65, 2.3}, {1.35, 2.16}, {2.01, 1.87}, {4.02, 0.81}, {3.98, -0.19}, {2.91, 1.84}, {0.28, 1.96}, {-0.91, 1.83}, {-1.54, 1.67}, {-2.61, 1.79}, {-2.81, 0.8}, {-3.25, 0.37}, {-5.18, -0.21}, {-4.58, -1.06}, {-5.18, -0.88}, {-4.11, -0.07}, {-3.67, 0.14}, {-4.1, -0.18}, {-5.07, -1.48}, {-4.51, -1.72}, {-3.45, 0.38}, {-0.32, 0.53}, {0.04, 0.64}, {0.27, 0.64}, {1.69, 1.04}, {2.01, 0.46}, {0.71, 1.17}, {-1.18, 1.04}, {-2.05, -0.28}, {-2.26, -0.46}, {-2.93, -1.1}, {-2.62, -1.3}, {-1.82, 0.82}, {0.08, 0.52}, {0.59, 0.34}, {0.72, 0.25}, {4.48, 0.1}, {6.12, -0.65}, {6.58, 0.62}, {1.82, 0.98}, {1.43, 1.27}, {1.79, 1.05}, {4.5, 0.9}, {4.17, 0.02}, {4.65, 0.31}, {1.55, 0.35}, {1.37, 0.39}, {1.56, 0.31}, {2.47, 0.68}, {2.26, 0.52}, {1.03, -1.02}, {-1.23, -1.46}, {-2.51, -0.05}, {-1.82, 1.33}, {0.24, 1.0}, {1.2, 0.66}, {1.26, 0.8}, {0.67, 0.88}, {0.56, 0.82}, {0.81, 0.71}, {0.52, 0.23}, {0.51, 0.09}, {0.58, 0.01}, {0.76, -0.1}, {0.66, -0.21}, {0.74, -0.23}}
AUG = {{0,0}, {0.63, 0.67}, {0.57, 0.59}, {0.33, 0.79}, {-0.06, 0.62}, {-0.27, 0.53}, {-0.29, 0.6}, {-0.34, 0.96}, {-0.29, 0.86}, {-0.3, 0.97}, {-0.64, 2.07}, {-0.52, 1.86}, {-0.26, 2.13}, {0.18, 3.0}, {0.57, 2.65}, {0.67, 2.97}, {0.53, 3.41}, {0.51, 3.03}, {0.98, 3.28}, {1.18, 2.33}, {1.32, 1.95}, {1.29, 2.29}, {0.59, 1.79}, {0.4, 1.65}, {0.73, 1.72}, {1.58, 1.47}, {1.69, 1.12}, {0.66, 1.68}, {-1.09, 1.68}, {-2.08, 0.85}, {-2.04, 1.26}, {-0.68, 0.65}, {-0.53, 0.65}, {0.04, 0.72}, {1.27, 0.34}, {1.66, -0.7}, {1.52, 0.14}, {0.47, 0.78}, {0.0, 0.89}, {-0.43, 0.83}, {-2.08, 1.29}, {-2.46, 0.06}, {-2.74, -0.35}, {-3.85, -0.78}, {-3.29, -1.31}, {-3.65, -1.59}, {-3.06, -2.07}, {-2.68, -2.03}, {-2.87, 0.14}, {-0.3, 0.61}, {0.19, 0.8}, {0.02, 0.86}, {-0.3, 0.84}, {-0.41, 0.68}, {-0.67, 0.51}, {-0.99, 0.33}, {-0.96, 0.02}, {-0.4, -0.55}, {1.44, -1.32}, {3.05, 0.79}, {3.34, 0.85}, {3.32, 0.11}, {2.95, 0.13}, {3.24, 0.58}, {1.66, 0.26}, {1.46, 0.36}, {0.51, 1.02}, {-0.62, 0.68}, {-1.04, 0.16}, {-0.63, -0.51}, {0.76, -1.0}, {2.11, 0.14}, {2.28, -0.03}, {3.06, -1.23}, {2.64, -1.34}, {3.12, -0.96}, {2.22, -0.53}, {2.03, -0.24}, {1.01, 1.06}, {-0.89, 1.38}, {-2.38, 0.16}, {-2.63, 0.13}, {-1.88, 0.27}, {-1.7, 0.16}, {-1.45, 0.39}, {-0.21, 0.14}, {-0.16, 0.16}, {-0.18, 0.18}}
SG553 = {{0,0}, {-0.56, 1.34}, {-0.5, 1.2}, {-0.69, 1.27}, {-2.27, 2.8}, {-2.31, 2.28}, {-2.14, 2.87}, {-1.87, 4.11}, {-1.12, 3.9}, {-1.13, 4.42}, {-1.29, 4.98}, {-1.0, 4.47}, {-1.14, 5.02}, {-1.36, 5.54}, {-1.22, 4.93}, {-1.28, 5.55}, {-0.73, 6.22}, {-0.51, 5.58}, {-2.23, 5.6}, {-3.55, 2.59}, {-4.02, 1.51}, {-2.25, 3.06}, {1.53, 3.17}, {3.45, 2.22}, {2.02, 3.19}, {-0.54, 2.48}, {-1.56, 1.91}, {-2.1, 1.81}, {-2.59, 1.58}, {-2.61, 0.94}, {-2.73, 1.4}, {-1.08, 0.64}, {-0.9, 0.66}, {-0.35, 1.0}, {0.78, 0.98}, {1.4, 0.53}, {0.75, 0.98}, {-0.84, 1.3}, {-1.69, 0.71}, {-1.28, 1.22}, {0.28, 1.91}, {0.94, 1.77}, {-0.31, 1.5}, {-2.24, 0.51}, {-2.31, -1.29}, {-2.42, -1.74}, {-3.59, -2.94}, {-2.8, -3.15}, {-3.53, -3.04}, {-2.87, -1.56}, {-2.73, -1.06}, {-3.09, -1.14}, {-1.84, -0.31}, {-1.69, -0.23}, {-0.54, -0.99}, {4.26, -3.02}, {7.61, 2.5}, {8.4, 2.11}, {9.79, -0.58}, {8.69, -1.11}, {9.78, -0.94}, {7.46, -0.76}, {6.65, -0.54}, {7.3, 0.9}, {3.21, 1.27}, {2.62, 1.72}, {2.94, 1.94}, {2.62, 1.39}, {2.33, 1.25}, {2.4, 1.7}, {0.97, 1.19}, {0.73, 1.2}, {1.16, 0.88}, {3.64, 0.45}, {3.39, -0.87}, {3.8, -0.93}, {5.47, -1.88}, {4.93, -1.82}, {3.57, 1.82}, {-0.08, 1.49}, {-1.41, 1.18}, {-1.75, 1.09}, {-2.14, 1.27}, {-2.1, 0.77}, {-2.46, 0.43}, {-6.76, -0.03}, {-6.01, -1.16}, {-6.76, -1.25}}
M4A1S = {{0,0}, {0.18, 0.78}, {0.17, 0.68}, {0.15, 0.68}, {0.1, 0.79}, {0.03, 0.66}, {-0.01, 0.58}, {-0.05, 0.58}, {-0.1, 0.65}, {-0.46, 1.77}, {-0.6, 1.51}, {-0.53, 1.52}, {-0.25, 1.78}, {0.31, 2.44}, {0.76, 2.1}, {0.75, 2.1}, {0.3, 2.44}, {-0.4, 2.86}, {-0.83, 2.43}, {-0.99, 2.41}, {-0.86, 2.8}, {-0.92, 3.14}, {-0.92, 2.8}, {-0.47, 2.79}, {0.43, 3.09}, {1.19, 2.24}, {1.7, 1.58}, {1.94, 1.45}, {1.91, 1.86}, {1.03, 1.57}, {0.77, 1.5}, {0.86, 1.41}, {1.31, 1.28}, {2.45, 0.88}, {2.6, 0.06}, {2.34, 0.28}, {1.67, 1.53}, {0.28, 1.37}, {-0.38, 1.28}, {-0.83, 1.2}, {-1.08, 1.12}, {-1.62, 1.23}, {-1.68, 0.71}, {-1.83, 0.38}, {-2.08, 0.24}, {-3.29, -0.0}, {-2.88, -0.52}, {-2.89, -0.67}, {-3.3, -0.43}, {-2.59, -0.0}, {-2.28, 0.17}, {-2.28, 0.15}, {-2.59, -0.05}, {-3.17, -0.72}, {-3.01, -1.12}, {-2.59, -0.67}, {-1.93, 0.63}, {-0.17, 0.34}, {0.04, 0.37}, {0.18, 0.38}, {0.25, 0.37}, {1.07, 0.64}, {1.34, 0.23}, {1.09, 0.29}, {0.32, 0.81}, {-0.62, 0.84}, {-1.16, 0.08}, {-1.44, -0.27}, {-1.45, -0.21}, {-1.86, -0.52}, {-1.8, -0.88}, {-1.5, -0.44}, {-0.98, 0.81}, {0.04, 0.32}, {0.35, 0.18}, {0.48, 0.13}, {0.46, 0.18}}
FAMAS = {{0,0}, {-0.75, 0.66}, {-0.68, 0.59}, {-0.45, 0.83}, {0.06, 0.69}, {0.29, 0.62}, {0.1, 0.7}, {-0.86, 1.85}, {-1.31, 1.43}, {-1.07, 1.8}, {-0.53, 2.82}, {0.04, 2.6}, {0.1, 2.92}, {-0.27, 3.68}, {-0.18, 3.28}, {0.68, 3.53}, {1.75, 3.49}, {2.31, 2.7}, {2.89, 2.75}, {3.07, 1.81}, {3.0, 1.31}, {1.82, 2.52}, {-0.12, 2.33}, {-1.24, 1.93}, {-1.86, 1.77}, {-2.99, 1.84}, {-3.12, 0.89}, {-3.5, 1.0}, {-2.89, 1.16}, {-2.57, 1.01}, {-2.97, 0.87}, {-2.58, -0.09}, {-2.36, -0.31}, {-1.55, 1.11}, {0.11, 1.2}, {1.03, 0.93}, {1.34, 0.77}, {3.76, 1.22}, {3.67, 0.16}, {4.02, 0.6}, {2.01, 0.91}, {1.72, 1.0}, {2.06, 0.65}, {3.38, -0.16}, {3.0, -0.83}, {3.4, -0.48}, {1.01, 0.11}, {0.89, 0.21}, {1.01, 0.16}, {2.61, -0.21}, {2.34, -0.37}, {2.39, 0.54}, {0.93, 0.63}, {0.61, 0.82}, {0.09, 1.02}, {-0.45, 0.77}, {-0.8, 0.41}, {-0.97, 0.27}, {-4.59, -0.01}, {-4.21, -1.03}, {-3.75, 0.17}, {-0.71, 0.37}, {-0.52, 0.51}, {-0.01, 0.62}, {1.34, 0.82}, {1.89, -0.49}, {2.05, -0.73}, {2.67, -0.81}, {2.28, -1.02}, {2.47, -1.33}, {2.8, -1.73}, {2.37, -1.74}, {2.67, -1.94}}
UMP45 = {{0,0}, {-0.12, 1.13}, {-0.1, 1.01}, {-0.23, 1.11}, {-0.58, 1.4}, {-0.66, 1.19}, {-0.55, 1.41}, {-0.46, 2.96}, {-0.06, 2.7}, {-0.23, 3.01}, {-0.62, 3.81}, {-0.71, 3.36}, {-1.06, 3.71}, {-1.63, 3.93}, {-1.72, 3.4}, {-1.42, 3.99}, {-1.07, 4.44}, {-0.5, 4.04}, {0.53, 4.44}, {1.74, 3.1}, {2.32, 2.43}, {1.39, 3.16}, {-0.51, 2.07}, {-1.16, 1.75}, {-0.48, 2.06}, {0.81, 2.65}, {1.56, 2.05}, {2.15, 1.92}, {2.97, 1.91}, {3.0, 1.13}, {3.42, 1.15}, {2.61, 0.48}, {2.38, 0.3}, {1.86, 1.39}, {0.07, 0.57}, {-0.23, 0.57}, {-0.06, 0.63}, {0.69, 1.15}, {0.96, 0.86}, {0.73, 1.14}, {-0.09, 1.02}, {-0.34, 0.95}, {0.27, 0.77}, {1.47, 0.23}, {1.47, -0.89}, {1.64, -0.98}, {1.13, -0.72}, {1.02, -0.69}, {0.68, 0.29}, {-0.64, 1.63}, {-2.73, 0.53}, {-3.04, 0.41}, {-3.7, 1.09}, {-3.4, 0.73}, {-2.32, -0.69}, {-0.12, -0.38}, {0.15, -0.4}, {0.28, -0.38}, {1.79, -1.35}, {2.25, -0.81}, {2.59, -0.68}, {3.29, -1.36}, {3.04, -1.03}, {1.92, 1.27}, {-0.18, 0.62}, {-0.8, 0.32}, {-0.94, 0.21}, {-3.72, 0.48}, {-3.39, -0.32}, {-3.6, -0.71}, {-0.68, -0.19}, {-0.58, -0.23}, {-0.66, -0.26}}
MP7 = {{0,0}, {0.04, 0.6}, {0.06, 0.52}, {0.02, 0.52}, {-0.05, 0.59}, {-0.09, 0.45}, {-0.12, 0.39}, {-0.17, 0.37}, {-0.23, 0.4}, {-0.34, 0.46}, {-0.36, 0.36}, {-0.37, 0.35}, {-0.37, 0.44}, {-0.81, 1.23}, {-0.63, 1.13}, {-0.61, 1.15}, {-0.74, 1.28}, {-1.32, 1.82}, {-1.3, 1.53}, {-1.14, 1.6}, {-0.84, 2.03}, {-0.16, 2.21}, {0.42, 2.01}, {0.4, 2.0}, {-0.22, 2.19}, {-0.97, 1.85}, {-1.32, 1.38}, {-1.39, 1.35}, {-1.19, 1.76}, {-0.45, 1.75}, {-0.04, 1.68}, {-0.16, 1.6}, {-0.82, 1.5}, {-1.13, 0.79}, {-1.25, 0.28}, {-1.34, 0.15}, {-1.42, 0.39}, {-0.97, 0.31}, {-0.94, 0.25}, {-0.74, 0.4}, {-0.38, 0.76}, {0.22, 1.47}, {0.96, 1.09}, {1.4, 0.87}, {1.54, 0.81}, {2.39, 1.01}, {2.26, 0.47}, {2.34, 0.23}, {2.63, 0.29}, {2.39, 0.31}, {2.11, 0.2}, {2.11, 0.14}, {2.4, 0.14}, {2.04, -0.15}, {1.88, -0.36}, {1.75, -0.04}, {1.64, 0.82}, {0.42, 0.54}, {0.18, 0.62}, {-0.02, 0.67}, {-0.18, 0.7}, {-0.51, 0.93}, {-0.7, 0.66}, {-0.86, 0.53}, {-0.98, 0.54}, {-0.49, 0.23}, {-0.46, 0.14}, {-0.47, 0.12}, {-0.52, 0.17}, {-0.58, 0.14}, {-0.57, 0.09}, {-0.45, 0.18}, {-0.22, 0.42}, {0.21, 0.47}, {0.57, 0.24}, {0.63, 0.24}, {0.37, 0.46}, {0.03, 0.62}, {-0.17, 0.56}, {-0.36, 0.47}, {-0.52, 0.35}, {-1.94, 0.45}, {-1.81, -0.37}, {-1.84, -0.8}, {-2.02, -0.83}, {-2.72, -1.17}, {-2.32, -1.32}, {-2.27, -1.25}, {-2.57, -0.95}, {-0.52, -0.08}, {-0.47, 0.0}, {-0.47, 0.01}, {-0.53, -0.04}, {-1.43, -0.06}, {-1.38, 0.01}, {-1.13, -0.27}, {-0.66, -0.91}, {0.09, -0.32}, {0.36, -0.2}, {0.4, -0.2}, {0.23, -0.33}, {0.0, -0.3}, {-0.08, -0.29}, {-0.16, -0.21}, {-0.24, -0.05}, {-0.14, 0.14}, {0.03, 0.27}, {0.05, 0.3}, {-0.09, 0.25}, {-0.57, 0.22}, {-0.63, -0.1}, {-0.63, -0.11}, {-0.58, 0.21}, {-0.21, 0.31}, {-0.05, 0.35}, {0.01, 0.38}, {-0.03, 0.41}}
MP9 = {{0,0}, {-0.06, 1.42}, {-0.25, 1.37}, {-0.78, 1.07}, {-0.63, 1.11}, {0.59, 2.78}, {1.0, 2.79}, {-0.48, 4.4}, {-0.29, 4.37}, {2.43, 5.36}, {2.47, 5.35}, {0.26, 5.22}, {-0.92, 5.21}, {-2.59, 5.49}, {-1.39, 5.53}, {1.82, 3.97}, {3.44, 3.05}, {4.88, 3.09}, {5.55, 1.7}, {5.5, 0.56}, {5.56, -0.51}, {6.82, -3.0}, {5.91, -0.05}, {0.32, 2.2}, {-0.78, 2.69}, {0.66, 2.9}, {-0.23, 2.62}, {-5.22, 2.59}, {-6.44, 1.18}, {-3.31, 2.16}, {-3.27, 2.24}, {-4.45, 1.93}, {-4.56, 1.71}, {-3.43, 1.78}, {-3.57, 1.31}, {-5.25, 0.28}, {-5.24, -0.86}, {-8.97, -4.96}, {-5.99, -0.22}, {0.73, 0.86}, {1.83, 0.35}, {4.05, 0.95}, {4.15, 0.48}, {5.39, -0.03}, {4.94, 0.56}, {1.1, 0.4}, {0.39, 0.72}, {-3.55, 0.93}, {-5.12, -1.93}, {-6.55, -2.47}, {-6.59, -1.18}, {-1.54, 0.71}, {-1.43, 1.04}, {-3.35, 0.7}, {-1.94, 1.62}, {1.7, 1.68}, {3.05, 1.07}, {1.29, 1.25}, {1.19, 1.36}}
MAC = {{0,0}, {-0.82, 0.45}, {-0.73, 0.39}, {-0.66, 0.62}, {-0.38, 0.59}, {-0.2, 0.6}, {-0.03, 0.7}, {0.3, 1.08}, {0.57, 0.88}, {0.56, 1.03}, {0.7, 2.3}, {0.48, 2.09}, {0.78, 2.26}, {1.61, 2.97}, {1.72, 2.49}, {1.8, 2.88}, {2.11, 4.05}, {1.73, 3.67}, {1.86, 4.17}, {1.85, 3.48}, {1.61, 3.12}, {0.78, 3.72}, {-0.83, 3.03}, {-1.54, 2.59}, {-0.42, 2.98}, {1.07, 1.84}, {1.68, 1.26}, {1.58, 1.64}, {0.85, 1.84}, {0.49, 1.75}, {0.6, 1.95}, {0.93, 1.9}, {0.88, 1.68}, {0.43, 2.0}, {-0.16, 1.32}, {-0.46, 1.13}, {-0.59, 1.24}, {-0.29, 0.8}, {-0.3, 0.69}, {-0.53, 0.63}, {-1.46, 0.89}, {-1.52, 0.39}, {-1.75, 0.26}, {-3.53, 0.42}, {-3.18, 0.02}, {-3.56, -0.29}, {-5.85, -0.96}, {-5.23, -1.28}, {-3.24, -0.91}, {-0.31, -0.1}, {-0.28, -0.1}, {-0.31, -0.11}, {-2.34, -0.22}, {-2.42, -0.23}, {-0.93, -1.37}, {0.89, -0.29}, {1.49, 0.54}, {0.91, -0.29}, {-0.41, -0.78}, {-1.22, -0.21}, {-1.37, -0.14}, {-2.03, -0.36}, {-1.84, -0.12}, {-2.07, 0.06}, {-2.36, -0.15}, {-2.13, -0.01}, {-0.86, 1.18}, {1.45, 1.47}, {3.11, -0.47}, {3.4, -0.39}, {2.26, 0.29}, {2.0, 0.3}, {2.26, 0.27}, {2.72, 0.26}, {2.42, 0.17}, {2.73, 0.05}, {3.76, -0.62}, {3.35, -0.77}, {3.48, 0.62}, {0.8, 0.51}, {0.54, 0.67}, {-0.08, 0.74}, {-3.75, 1.42}, {-4.46, -1.43}, {-2.25, -2.49}, {0.19, -0.29}, {0.47, -0.07}, {0.51, -0.09}}
weapon = {AK47, M4A4, AUG, SG553, M4A1S, FAMAS, UMP45, MP7, MP9, MAC}
------------------------ Rate of Fire ----------------------
ak47_ROF = {delay = 100, interpolation = 4}
m4a4_ROF = {delay = 90, interpolation = 3}
aug_ROF = {delay = 90, interpolation = 3}
sg553_ROF = {delay = 90, interpolation = 3}
m4a1s_ROF = {delay = 100, interpolation = 4}
famas_ROF = {delay = 90, interpolation = 3}
ump_ROF = {delay = 90, interpolation = 3}
mp7_ROF = {delay = 80, interpolation = 4}
mp9_ROF = {delay = 70, interpolation = 2}
mac_ROF = {delay = 75, interpolation = 3}
weaponRof = {ak47_ROF, m4a4_ROF, aug_ROF, sg553_ROF, m4a1s_ROF, famas_ROF, ump_ROF, mp7_ROF, mp9_ROF, mac_ROF}
------------------- Weapon Sensitivity ---------------------
AKsen = 2.85
M4sen = 2.8
AUGsen = 4.7
SG553sen = 2.8
M4A1sen = 2.3
FAMsen = 3
UMPsen = 2.8
MP7sen = 3
MP9sen = 2.9
MACsen = 2.8
weaponSen = {AKsen, M4sen, AUGsen, SG553sen, M4A1sen, FAMsen, UMPsen, MP7sen, MP9sen, MACsen}
------------------------------------------------------------
indexW = 1 --index of weapon
indexP = 1 --index of Pattern
indexT = 1 -- 1 rifle / 2 smg
function OnEvent(event, arg)
EnablePrimaryMouseButtonEvents(true)
if IsMouseButtonPressed(2) then
indexW = indexW + 1
if indexT == 1 then
if indexW > 6 then
indexW = 1
end
end
if indexT == 2 then
if indexW > 10 then
indexW = 7
end
end
if indexW == 1 then
PressAndReleaseKey("insert")
end
if indexW == 2 then
PressAndReleaseKey("home")
end
if indexW == 3 then
PressAndReleaseKey("pageup")
end
if indexW == 4 then
PressAndReleaseKey("delete")
end
if indexW == 5 then
PressAndReleaseKey("end")
end
if indexW == 6 then
PressAndReleaseKey("pagedown")
end
if indexW == 7 then
PressAndReleaseKey("up")
end
if indexW == 8 then
PressAndReleaseKey("down")
end
if indexW == 9 then
PressAndReleaseKey("left")
end
if indexW == 10 then
PressAndReleaseKey("right")
end
end
while IsMouseButtonPressed(4) do
if IsMouseButtonPressed(1) and indexP < table.getn(weapon[indexW]) then
MoveMouseRelative(weapon[indexW][indexP][1]*weaponSen[indexW], weapon[indexW][indexP][2]*weaponSen[indexW])
Sleep(weaponRof[indexW].delay/weaponRof[indexW].interpolation)
indexP = indexP + 1
else
Sleep(10)
indexP = 1
end
if IsMouseButtonPressed(2) then
indexT = indexT + 1
if indexT > 2 then
indexT = 1
end
if indexT == 1 then
indexW = 1
PressAndReleaseKey("insert")
else
indexW = 7
PressAndReleaseKey("up")
end
Sleep(300)
OutputLogMessage(indexW)
end
end
indexP = 1
end
table.getn does not exist in more recent versions of Lua. Instead, use the length operator: #weapon[indexW].

Google Maps sdk ios Api error

I try to show the map on the simulator and I tried so much to sold this problem but I always have this error how can I fixed please ?
**2016-05-24 14:32:41.295 Menti[40241:2494765] ClientParametersRequest failed, 7 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:32:41.879 Menti[40241:2494765] Google Maps SDK for iOS (M4B) version: 1.13.24482.0
2016-05-24 14:32:42.389 Menti[40241:2494765] ClientParametersRequest failed, 6 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:32:44.661 Menti[40241:2494765] ClientParametersRequest failed, 5 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:32:49.102 Menti[40241:2494765] ClientParametersRequest failed, 4 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:32:57.173 Menti[40241:2494765] ClientParametersRequest failed, 3 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:33:13.234 Menti[40241:2494765] ClientParametersRequest failed, 2 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:33:45.302 Menti[40241:2494765] ClientParametersRequest failed, 1 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:34:49.602 Menti[40241:2494765] ClientParametersRequest failed, 0 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:34:49.602 Menti[40241:2494765] Google Maps SDK for iOS (M4B) cannot connect or validate APIKey: Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:34:49.602 Menti[40241:2494765] Your key may be invalid for your bundle ID: com.menti.maps**
You have created a key for your application in google portal right. So in that, you have specified projects bundle identifier. You have to use the same bundle identifier for your application also. And also in App delegate method you have to use the same key.
Please follow the link
1.Google Map Integration for IOS
https://www.codeschool.com/courses/exploring-google-maps-for-ios
Please note below point also
If you want to practice on google maps from iOS devices then just download the GoogleMaps.framework from the below link: https://developers.google.com/maps/documentation/ios/start#getting_the_google_maps_sdk_for_ios
If you want to use GoogleMapsM4B.framework in your project then
You should request support on the Enterprise Support portal(Google's website)
You must enable Google Maps Mobile SDK for Work not Google Maps SDK for iOS in Google’s console website.
You can find the key differences between the Google Maps SDK for iOS and the Google Maps Mobile SDK for Work(M4B) in the below link: https://developers.google.com/maps/documentation/business/mobile/ios/
Hope this will Help You.
Seems like you are using wrong sdk.
as error suggests Google Maps SDK for iOS (M4B) cannot connect or validate APIKey means you are using Google Maps SDK Business version sdk and may be you are using right API key.
import correct Google Maps SDK and use appropriate API key.
#import <GoogleMaps/GoogleMaps.h>
Also check here: not able to use Google map sdk in ios
Just enable "Google Maps SDK for Ios and Android on Google Cloud Platform Console

NSInvalidArgumentException crash for iPad Pro Sim but not for other iPad Sim

I have an app in the App Store that I haven't maintained since iOS7's release and getting some requests to refresh it.
I am attempting to get it updated so that it runs on latest iOS 8 and all current iOS iPad devices.
When I test run in sim for any non-Pro iPad simulators, it works. But when I test run on iPad Pro, it crashes. Here are the details.
In main.m:
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
// crashes on this line (i know this is not that useful)
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
Output window (apologize for the verbosity here, but didn't want to leave out anything potentially useful):
Warning: Error creating LLDB target at path '/Users/pubnubcvconover/Library/Developer/Xcode/DerivedData/Stats-Pad-coxczetuymekypghmygwqysiqulp/Build/Products/Debug-iphonesimulator/Lacrosse-Stats.app'- using an empty LLDB target which can cause slow memory reads from remote devices.
2016-02-28 16:59:43.301 Lacrosse-Stats[4205:95840] ADBannerView:didFailToReceiveAdWithError:The operation couldn’t be completed. (ADErrorDomain error 3.)
2016-02-28 16:59:43.303 Lacrosse-Stats[4205:95840] Ran setTeams
2016-02-28 16:59:44.222 Lacrosse-Stats[4205:95840] CoreData: error: -addPersistentStoreWithType:Binary configuration:(null) URL:file:///Users/pubnubcvconover/Library/Developer/CoreSimulator/Devices/91D7C4F6-34CA-4761-913F-C0B50E753469/data/Containers/Data/Application/ED789ADC-FB9C-43E2-8FDE-E02D80DD43E6/Documents/Stats_Pad.bin options:{
NSInferMappingModelAutomaticallyOption = 1;
NSMigratePersistentStoresAutomaticallyOption = 1;
} ... returned error Error Domain=NSCocoaErrorDomain Code=134130 "(null)" UserInfo={URL=file:///Users/pubnubcvconover/Library/Developer/CoreSimulator/Devices/91D7C4F6-34CA-4761-913F-C0B50E753469/data/Containers/Data/Application/ED789ADC-FB9C-43E2-8FDE-E02D80DD43E6/Documents/Stats_Pad.bin, metadata={
NSPersistenceFrameworkVersion = 641;
NSStoreModelVersionHashes = {
"field_conditions" = <1a8f23c4 a8f9f08a 7504bd89 b6c608df 89106202 f9c81f02 2441924c 12245334>;
"field_layout" = <da72d767 8f4c3614 fe56ab18 37905a4e b7890395 03515759 46c20c7b 78cbb6cb>;
game = <8f8c1e3b 595416df 4164209d 35268bfd e4f41bf7 aed776a9 3bcfe86a dea6fe6a>;
gender = <bcdc57c3 7ad84924 40c67207 735167f4 e773c4b8 6fc53316 b9fe0220 4e53fad8>;
levels = <7aa35176 e55edff3 7ac01812 5cc17a05 60013487 92196c1d 366a437b a108a9ef>;
p = <593e105a 8ce080f6 aeb0081d 250039e3 6363b0a0 380fc096 6d18653e da7c1612>;
"p_event" = <acf2f48d 3d5ef365 6e6153a2 268ab4d2 9c4776ed 6165781e f86c0bbc 5b8bfe90>;
"p_type" = <36aaae5d db755d03 9a66e7b0 703ca8bf 5de4210a c6c9e8e3 ea77b8f4 6fd8f8fb>;
penalty = <a8ff8a90 08434fec 24caa525 b16972eb f9a35891 54945888 e68d6faf 7d7aea9f>;
"penalty_event" = <09ef67b3 238a32e0 1a2526d6 82374563 c7275b43 a11d26df fa8447b4 ac7f1175>;
"penalty_type" = <3cdcaf67 0748f85e 0b300ba0 4119f7c2 04cf6a39 1b836ec8 5850f3e6 3662e8ff>;
player = <9d572c6d 15c11f5f 5d4aa3d0 10b75ea3 fa3dd352 1f89a53f f3a3f02e b3d1a4c1>;
position = <89407c79 8f0655a6 550666a3 9e87738d fb985882 5ae70c3a 9ca51fd7 50b24a94>;
roster = <34471eca 339a9ab4 ed86afc9 727c17c3 6117156b e726de09 97c979f2 d4272814>;
rules = <0f7d4bc6 5b82e1ee 6b3e9c3d 2c73ea62 78c6bbbb bb02b6c0 0bdc8a5e 2bc1d22d>;
statistic = <b92a539d 6329e839 d24a80ef e4006a28 3ee3cf68 5cbe1342 5a79f9c7 760f3ffe>;
"statistic_event" = <2d6d03bf 53f05b88 ddc692bc ab805dea 210dc3cb 93ea04e9 c2005fe1 d9f817d3>;
"statistic_type" = <84c5603e 008cdbc3 411c883d a0ac485b 160c35c8 f5ce7394 0fc06d2d c72ece9d>;
team = <97de1350 f685c550 8de940e6 e0c6d8fc f2cd1b80 94725d1b 535f0ff3 13474223>;
"weather_conditions" = <23bce103 1dbe85b6 c7b92d66 69c2d334 34baf747 8ae60dcc dee2b5e0 b739bf31>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = Binary;
NSStoreUUID = "829124BC-14FB-43C5-A845-A630BB9603E9";
"_NSAutoVacuumLevel" = 2;
}, reason=Can't find model for source store} with userInfo dictionary {
URL = "file:///Users/pubnubcvconover/Library/Developer/CoreSimulator/Devices/91D7C4F6-34CA-4761-913F-C0B50E753469/data/Containers/Data/Application/ED789ADC-FB9C-43E2-8FDE-E02D80DD43E6/Documents/Stats_Pad.bin";
metadata = {
NSPersistenceFrameworkVersion = 641;
NSStoreModelVersionHashes = {
"field_conditions" = <1a8f23c4 a8f9f08a 7504bd89 b6c608df 89106202 f9c81f02 2441924c 12245334>;
"field_layout" = <da72d767 8f4c3614 fe56ab18 37905a4e b7890395 03515759 46c20c7b 78cbb6cb>;
game = <8f8c1e3b 595416df 4164209d 35268bfd e4f41bf7 aed776a9 3bcfe86a dea6fe6a>;
gender = <bcdc57c3 7ad84924 40c67207 735167f4 e773c4b8 6fc53316 b9fe0220 4e53fad8>;
levels = <7aa35176 e55edff3 7ac01812 5cc17a05 60013487 92196c1d 366a437b a108a9ef>;
p = <593e105a 8ce080f6 aeb0081d 250039e3 6363b0a0 380fc096 6d18653e da7c1612>;
"p_event" = <acf2f48d 3d5ef365 6e6153a2 268ab4d2 9c4776ed 6165781e f86c0bbc 5b8bfe90>;
"p_type" = <36aaae5d db755d03 9a66e7b0 703ca8bf 5de4210a c6c9e8e3 ea77b8f4 6fd8f8fb>;
penalty = <a8ff8a90 08434fec 24caa525 b16972eb f9a35891 54945888 e68d6faf 7d7aea9f>;
"penalty_event" = <09ef67b3 238a32e0 1a2526d6 82374563 c7275b43 a11d26df fa8447b4 ac7f1175>;
"penalty_type" = <3cdcaf67 0748f85e 0b300ba0 4119f7c2 04cf6a39 1b836ec8 5850f3e6 3662e8ff>;
player = <9d572c6d 15c11f5f 5d4aa3d0 10b75ea3 fa3dd352 1f89a53f f3a3f02e b3d1a4c1>;
position = <89407c79 8f0655a6 550666a3 9e87738d fb985882 5ae70c3a 9ca51fd7 50b24a94>;
roster = <34471eca 339a9ab4 ed86afc9 727c17c3 6117156b e726de09 97c979f2 d4272814>;
rules = <0f7d4bc6 5b82e1ee 6b3e9c3d 2c73ea62 78c6bbbb bb02b6c0 0bdc8a5e 2bc1d22d>;
statistic = <b92a539d 6329e839 d24a80ef e4006a28 3ee3cf68 5cbe1342 5a79f9c7 760f3ffe>;
"statistic_event" = <2d6d03bf 53f05b88 ddc692bc ab805dea 210dc3cb 93ea04e9 c2005fe1 d9f817d3>;
"statistic_type" = <84c5603e 008cdbc3 411c883d a0ac485b 160c35c8 f5ce7394 0fc06d2d c72ece9d>;
team = <97de1350 f685c550 8de940e6 e0c6d8fc f2cd1b80 94725d1b 535f0ff3 13474223>;
"weather_conditions" = <23bce103 1dbe85b6 c7b92d66 69c2d334 34baf747 8ae60dcc dee2b5e0 b739bf31>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = Binary;
NSStoreUUID = "829124BC-14FB-43C5-A845-A630BB9603E9";
"_NSAutoVacuumLevel" = 2;
};
reason = "Can't find model for source store";
}
2016-02-28 16:59:44.223 Lacrosse-Stats[4205:95840] CoreData: annotation: NSPersistentStoreCoordinator's current model hashes are {
"field_conditions" = <1a8f23c4 a8f9f08a 7504bd89 b6c608df 89106202 f9c81f02 2441924c 12245334>;
"field_layout" = <da72d767 8f4c3614 fe56ab18 37905a4e b7890395 03515759 46c20c7b 78cbb6cb>;
game = <7c5aa182 4171414b b6bcfb04 358894d8 95dd0b1f b32ba46d 440ac807 17a00b19>;
gender = <bcdc57c3 7ad84924 40c67207 735167f4 e773c4b8 6fc53316 b9fe0220 4e53fad8>;
levels = <7aa35176 e55edff3 7ac01812 5cc17a05 60013487 92196c1d 366a437b a108a9ef>;
p = <593e105a 8ce080f6 aeb0081d 250039e3 6363b0a0 380fc096 6d18653e da7c1612>;
"p_event" = <acf2f48d 3d5ef365 6e6153a2 268ab4d2 9c4776ed 6165781e f86c0bbc 5b8bfe90>;
"p_type" = <36aaae5d db755d03 9a66e7b0 703ca8bf 5de4210a c6c9e8e3 ea77b8f4 6fd8f8fb>;
penalty = <a8ff8a90 08434fec 24caa525 b16972eb f9a35891 54945888 e68d6faf 7d7aea9f>;
"penalty_event" = <09ef67b3 238a32e0 1a2526d6 82374563 c7275b43 a11d26df fa8447b4 ac7f1175>;
"penalty_type" = <3cdcaf67 0748f85e 0b300ba0 4119f7c2 04cf6a39 1b836ec8 5850f3e6 3662e8ff>;
player = <4918d629 1aacc24b 59f5942f 0a0222ea 72edf9c7 18d74c0b ec0de756 5ad19d4a>;
position = <89407c79 8f0655a6 550666a3 9e87738d fb985882 5ae70c3a 9ca51fd7 50b24a94>;
roster = <34471eca 339a9ab4 ed86afc9 727c17c3 6117156b e726de09 97c979f2 d4272814>;
rules = <0f7d4bc6 5b82e1ee 6b3e9c3d 2c73ea62 78c6bbbb bb02b6c0 0bdc8a5e 2bc1d22d>;
statistic = <b92a539d 6329e839 d24a80ef e4006a28 3ee3cf68 5cbe1342 5a79f9c7 760f3ffe>;
"statistic_event" = <f8cecbe6 338d513d fc123e58 0cc3c8c6 15295759 91a7eb52 af6f5603 c26f571a>;
"statistic_type" = <84c5603e 008cdbc3 411c883d a0ac485b 160c35c8 f5ce7394 0fc06d2d c72ece9d>;
team = <214fad10 4519c1a5 e799b6ec aefc9adf 16dcae30 b09a01c6 00c4a89d cb113e16>;
"weather_conditions" = <23bce103 1dbe85b6 c7b92d66 69c2d334 34baf747 8ae60dcc dee2b5e0 b739bf31>;
}
2016-02-28 16:59:44.225 Lacrosse-Stats[4205:95840] Unresolved error Error Domain=NSCocoaErrorDomain Code=134130 "(null)" UserInfo={URL=file:///Users/pubnubcvconover/Library/Developer/CoreSimulator/Devices/91D7C4F6-34CA-4761-913F-C0B50E753469/data/Containers/Data/Application/ED789ADC-FB9C-43E2-8FDE-E02D80DD43E6/Documents/Stats_Pad.bin, metadata={
NSPersistenceFrameworkVersion = 641;
NSStoreModelVersionHashes = {
"field_conditions" = <1a8f23c4 a8f9f08a 7504bd89 b6c608df 89106202 f9c81f02 2441924c 12245334>;
"field_layout" = <da72d767 8f4c3614 fe56ab18 37905a4e b7890395 03515759 46c20c7b 78cbb6cb>;
game = <8f8c1e3b 595416df 4164209d 35268bfd e4f41bf7 aed776a9 3bcfe86a dea6fe6a>;
gender = <bcdc57c3 7ad84924 40c67207 735167f4 e773c4b8 6fc53316 b9fe0220 4e53fad8>;
levels = <7aa35176 e55edff3 7ac01812 5cc17a05 60013487 92196c1d 366a437b a108a9ef>;
p = <593e105a 8ce080f6 aeb0081d 250039e3 6363b0a0 380fc096 6d18653e da7c1612>;
"p_event" = <acf2f48d 3d5ef365 6e6153a2 268ab4d2 9c4776ed 6165781e f86c0bbc 5b8bfe90>;
"p_type" = <36aaae5d db755d03 9a66e7b0 703ca8bf 5de4210a c6c9e8e3 ea77b8f4 6fd8f8fb>;
penalty = <a8ff8a90 08434fec 24caa525 b16972eb f9a35891 54945888 e68d6faf 7d7aea9f>;
"penalty_event" = <09ef67b3 238a32e0 1a2526d6 82374563 c7275b43 a11d26df fa8447b4 ac7f1175>;
"penalty_type" = <3cdcaf67 0748f85e 0b300ba0 4119f7c2 04cf6a39 1b836ec8 5850f3e6 3662e8ff>;
player = <9d572c6d 15c11f5f 5d4aa3d0 10b75ea3 fa3dd352 1f89a53f f3a3f02e b3d1a4c1>;
position = <89407c79 8f0655a6 550666a3 9e87738d fb985882 5ae70c3a 9ca51fd7 50b24a94>;
roster = <34471eca 339a9ab4 ed86afc9 727c17c3 6117156b e726de09 97c979f2 d4272814>;
rules = <0f7d4bc6 5b82e1ee 6b3e9c3d 2c73ea62 78c6bbbb bb02b6c0 0bdc8a5e 2bc1d22d>;
statistic = <b92a539d 6329e839 d24a80ef e4006a28 3ee3cf68 5cbe1342 5a79f9c7 760f3ffe>;
"statistic_event" = <2d6d03bf 53f05b88 ddc692bc ab805dea 210dc3cb 93ea04e9 c2005fe1 d9f817d3>;
"statistic_type" = <84c5603e 008cdbc3 411c883d a0ac485b 160c35c8 f5ce7394 0fc06d2d c72ece9d>;
team = <97de1350 f685c550 8de940e6 e0c6d8fc f2cd1b80 94725d1b 535f0ff3 13474223>;
"weather_conditions" = <23bce103 1dbe85b6 c7b92d66 69c2d334 34baf747 8ae60dcc dee2b5e0 b739bf31>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = Binary;
NSStoreUUID = "829124BC-14FB-43C5-A845-A630BB9603E9";
"_NSAutoVacuumLevel" = 2;
}, reason=Can't find model for source store}, {
URL = "file:///Users/pubnubcvconover/Library/Developer/CoreSimulator/Devices/91D7C4F6-34CA-4761-913F-C0B50E753469/data/Containers/Data/Application/ED789ADC-FB9C-43E2-8FDE-E02D80DD43E6/Documents/Stats_Pad.bin";
metadata = {
NSPersistenceFrameworkVersion = 641;
NSStoreModelVersionHashes = {
"field_conditions" = <1a8f23c4 a8f9f08a 7504bd89 b6c608df 89106202 f9c81f02 2441924c 12245334>;
"field_layout" = <da72d767 8f4c3614 fe56ab18 37905a4e b7890395 03515759 46c20c7b 78cbb6cb>;
game = <8f8c1e3b 595416df 4164209d 35268bfd e4f41bf7 aed776a9 3bcfe86a dea6fe6a>;
gender = <bcdc57c3 7ad84924 40c67207 735167f4 e773c4b8 6fc53316 b9fe0220 4e53fad8>;
levels = <7aa35176 e55edff3 7ac01812 5cc17a05 60013487 92196c1d 366a437b a108a9ef>;
p = <593e105a 8ce080f6 aeb0081d 250039e3 6363b0a0 380fc096 6d18653e da7c1612>;
"p_event" = <acf2f48d 3d5ef365 6e6153a2 268ab4d2 9c4776ed 6165781e f86c0bbc 5b8bfe90>;
"p_type" = <36aaae5d db755d03 9a66e7b0 703ca8bf 5de4210a c6c9e8e3 ea77b8f4 6fd8f8fb>;
penalty = <a8ff8a90 08434fec 24caa525 b16972eb f9a35891 54945888 e68d6faf 7d7aea9f>;
"penalty_event" = <09ef67b3 238a32e0 1a2526d6 82374563 c7275b43 a11d26df fa8447b4 ac7f1175>;
"penalty_type" = <3cdcaf67 0748f85e 0b300ba0 4119f7c2 04cf6a39 1b836ec8 5850f3e6 3662e8ff>;
player = <9d572c6d 15c11f5f 5d4aa3d0 10b75ea3 fa3dd352 1f89a53f f3a3f02e b3d1a4c1>;
position = <89407c79 8f0655a6 550666a3 9e87738d fb985882 5ae70c3a 9ca51fd7 50b24a94>;
roster = <34471eca 339a9ab4 ed86afc9 727c17c3 6117156b e726de09 97c979f2 d4272814>;
rules = <0f7d4bc6 5b82e1ee 6b3e9c3d 2c73ea62 78c6bbbb bb02b6c0 0bdc8a5e 2bc1d22d>;
statistic = <b92a539d 6329e839 d24a80ef e4006a28 3ee3cf68 5cbe1342 5a79f9c7 760f3ffe>;
"statistic_event" = <2d6d03bf 53f05b88 ddc692bc ab805dea 210dc3cb 93ea04e9 c2005fe1 d9f817d3>;
"statistic_type" = <84c5603e 008cdbc3 411c883d a0ac485b 160c35c8 f5ce7394 0fc06d2d c72ece9d>;
team = <97de1350 f685c550 8de940e6 e0c6d8fc f2cd1b80 94725d1b 535f0ff3 13474223>;
"weather_conditions" = <23bce103 1dbe85b6 c7b92d66 69c2d334 34baf747 8ae60dcc dee2b5e0 b739bf31>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = Binary;
NSStoreUUID = "829124BC-14FB-43C5-A845-A630BB9603E9";
"_NSAutoVacuumLevel" = 2;
};
reason = "Can't find model for source store";
}
2016-02-28 16:59:44.228 Lacrosse-Stats[4205:95840] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+entityForName: nil is not a legal NSManagedObjectContext parameter searching for entity name 'team''
*** First throw call stack:
(
0 CoreFoundation 0x03ae1a14 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x035a2e02 objc_exception_throw + 50
2 CoreData 0x0321c859 +[NSEntityDescription entityForName:inManagedObjectContext:] + 281
3 Lacrosse-Stats 0x001c3619 -[SPTeamsController setTeams] + 217
4 Lacrosse-Stats 0x001c4b55 -[SPTeamsController viewDidLoad] + 741
5 UIKit 0x01e8b2ae -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 44
6 UIKit 0x01e8fdce -[UIViewController loadViewIfRequired] + 1384
7 UIKit 0x01edb9f9 -[UINavigationController _layoutViewController:] + 52
8 UIKit 0x01edc2b1 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 421
9 UIKit 0x01edc458 -[UINavigationController _startTransition:fromViewController:toViewController:] + 145
10 UIKit 0x01edd854 -[UINavigationController _startDeferredTransitionIfNeeded:] + 1038
11 UIKit 0x01edeada -[UINavigationController __viewWillLayoutSubviews] + 68
12 UIKit 0x020bac4a -[UILayoutContainerView layoutSubviews] + 252
13 UIKit 0x01d90008 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 810
14 libobjc.A.dylib 0x035b7059 -[NSObject performSelector:withObject:] + 70
15 QuartzCore 0x0111480a -[CALayer layoutSublayers] + 144
16 QuartzCore 0x011084ee _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 388
17 QuartzCore 0x01108352 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
18 QuartzCore 0x010fae8b _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 317
19 QuartzCore 0x0112ee03 _ZN2CA11Transaction6commitEv + 561
20 QuartzCore 0x01130674 _ZN2CA11Transaction17flush_transactionEv + 50
21 UIKit 0x01ce6bf8 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke_2 + 111
22 CoreFoundation 0x039fb6e0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
23 CoreFoundation 0x039f1063 __CFRunLoopDoBlocks + 195
24 CoreFoundation 0x039f0798 __CFRunLoopRun + 1016
25 CoreFoundation 0x039f00e6 CFRunLoopRunSpecific + 470
26 CoreFoundation 0x039efefb CFRunLoopRunInMode + 123
27 GraphicsServices 0x044b1664 GSEventRunModal + 192
28 GraphicsServices 0x044b14a1 GSEventRun + 104
29 UIKit 0x01cc3bfa UIApplicationMain + 160
30 Lacrosse-Stats 0x000ecab9 main + 121
31 libdyld.dylib 0x03f54a21 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Perhaps some architecture build setting I need to adjust? Been out of the iOS dev world for a couple years so not aware of all the details of all the changes - more just high level awareness of such things.
I searched on the first error it prints (Error creating LLDB target) and found this: Xcode - Error creating LLDB target
I asked an iOS Engineer that I work with and he nailed it in 5 seconds.
Menu Option for Simulator
Simulator > Reset Content and Setttings...
And thanks to those that provided input.

Neo4j - 500 Internal Server Error when adding long text to an index

I'm using Neo4j-community-1.9.M04, connecting with python rest client (py2neo 1.4.5).
When I try to add a long text to an index, the server returns 500 Internal Server Error.
Using the py2neo client, I something like:
everything_idx = gdb.get_or_create_index(neo4j.Node, "everything", config={"type": "fulltext"})
everything_idx.add("everything", long_text, recommendation_node)
Where long_text is a variable containing text parsed from a URL and recommendation_node is the Node instance I want to index.
This is what I have in the py2neo log:
INFO 2013-03-05 11:47:17,855 rest 11104 1108 POST /db/data/index/node/everything {'Content-Type': 'application/json', 'X-Stream': 'true', 'Accept': 'application/json', 'User-Agent': 'py2neo/1.4.6 (win32; python/2.7.2)'} (47486 bytes)
INFO 2013-03-05 11:47:17,894 rest 11104 1108 500 Internal Server Error {'content-length': '0', 'server': 'Jetty(6.1.25)'}
In Neo4j logs I have the following:
console.log:
11:47:19.733 [1695422617#qtp-1319007734-22] WARN org.mortbay.log - header full: java.lang.ArrayIndexOutOfBoundsException
11:47:19.734 [1695422617#qtp-1319007734-22] ERROR org.mortbay.log - /db/data/index/node/everything
javax.ws.rs.WebApplicationException: null
at org.neo4j.server.rest.repr.OutputFormat$1.write(OutputFormat.java:156) ~[neo4j-server-1.9.M04.jar:1.9.M04]
at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71) ~[jersey-core-1.9.jar:1.9]
at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57) ~[jersey-core-1.9.jar:1.9]
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306) ~[jersey-server-1.9.jar:1.9]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437) ~[jersey-server-1.9.jar:1.9]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) ~[jersey-server-1.9.jar:1.9]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) ~[jersey-server-1.9.jar:1.9]
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) ~[jersey-server-1.9.jar:1.9]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) ~[jersey-server-1.9.jar:1.9]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) ~[jersey-server-1.9.jar:1.9]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) ~[servlet-api-2.5-20081211.jar:na]
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) ~[jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390) ~[jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.Server.handle(Server.java:326) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) [jetty-6.1.25.jar:6.1.25]
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) [jetty-util-6.1.25.jar:6.1.25]
and in neo4j.0.0.log:
Mar 5, 2013 11:47:19 AM com.sun.jersey.server.impl.application.WebApplicationImpl _handleRequest
SEVERE: The response of the WebApplicationException cannot be utilized as the response is already committed. Re-throwing to the HTTP container
javax.ws.rs.WebApplicationException
at org.neo4j.server.rest.repr.OutputFormat$1.write(OutputFormat.java:156)
at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
I thought the problem could be the rest client I'm using, so I changed it (I tried neo4jrestclient first).
Any Ideas?
Turns out that the reason adding this node to the fulltext index fails is that it is not executed in a transaction.
I tried with the following code, using neo4jrestclient with a transaction and it works:
import urllib2, logging, logging.config, pdb, traceback
from neo4jrestclient.client import GraphDatabase, Node, Relationship
gdb = GraphDatabase("http://localhost:7474/db/data/")
everything_idx = gdb.nodes.indexes.create("everything_", type="fulltext", provider="lucene")
node = gdb.node(name="Node1")
with gdb.transaction() as tx:
try:
request = urllib2.urlopen("http://www.tripadvisor.com/Restaurant_Review-g35805-d451303-Reviews-Ramova_Grill-Chicago_Illinois.html")
if request.getcode() == 200:
long_text = unicode(request.read(), "utf-8")
everything_idx["everything"][long_text] = node
except Exception as e:
pdb.set_trace()

Set text for custom UITableViewCell from array

At the moment I fill my cells using this method:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
// builds the settingsView tableView
if (menuList) {
static NSString *cellIdentifier = #"coachingCell";
UITableViewCell *cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
if (!contentLoaded) {
numberOfCells = 0;
}
if (contentLoaded) {
[cell.textLabel setText:[names objectAtIndex:numberOfCells]];
NSLog(#"Entries: %#", [names objectAtIndex:numberOfCells]);
if (numberOfCells == [names count]) {
numberOfCells = 0;
}
numberOfCells ++;
}
//add a switch
coachingSwitch = [[UISwitch alloc] initWithFrame:CGRectZero];
cell.accessoryView = coachingSwitch;
[coachingSwitch setOn:YES];
return cell;
}
...
But I get an error if I scroll all to the bottom and then one object to the top. That's because I fill the cells over a counter: numberOfCells.
Now my question: how can I fix this in order to actualy iterate over my array for the right indexPath.section and indexPath.row?
The names array contains:
2012-12-09 16:34:22.373 Test[18817:c07] Entries: Mein Bauchumfang
2012-12-09 16:34:22.375 Test[18817:c07] Entries: Mein Gewicht
2012-12-09 16:34:22.375 Test[18817:c07] Entries: Mein Entspannungsniveau
2012-12-09 16:34:22.376 Test[18817:c07] Entries: Häufigkeit der Entspannungsmomente
2012-12-09 16:34:22.377 Test[18817:c07] Entries: Rauchverhalten
2012-12-09 16:34:22.378 Test[18817:c07] Entries: Verlangen nach einer Zigarette
2012-12-09 16:34:22.378 Test[18817:c07] Entries: Systolischer Wert
2012-12-09 16:34:22.379 Test[18817:c07] Entries: Diastolischer Wert
2012-12-09 16:34:23.713 Test[18817:c07] Entries: Meine bewusste Ernährung mit Diabetes
2012-12-09 16:34:23.964 Test[18817:c07] Entries: Meine Blutzucker-Werte
2012-12-09 16:34:25.384 Test[18817:c07] Entries: Mein Befinden
2012-12-09 16:34:25.584 Test[18817:c07] Entries: Meine Aktivitäten
this is the multi dimensional array I could also use:
2012-12-09 17:23:06.891 stuff[19161:c07] ArrayList: (
{
"Bauchumfang & Gewicht" = (
"Mein Bauchumfang",
"Mein Gewicht"
);
"Blutdruck & Puls" = (
"Systolischer Wert",
"Diastolischer Wert"
);
"Blutzucker & Diabetes" = (
"Meine bewusste Ern\U00e4hrung mit Diabetes",
"Meine Blutzucker-Werte"
);
"Mein Rauchverhalten" = (
Rauchverhalten,
"Verlangen nach einer Zigarette"
);
"Meine Stimmung" = (
"Mein Befinden",
"Meine Aktivit\U00e4ten"
);
"R\U00fccken & Bewegung" = (
"Umsetzung meiner R\U00fccken\U00fcbungen",
"Das Befinden meines R\U00fcckens",
"Meine sportlichen Aktivit\U00e4ten"
);
Schlafrhythmus = (
"Meine Schlafqualit\U00e4t",
"Mein Energieniveau"
);
"Schrittz\U00e4hler" = (
"Meine Schritte"
);
"Stress & Entspannung" = (
"Mein Entspannungsniveau",
"H\U00e4ufigkeit der Entspannungsmomente"
);
}
)
Why don't you just use indexPath.row instead of numberOfCells:
[cell.textLabel setText:[names objectAtIndex:indexPath.row]];
EDIT:
You could get the suitable array index using:
int rowsUntilHere=indexPath.row;
for (int i=0;i<indexPath.section;i++){
rowsUntilHere+=[tableView numberOfRowsInSection:i];
//rowsUntilNow++; //If the array contains the section titles too
}
[cell.textLabel setText:[names objectAtIndex:rowsUntilHere]];
Hope this helps
Hoffe das hilft

Resources