Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Why do I get the following error after creating an instance of an array - The LLDB RPC server has crashed.

I am trying to create an array of dictionaries and when I do, I get an error that 'The LLDB RPC server has crashed'. At this point, output fails to work in the right hand pane. When I comment it out, everything appears to work as normal. I will see output in the right hand pane for print statements, etc.

Creating the below instance is causing the error:

var soccerPlayers: [Dictionary] = [ playerJoeSmith, playerJillTanner, playerBillBon, playerEvaGordon, playerMattGill, playerKimmyStein, playerSammyAdams, playerKarlSaygan, playerSuzaneGreenberg, playerSalDali, playerJoeKavalier, playerBenFinkelstein, playerDiegoSoto, playerChloeAlaska, playerArnoldWillis, playerPhillipHelm, playerLesClay, playerHerschelKrustofski ]

I should note that I am using Xcode 8 and Swift 3

2 Answers

I realized my error. I was supposed to declare it like this:

var soccerPlayers: [[String: String]] = [
    playerJoeSmith,
    playerJillTanner,
    playerBillBon,
    playerEvaGordon,
    playerMattGill,
    playerKimmyStein,
    playerSammyAdams,
    playerKarlSaygan,
    playerSuzaneGreenberg,
    playerSalDali,
    playerJoeKavalier,
    playerBenFinkelstein,
    playerDiegoSoto,
    playerChloeAlaska,
    playerArnoldWillis,
    playerPhillipHelm,
    playerLesClay,
    playerHerschelKrustofski
]

Let me see if I can format my code better:

var soccerPlayers: [Dictionary] = [
    playerJoeSmith,
    playerJillTanner,
    playerBillBon,
    playerEvaGordon,
    playerMattGill,
    playerKimmyStein,
    playerSammyAdams,
    playerKarlSaygan,
    playerSuzaneGreenberg,
    playerSalDali,
    playerJoeKavalier,
    playerBenFinkelstein,
    playerDiegoSoto,
    playerChloeAlaska,
    playerArnoldWillis,
    playerPhillipHelm,
    playerLesClay,
    playerHerschelKrustofski
]