# 2d iOS v. 2.0; Chapter 12 - Pest Control - Beginning Tile Maps

**URL:** <https://forums.kodeco.com/t/2d-ios-v-2-0-chapter-12-pest-control-beginning-tile-maps/21469>\
**Category:** 2D iOS & tvOS Games by Tutorials\
**Created:** [October 20, 2016, 3:32pm UTC](https://forums.kodeco.com/t/2d-ios-v-2-0-chapter-12-pest-control-beginning-tile-maps/21469 "2016-10-20T15:32:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![juicysquid](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@juicysquid](https://forums.kodeco.com/u/juicysquid)\
**Post date:** [October 20, 2016, 3:32pm UTC](https://forums.kodeco.com/t/2d-ios-v-2-0-chapter-12-pest-control-beginning-tile-maps/21469/1 "2016-10-20T15:32:51Z")

</div>

I Chapter 12: Beginning Tile Maps at the top of page 319 it tells you to build and run your app. I am getting the following error. Can anyone please explain how to fix?

2016-10-20 08:27:42.066433 PestControl[3552:152092] subsystem: com.apple.UIKit, category: HIDEventFiltered, enable\_level: 0, persist\_level: 0, default\_ttl: 0, info\_ttl: 0, debug\_ttl: 0, generate\_symptoms: 0, enable\_oversize: 1, privacy\_setting: 2, enable\_private\_data: 0  
2016-10-20 08:27:42.069326 PestControl[3552:152092] subsystem: com.apple.UIKit, category: HIDEventIncoming, enable\_level: 0, persist\_level: 0, default\_ttl: 0, info\_ttl: 0, debug\_ttl: 0, generate\_symptoms: 0, enable\_oversize: 1, privacy\_setting: 2, enable\_private\_data: 0  
2016-10-20 08:27:42.077824 PestControl[3552:152084] subsystem: com.apple.BaseBoard, category: MachPort, enable\_level: 1, persist\_level: 0, default\_ttl: 0, info\_ttl: 0, debug\_ttl: 0, generate\_symptoms: 0, enable\_oversize: 0, privacy\_setting: 0, enable\_private\_data: 0  
2016-10-20 08:27:42.089249 PestControl[3552:152028] subsystem: com.apple.UIKit, category: StatusBar, enable\_level: 0, persist\_level: 0, default\_ttl: 0, info\_ttl: 0, debug\_ttl: 0, generate\_symptoms: 0, enable\_oversize: 1, privacy\_setting: 2, enable\_private\_data: 0  
2016-10-20 08:27:42.091398 PestControl[3552:152028] subsystem: com.apple.BackBoardServices.fence, category: App, enable\_level: 1, persist\_level: 0, default\_ttl: 0, info\_ttl: 0, debug\_ttl: 0, generate\_symptoms: 0, enable\_oversize: 0, privacy\_setting: 0, enable\_private\_data: 0  
2016-10-20 08:27:42.154 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.155 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.155 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.155 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.155 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.155 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.156 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.156 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.156 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.156 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.156 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.232 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.233 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.233 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.233 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.233 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.234 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.  
2016-10-20 08:27:42.239 PestControl[3552:152028] \*\*\* Terminating app due to uncaught exception ‘NSRangeException’, reason: ‘\*\*\* -[NSKeyedUnarchiver decodeInt32ForKey:]: value (9223372036854775807) for key (\_defaultTileGroupIndex) too large to fit in 32-bit integer’  
\*\*\* First throw call stack:  
(  
0 CoreFoundation 0x032b7212 \_\_exceptionPreprocess + 194  
1 libobjc.A.dylib 0x00614e66 objc\_exception\_throw + 52  
2 Foundation 0x00247d39 -[NSCoder(Exceptions) \_\_failWithException:] + 133  
3 Foundation 0x00247ec3 -[NSCoder(Exceptions) \_\_failWithExceptionName:errorCode:format:] + 391  
4 Foundation 0x00151a6c \_decodeInt64 + 769  
5 Foundation 0x001a1acc -[NSKeyedUnarchiver decodeInt32ForKey:] + 199  
6 Foundation 0x0015168b -[NSCoder decodeIntegerForKey:] + 32  
7 SpriteKit 0x00abd3b4 -[SKTileSet initWithCoder:] + 325  
8 Foundation 0x0014b4ee \_decodeObjectBinary + 3730  
9 Foundation 0x0014c9b7 -[NSKeyedUnarchiver \_decodeArrayOfObjectsForKey:] + 1994  
10 Foundation 0x00150e3e -[NSArray(NSArray) initWithCoder:] + 251  
11 Foundation 0x0014b4ee \_decodeObjectBinary + 3730  
12 Foundation 0x0014a54b \_decodeObject + 251  
13 Foundation 0x0014a400 -[NSKeyedUnarchiver decodeObjectForKey:] + 196  
14 SpriteKit 0x00abe963 +[SKTileSet findTileSetInBundleNamed:] + 1587  
15 SpriteKit 0x00abee17 +[SKTileSet tileSetNamed:] + 101  
16 SpriteKit 0x00b4a8d8 -[SKTileMapNode initWithCoder:] + 472  
17 Foundation 0x0014b4ee \_decodeObjectBinary + 3730  
18 Foundation 0x0014c9b7 -[NSKeyedUnarchiver \_decodeArrayOfObjectsForKey:] + 1994  
19 Foundation 0x00150e3e -[NSArray(NSArray) initWithCoder:] + 251  
20 Foundation 0x0014b4ee _decodeObjectBinary + 3730  
21 Foundation 0x0014a54b decodeObject + 251  
22 Foundation 0x0014a400 -[NSKeyedUnarchiver decodeObjectForKey:] + 196  
23 SpriteKit 0x00acbf35 -[SKNode initWithCoder:] + 2192  
24 SpriteKit 0x00ae6a08 -[SKEffectNode initWithCoder:] + 76  
25 SpriteKit 0x00a91a7a -[SKScene initWithCoder:] + 102  
26 PestControl 0x000b0441 TFC11PestControl9GameScenecfT5coderCSo7NSCoder\_GSqS0 + 81  
27 PestControl 0x000b04df TToFC11PestControl9GameScenecfT5coderCSo7NSCoder\_GSqS0_ + 47  
28 SpriteKit 0x00acb800 -[SKNode initWithCoder:] + 347  
29 SpriteKit 0x00ae6a08 -[SKEffectNode initWithCoder:] + 76  
30 SpriteKit 0x00a91a7a -[SKScene initWithCoder:] + 102  
31 Foundation 0x0014b4ee \_decodeObjectBinary + 3730  
32 Foundation 0x0014a54b _decodeObject + 251  
33 Foundation 0x0014a400 -[NSKeyedUnarchiver decodeObjectForKey:] + 196  
34 SpriteKit 0x00acb119 +[SKNode nodeWithFileNamed:] + 620  
35 PestControl 0x000b0969 TTOFCSo7SKSceneCfT9fileNamedSS\_GSqS_ + 105  
36 PestControl 0x000b076a _TFC11PestControl18GameViewController11viewDidLoadfT\_T_ + 346  
37 PestControl 0x000b0a12 _TToFC11PestControl18GameViewController11viewDidLoadfT\_T_ + 34  
38 UIKit 0x00e6ef52 -[UIViewController \_sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 38  
39 UIKit 0x00e73a3c -[UIViewController loadViewIfRequired] + 1431  
40 UIKit 0x00e73f85 -[UIViewController view] + 29  
41 UIKit 0x00d1aaeb -[UIWindow addRootViewControllerViewIfPossible] + 72  
42 UIKit 0x00d1b233 -[UIWindow \_setHidden:forced:] + 335  
43 UIKit 0x00d1b6cb -[UIWindow \_orderFrontWithoutMakingKey] + 30  
44 UIKit 0x00d30248 -[UIWindow makeKeyAndVisible] + 64  
45 UIKit 0x00c9da06 -[UIApplication \_callInitializationDelegatesForMainScene:transitionContext:] + 5053  
46 UIKit 0x00ca48ac -[UIApplication \_runWithMainScene:transitionContext:completion:] + 2004  
47 UIKit 0x00cc5e98 \_\_84-[UIApplication \_handleApplicationActivationWithScene:transitionContext:completion:]\_block\_invoke.3124 + 53  
48 UIKit 0x00ca14ca -[UIApplication workspaceDidEndTransaction:] + 172  
49 FrontBoardServices 0x09c38ecd \_\_37-[FBSWorkspace clientEndTransaction:]\_block\_invoke\_2 + 59  
50 FrontBoardServices 0x09c389ed \_\_40-[FBSWorkspace \_performDelegateCallOut:]\_block\_invoke + 49  
51 FrontBoardServices 0x09c6271c **FBSSERIALQUEUE\_IS\_CALLING\_OUT\_TO\_A\_BLOCK** + 23  
52 FrontBoardServices 0x09c6257d -[FBSSerialQueue \_performNext] + 166  
53 FrontBoardServices 0x09c6295d -[FBSSerialQueue \_performNextFromRunLoopSource] + 52  
54 FrontBoardServices 0x09c61d77 FBSSerialQueueRunLoopSourceHandler + 29  
55 CoreFoundation 0x03256cbf **CFRUNLOOP\_IS\_CALLING\_OUT\_TO\_A\_SOURCE0\_PERFORM\_FUNCTION** + 15  
56 CoreFoundation 0x0323adf7 \_\_CFRunLoopDoSources0 + 519  
57 CoreFoundation 0x0323a284 \_\_CFRunLoopRun + 1124  
58 CoreFoundation 0x03239bab CFRunLoopRunSpecific + 395  
59 CoreFoundation 0x03239a0b CFRunLoopRunInMode + 123  
60 UIKit 0x00c9fb43 -[UIApplication \_run] + 542  
61 UIKit 0x00ca67fb UIApplicationMain + 148  
62 PestControl 0x000b1b41 main + 145  
63 libdyld.dylib 0x040c3799 start + 1  
64 ??? 0x00000001 0x0 + 1  
)  
libc++abi.dylib: terminating with uncaught exception of type NSException

---

<div class="post-metadata">

**Author:** ![caroline](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/caroline/32/111867_2.png) [@caroline](https://forums.kodeco.com/u/caroline)\
**Post date:** [October 23, 2016, 12:58am UTC](https://forums.kodeco.com/t/2d-ios-v-2-0-chapter-12-pest-control-beginning-tile-maps/21469/2 "2016-10-23T00:58:01Z")

</div>

@juicysquid - That’s a tricky one as you won’t actually have entered any code yet.

If you build and run the Final sample code, does that work?

I just went through the text again just to make sure and it works for me. What version of Xcode are you on?
