Erreur thread 1

Bonjour,
Quand je suis pas à pas le cours « apprendre à creer une app pour Iphone » au niveau de « objet graphique et outlet » quand je lance le simulateur j’ai une double page d’erreur qui apparait avec un « Thread 1 : Signal SIGABRT » et je ne sais pas du tout a quoi elle correspond. j’ai essayé de recommencer le projet et au meme endroit j’ai la même erreur ? en P.J la capture de la page !!! Avez vous une idée ???
merci d’avance et bonne journée.
Macboucpro!
14|690x380

Il faudrait qu’on ai le log (en bas a droite) complet.
Je pense que c’est un probleme de lisison sur un element qui n’existe pas.
Mais avec le log ou pourra en savoir plus.

1 « J'aime »

Salut Graveline,
Merci pour ton aide ! Est ce le log ?

2018-07-02 19:42:02.207790+0200 Demo 2[37563:3757865] *** Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<Demo_2.ViewController 0x7fe2f250c5a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key userTextField.’
*** First throw call stack:
(
0 CoreFoundation 0x00000001141d21e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x000000010ff1e031 objc_exception_throw + 48
2 CoreFoundation 0x00000001141d20b9 -[NSException raise] + 9
3 Foundation 0x000000010f93fb47 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 292
4 UIKit 0x0000000111471ec0 -[UIViewController setValue:forKey:] + 87
5 UIKit 0x000000011175fe8a -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x0000000114174e8d -[NSArray makeObjectsPerformSelector:] + 317
7 UIKit 0x000000011175e834 -[UINib instantiateWithOwner:options:] + 1856
8 UIKit 0x00000001114790d7 -[UIViewController _loadViewFromNibNamed:bundle:] + 383
9 UIKit 0x0000000111479a04 -[UIViewController loadView] + 177
10 UIKit 0x0000000111479d21 -[UIViewController loadViewIfRequired] + 175
11 UIKit 0x000000011147a574 -[UIViewController view] + 27
12 UIKit 0x0000000111348123 -[UIWindow addRootViewControllerViewIfPossible] + 122
13 UIKit 0x0000000111348834 -[UIWindow _setHidden:forced:] + 294
14 UIKit 0x000000011135b5cc -[UIWindow makeKeyAndVisible] + 42
15 UIKit 0x00000001112cf3da -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4739
16 UIKit 0x00000001112d45cb -[UIApplication _runWithMainScene:transitionContext:completion:] + 1677
17 UIKit 0x0000000111696f7e __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
18 UIKit 0x0000000111a69a39 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
19 UIKit 0x0000000111696bba -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
20 UIKit 0x00000001116973db -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 675
21 UIKit 0x0000000112008614 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 299
22 UIKit 0x00000001120084ae -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
23 UIKit 0x0000000111cec75d __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221
24 UIKit 0x0000000111ee74b7 _performActionsWithDelayForTransitionContext + 100
25 UIKit 0x0000000111cec627 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
26 UIKit 0x0000000111a690e0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
27 UIKit 0x00000001112d2eac -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
28 UIKit 0x00000001118a5bcb -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
29 FrontBoardServices 0x00000001161692f3 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 331
30 FrontBoardServices 0x0000000116171cfa __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 225
31 libdispatch.dylib 0x000000011528c7ec _dispatch_client_callout + 8
32 libdispatch.dylib 0x0000000115291db8 _dispatch_block_invoke_direct + 592
33 FrontBoardServices 0x000000011619d470 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24
34 FrontBoardServices 0x000000011619d12e -[FBSSerialQueue _performNext] + 439
35 FrontBoardServices 0x000000011619d68e -[FBSSerialQueue _performNextFromRunLoopSource] + 45
36 CoreFoundation 0x0000000114174bb1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
37 CoreFoundation 0x00000001141594af __CFRunLoopDoSources0 + 271
38 CoreFoundation 0x0000000114158a6f __CFRunLoopRun + 1263
39 CoreFoundation 0x000000011415830b CFRunLoopRunSpecific + 635
40 GraphicsServices 0x0000000116a32a73 GSEventRunModal + 62
41 UIKit 0x00000001112d6057 UIApplicationMain + 159
42 Demo 2 0x000000010f6147e7 main + 55
43 libdyld.dylib 0x0000000115309955 start + 1
44 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Bonne soirée,
Macboucpro

Voici donc la véritable erreur.

Tu as du faire une liaison entre le storyboard et le code pour faire un IBAction ou IBOutlet, et tu as supprimé le ligne IBOutlet ou IBAction sans effacer le lien avant.

Pour trouver ton erreur je crois qu’il faut aller sur ton storyboard.
De là, tu clics sur l’element le plus haut (ViewSceneController par exemple)
Et ensuite sur la colonne de droite clic sur l’icône avec une flèche dans un cercle.

Regarde dans cette image le cell_0_0, il y a un petit ‹ ! › a droite.
Pour supprimer la liaison, clic sur le croix et pouf ça devrait être bon.

Tient nous au courant.

Hello Gaveline,
Merci pour ton aide quand j clique comme tu me dit il m’ouvre l’erreur suivante :
could not read data from ‘/Users/macboucpro/Documents/Demo1/Demo 2/Demo 2Tests/Info.plist’: The file “Info.plist” couldn’t be opened because there is no such file. ??
Macboucpo

Alors là désolé mais ça dépasse mes compétences :slight_smile:
Mais ce fichier manquant est peut être la source ton ton probleme.

essaye de repartir de zero, de refaire un nouveau projet (et pas dans demo1/demo2/demo2 Test/Nouveau Projet/)

Et voir si tu as encore le meme soucis. Mais je ne pourrais malheuresement pas te donner de réponse plus précise.

1 « J'aime »

Salut @macboucpro,

Petite aide rapide…
Dans ton storyboard, fais un clic droit sur le View Controller de ViewController :
57
Tu dois avoir un truc ressemblant à ça :


Où, dans ta partie « Outlets », il devrait y avoir une ligne avec « userTextField » qui possède au bout un point d’exclamation :wink: (Comme ma 1ère ligne au niveau Outlets).

Est-ce le cas ?
Si oui, clique sur la croix au centre de la ligne.

Et relance ton app…
Qu’est-ce que ça donne ? :smiley:

2 « J'aime »