Pydroid3 app crashes on xiaomi poco F3 - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Pydroid3 app crashes on xiaomi poco F3 (/thread-38788.html) |
Pydroid3 app crashes on xiaomi poco F3 - JMD - Nov-24-2022 Hi everyone, I am a new member as of today. I am developing a prototype application for remote control. It has the following architecture: On my smartphone, the TouchOSC commercial application provides me with a GUI, and communicates with the world using UDP frames on TCP/IP. I have written an application on Pydroid3 that - exchanges UDP frames back and forth with TouchOSC (using localhost); - exchanges UDP frames back and forth with a remote system (using wifi); - translates the data between the two above to have the data properly displayed and to send to the remote system the appropriate commands, as a result of the user's actions on the touchscreen. TouchOSC must run on the foreground, so I have written the python app so that a thread runs an endless loop that collects the received messages from TouchOSC and the external system, translates them, and send the result to TouchOSC and the external system. All of this is actually straightforward. The application works well, except that after about one minute the communication is broken. On starting the python app, the terminal window shows: starting the app started and if an exception occurred during execution it would stop with : Error: end of execution This text remains visible each time I pull the terminal window back to the foreground. However, when the operation stops, an I bring the terminal window back to the foreground, the text above is erased and replaced with "/ $ ". If I press the left arrow at the top of the screen, I return to the editor normally, and from there I can normally restart the execution, which will stop again after one minute. I eventually could run the app in the foreground and have it fail. It then showed the following error message : In function gere_trafic(), line 139, there is:self.efface_commandes_fugitives()the code of the called function is: def efface_commandes_fugitives(self): self.donnees_sortie_envoyees[BOUTON_VIRTUEL] = BT_AUCUN self.donnees_sortie_envoyees[RAZ_GYRO] = 0 self.donnees_sortie_envoyees[COMMANDE_GROUPE] = GROUPE_REPOS # Effacement de la demande de changement de mode de commande quand le changement est obtenu if self.donnees_sortie_envoyees[DEMANDE_CONTROLE] != DC_ACQUITTE: if (self.mode_connexion == MC_SANS_FIL) and (self.donnees_sortie_envoyees[DEMANDE_CONTROLE] == DC_CONNECTER): self.donnees_sortie_envoyees[DEMANDE_CONTROLE] = DC_ACQUITTE elif (self.mode_connexion != MC_SANS_FIL) and (self.donnees_sortie_envoyees[DEMANDE_CONTROLE] == DC_DECONNECTER): self.donnees_sortie_envoyees[DEMANDE_CONTROLE] = DC_ACQUITTEI do not see what can cause the exception in the code above. Any idea, someone? Thanks! RE: Pydroid3 app crashes on xiaomi poco F3 - JMD - Nov-24-2022 Thanks Yoriz, I have read the BBC document. I will comply from now on! RE: Pydroid3 app crashes on xiaomi poco F3 - JMD - Nov-27-2022 It looks like the problem resides in my Xiaomi smartphone. I tried the Python application on a Nexus tablet, and it just runs fine. I was suspecting a bug of my own, but apparently Pydroid3 is not totally stable in the Xiaomi environment. |