Comment peut on debugguer sur Unknown Source

Résolu/Fermé
omcougar Messages postés 152 Date d'inscription mardi 4 mai 2004 Statut Membre Dernière intervention 8 octobre 2008 - 5 sept. 2006 à 13:11
super_toinou Messages postés 764 Date d'inscription mardi 25 mai 2004 Statut Membre Dernière intervention 8 mars 2011 - 5 sept. 2006 à 16:23
Bonjour,
quand je lance mon appl j'ai un message d'erreur qui apparait sans pour autant faire planter quoi que ce soit... comme fait on pour degugguer un truc sur lequel on a aucune info ? (Unknown Source)


Exception in thread "AWT-EventQueue-0"




java.lang.NullPointerException


at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)


at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)


at javax.swing.plaf.ComponentUI.update(Unknown Source)


at javax.swing.JComponent.paintComponent(Unknown Source)


at javax.swing.JComponent.paint(Unknown Source)


at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown Source)


at javax.swing.JComponent.paintDoubleBuffered(Unknown Source)


at javax.swing.JComponent._paintImmediately(Unknown Source)


at javax.swing.JComponent.paintImmediately(Unknown Source)


at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)


at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)


at java.awt.event.InvocationEvent.dispatch(Unknown Source)


at java.awt.EventQueue.dispatchEvent(Unknown Source)


at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)


at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)


at java.awt.EventDispatchThread.pumpEvents(Unknown Source)


at java.awt.EventDispatchThread.pumpEvents(Unknown Source)


at java.awt.EventDispatchThread.run(Unknown Source)

5 réponses

super_toinou Messages postés 764 Date d'inscription mardi 25 mai 2004 Statut Membre Dernière intervention 8 mars 2011 6
5 sept. 2006 à 16:23
tu prend JBuilder (je sais pas si Eclipse le fait mais je pense)
t ajoute un point de type point d arret exception
la dessus tu spécifie le type d exception sur lequel il doit s arreter
dans ton cas nullpointer
et quand l execution du pg arrivera a l exception tu en sera notifié, tu pourra voir la valeur dess variables a ce moment la, voir la stack d appel et revenir en arrière pour voir ce que t as mal fait !!
++ Toinou
3
thevman Messages postés 83 Date d'inscription lundi 5 septembre 2005 Statut Membre Dernière intervention 3 juillet 2008
5 sept. 2006 à 13:31
bonjour,
je vais rien t'apprendre de nouveau la solution :

Vive le mode débug et le "pas à pas".
 

 Nare Trouvé !!!
0
thevman Messages postés 83 Date d'inscription lundi 5 septembre 2005 Statut Membre Dernière intervention 3 juillet 2008
5 sept. 2006 à 13:54
Peut etre ca peut t'aider.
tu doit avoir une référence qui doit etre null c'est peut etre pour ca.
http://forum.java.sun.com/thread.jspa?threadID=628094

 Nare Trouvé !!!
0
omcougar Messages postés 152 Date d'inscription mardi 4 mai 2004 Statut Membre Dernière intervention 8 octobre 2008 1
5 sept. 2006 à 13:58
oui effectivement il y a quelque chose de null et je ne trouve pas quoi (peut etre moi tout simplement)
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
thevman Messages postés 83 Date d'inscription lundi 5 septembre 2005 Statut Membre Dernière intervention 3 juillet 2008
5 sept. 2006 à 14:12
Tu as essayé de localiser la zone de code qui déclanche cette erreur?

Par example avec des points d'arret  : 
 Tu commences par en mettre à la fin de chaque appel de tes classes. 
 Puis des que tu chopes l'erreur tu descends avec un niveau plus fin à chaque fois (dans chaque méthode , etc) . 
  
tu peux proceder de la meme maniere avec des try catch et tu changes le message d'erreur afin de choper la zone de code défaillante.

Je pense que tu as du essayer mais c'est la seul facon de localiser ces cochoneries de nullpointer.

 Nare Trouvé !!!
0
Rejoignez-nous