<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.fr.windevmobile</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>10 Apr 2026 11:34:47 Z</lastBuildDate><pubDate>10 Apr 2026 09:38:48 Z</pubDate><description>Bonjour tout le monde&#13;
&#13;
Gros soucis, tout est dans le titre (ou presque)&#13;
Mon application plante de manière aléatoire (pas tout le temps, pas tous les utilisateurs, pas tous les appareils) lorsque l'utilisateur prend une photo (que ça soit via l'appel à cameraLAnceAppli ou via la fenêtre Camera)&#13;
&#13;
Pourtant dans ma fonction Prendre_Photo j'ai bien un CAS ERREUR et un CAS EXCEPTION pour justement éviter que mon application ne s'arrête brusquement et fasse perdre du temps à mes utilisateurs&#13;
&#13;
Au niveau de mes fichiers logs j'ai ça puis plus rien&#13;
&#13;
[code:text]&#13;
09/04/2026 @ 10:02:13 &gt; Parcours - Ouverture Photo&#13;
09/04/2026 @ 10:02:13 &gt; Parcours - Photo - Mode natif&#13;
[/code]&#13;
&#13;
OU&#13;
&#13;
[code:text]&#13;
09/04/2026 @ 09:25:23 &gt; Parcours - Ouverture Photo&#13;
09/04/2026 @ 09:25:23 &gt; Parcours - Photo - Mode application&#13;
[/code]&#13;
&#13;
Voici la procédure en question qui est appellé via un bouton de prise de photo dans l'application à plusieurs endroits&#13;
&#13;
[code:wl]&#13;
PROCÉDURE Prendre_Photo(champImage est un Champ, image est une Image,suffixe est une chaîne)&#13;
&#13;
sPhoto			est une chaîne&#13;
bGPhotoTermine	est un booléen	= Faux&#13;
Log_Str ("Parcours - Ouverture Photo",#DEBUG_LEVEL_STANDARD)&#13;
&#13;
SELON COL_VCI_Variables.gstMemory.nModePhoto&#13;
	CAS 1 //Mode Camera native&#13;
		Log_Str ("Parcours - Photo - Mode natif",#DEBUG_LEVEL_STANDARD)&#13;
		SI CaméraDemandePermission() = Vrai ALORS&#13;
			CaméraLanceAppli(viCaptureImage, CaméraLanceAppli_Callback)&#13;
				PROCÉDURE INTERNE CaméraLanceAppli_Callback(sChemin est une chaîne)&#13;
					// Si le retour vaut chaîne vide (""), une erreur a eu lieu&#13;
					SI sChemin ~= "" ALORS						&#13;
						bGPhotoTermine = Vrai&#13;
						RETOUR&#13;
					SINON&#13;
						sPhoto = sChemin&#13;
					FIN&#13;
					bGPhotoTermine = Vrai&#13;
				FIN&#13;
			TANTQUE bGPhotoTermine = Faux&#13;
				Wait_10ms_ByTimer(1000)&#13;
			FIN&#13;
			SI sPhoto&lt;&gt;"" ALORS&#13;
				image = sPhoto&#13;
				CaméraGénèreMiniature(sPhoto,COL_VCI_Répertoires.gsLocal_PICT_Dir + suffixe + "_thumb.jpg",800,600)&#13;
				champImage = COL_VCI_Répertoires.gsLocal_PICT_Dir +suffixe + "_thumb.jpg"&#13;
			SINON&#13;
				SI PAS EnModeArrièrePlan() ALORS&#13;
					SI ErreurDétectée ALORS&#13;
						Erreur(ErreurInfo())&#13;
					FIN&#13;
				FIN&#13;
			FIN&#13;
		FIN&#13;
	CAS 2 // Mode application&#13;
		// Autorise ou non la prise de vidéo&#13;
		Log_Str ("Parcours - Photo - Mode application",#DEBUG_LEVEL_STANDARD)&#13;
		bAutoriseVideo est un booléen = Faux&#13;
		// Ouvre l'appareil photo&#13;
		SI CaméraDemandePermission() = Vrai ALORS&#13;
			OuvreAsynchrone(FEN_Mobile_Camera_UI,(bAutoriseVideo),onCapture)&#13;
				PROCÉDURE INTERNE onCapture(sCheminComplet &lt;utile&gt;)&#13;
					SI sCheminComplet&lt;&gt;"" ALORS&#13;
						sPhoto			= sCheminComplet&#13;
						bGPhotoTermine	= Vrai&#13;
					FIN&#13;
				FIN&#13;
			TANTQUE bGPhotoTermine = Faux&#13;
				Wait_10ms_ByTimer(1000)&#13;
			FIN&#13;
			image = sPhoto&#13;
			CaméraGénèreMiniature(sPhoto,COL_VCI_Répertoires.gsLocal_PICT_Dir +suffixe + "_thumb.jpg",800,600)&#13;
			champImage = COL_VCI_Répertoires.gsLocal_PICT_Dir +suffixe + "_thumb.jpg"&#13;
		FIN&#13;
	AUTRE CAS // Caméra native par défaut&#13;
		Log_Str ("Parcours - Photo - Mode natif par défaut",#DEBUG_LEVEL_STANDARD)&#13;
		SI CaméraDemandePermission() = Vrai ALORS&#13;
			CaméraLanceAppli(viCaptureImage, CaméraLanceAppli_Callback)&#13;
			TANTQUE bGPhotoTermine = Faux&#13;
				Wait_10ms_ByTimer(1000)&#13;
			FIN&#13;
			SI sPhoto&lt;&gt;"" ALORS&#13;
				image = sPhoto&#13;
				CaméraGénèreMiniature(sPhoto,COL_VCI_Répertoires.gsLocal_PICT_Dir + suffixe + "_thumb.jpg",800,600)&#13;
				champImage = COL_VCI_Répertoires.gsLocal_PICT_Dir +suffixe + "_thumb.jpg"&#13;
			SINON&#13;
				SI PAS EnModeArrièrePlan() ALORS&#13;
					SI ErreurDétectée ALORS&#13;
						Erreur(ErreurInfo())&#13;
					FIN&#13;
				FIN&#13;
			FIN&#13;
		FIN&#13;
FIN&#13;
Log_Str ("Parcours - Fin Photo - "+sPhoto,#DEBUG_LEVEL_STANDARD)&#13;
CAS ERREUR:&#13;
sErrStr_Err			est une chaîne	= ErreurInfo()&#13;
sErrStrSysteme_Err	est une chaîne	= ErreurInfo(errMessageSystème)&#13;
sErrResume_Err		est une chaîne	= ErreurInfo(errRésumé)&#13;
sErrCode_Err		est une chaîne	= ErreurInfo(errCode)&#13;
sErrCodeSysteme_Err	est une chaîne	= ErreurInfo(errCodeSystème)&#13;
sErrFichier_Err		est une chaîne	= ErreurInfo(errFichier)&#13;
Log_Erreur("ERR fonction photo photo")&#13;
Log_Erreur("ERR Code = " + sErrCode_Err)&#13;
Log_Erreur("ERR Code systeme = " + sErrCodeSysteme_Err)&#13;
Log_Erreur("ERR Resume = " + sErrResume_Err)&#13;
Log_Erreur("ERR Message =" + sErrStrSysteme_Err)&#13;
Log_Erreur("ERR Message systeme =" + sErrStr_Err)&#13;
Log_Erreur("ERR Fichier = " + sErrFichier_Err)&#13;
CAS EXCEPTION:&#13;
sErrStr			est une chaîne	= ExceptionInfo()&#13;
sErrStrSysteme	est une chaîne	= ExceptionInfo(errMessageSystème)&#13;
sErrResume		est une chaîne	= ExceptionInfo(errRésumé)&#13;
sErrCode		est une chaîne	= ExceptionInfo(errCode)&#13;
sErrCodeSysteme	est une chaîne	= ExceptionInfo(errCodeSystème)&#13;
sErrFichier		est une chaîne	= ExceptionInfo(errFichier)&#13;
Log_Erreur("XCPT fonction photo")&#13;
Log_Erreur("XPCT Code = " + sErrCode)&#13;
Log_Erreur("XPCT Code systeme = " + sErrCodeSysteme)&#13;
Log_Erreur("XPCT Resume = " + sErrResume)&#13;
Log_Erreur("XPCT Message =" + sErrStrSysteme)&#13;
Log_Erreur("XPCT Message systeme =" + sErrStr)&#13;
Log_Erreur("XPCT Fichier = " + sErrFichier)&#13;
[/code]&#13;
&#13;
--&#13;
Ce n'est pas l'outil le plus important mais la manière de s'en servir</description><ttl>30</ttl><generator>WEBDEV</generator><language>fr_FR</language><link>https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception/read.awp</link><title>Plantage application malgré cas erreur et cas exception</title><managingEditor>moderateur@pcsoft.fr (Le modérateur)</managingEditor><webMaster>webmaster@pcsoft.fr (Le Webmaster)</webMaster><item><author>Fabrice N</author><category>pcsoft.fr.windevmobile</category><comments>https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception-52551/read.awp</comments><pubDate>10 Apr 2026 11:34:47 Z</pubDate><description>Bonjour,&#13;
&#13;
L'utilisation de Multitache() n'est pas recommandé sous Android s'il y a des actions (clic sur l'écran par ex)&#13;
&#13;
As…</description><guid isPermaLink="true">https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception-52551/read.awp</guid><link>https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception-52551/read.awp</link><source url="https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception/read.awp">Plantage application malgré cas erreur et cas exception</source><title>Re: Plantage application malgré cas erreur et cas exception</title></item><item><author>erbl</author><category>pcsoft.fr.windevmobile</category><comments>https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception-52550/read.awp</comments><pubDate>10 Apr 2026 10:59:05 Z</pubDate><description>Bonjour et merci pour ce retour , effectivement cela se produit sur Android&#13;
La fonction est un simple timer qui est utilisé rég…</description><guid isPermaLink="true">https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception-52550/read.awp</guid><link>https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception-52550/read.awp</link><source url="https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception/read.awp">Plantage application malgré cas erreur et cas exception</source><title>Re: Plantage application malgré cas erreur et cas exception</title></item><item><author>Fabrice N</author><category>pcsoft.fr.windevmobile</category><comments>https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception-52549/read.awp</comments><pubDate>10 Apr 2026 10:05:21 Z</pubDate><description>Bonjour,&#13;
&#13;
Tu n'as pas précisé si le plantage se produit sur Android ou iOS&#13;
&#13;
Cela dit, j'ai déjà rencontré ce problème sous A…</description><guid isPermaLink="true">https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception-52549/read.awp</guid><link>https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception-52549/read.awp</link><source url="https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/52548-plantage-application-malgre-cas-erreur-cas-exception/read.awp">Plantage application malgré cas erreur et cas exception</source><title>Re: Plantage application malgré cas erreur et cas exception</title></item></channel></rss>
