π
<-
Chat plein-écran
[^]

Warning in Emulator

C, C++, ASM...

Warning in Emulator

Message non lude Rankail » 29 Aoû 2021, 20:55

I wrote a little Abstraction for SDL_gfxPrimitives. I wanted to try it with a simple test by just drawing a rectangle. It all worked fine. But when i closed the file the firebird-emulator prints an warning in the Debugger-Dock:
Code: Tout sélectionner
Warning (126011d4): Data abort: address=00700065 status=05 instruction at 126011d4
Anyone knows what that is or how i can find out where it originates from?
Avatar de l’utilisateur
Rankail
Niveau 4: MC (Membre Confirmé)
Niveau 4: MC (Membre Confirmé)
Prochain niv.: 64%
 
Messages: 21
Inscription: 09 Nov 2019, 18:33
Localisation: Germany, North Rhine-Westfalia
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: 12

Re: Warning in Emulator

Message non lude Ti64CLi++ » 29 Aoû 2021, 21:16

Could you please share your code so I can look into it ?
Image
Avatar de l’utilisateur
Ti64CLi++Modo
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 32.3%
 
Messages: 3441
Images: 75
Inscription: 04 Juil 2014, 14:40
Localisation: Clermont-Ferrand 63
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: ENS Rennes
GitHub: Ti64CLi

Re: Warning in Emulator

Message non lude Vogtinator » 29 Aoû 2021, 21:21

The easiest way is to use the gdb integration (https://github.com/nspire-emus/firebird ... g-with-GDB). When the data abort (aka segfault) happens, you can get a backtrace.
Avatar de l’utilisateur
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Prochain niv.: 1.6%
 
Messages: 217
Inscription: 29 Mar 2014, 15:55
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Warning in Emulator

Message non lude Rankail » 30 Aoû 2021, 18:05

I found the problem myself. I free a SDL_Surface and a nSDL_Font in the destructor of my Abstraction. I changed the structure a bit because the destructor would only be called after SDL_Quit.
Avatar de l’utilisateur
Rankail
Niveau 4: MC (Membre Confirmé)
Niveau 4: MC (Membre Confirmé)
Prochain niv.: 64%
 
Messages: 21
Inscription: 09 Nov 2019, 18:33
Localisation: Germany, North Rhine-Westfalia
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: 12

Re: Warning in Emulator

Message non lude Rankail » 02 Sep 2021, 19:55

So what i found doesn't solve the problem. That's just what i thought at the first moment. I can open my program and close it but whenever i open and close it multiple times it shows the waiting symbol and after a few seconds the calc in the emulator restarts. Whenever it does so it throws an error in the debugger:
Code: Tout sélectionner
Warning (13a574d0): Data abort: address=0001002f status=01 instruction at 13a574d0.
The numbers are always a bit different.

There was also a problem where i would get a memory error after restarting a slightly other code around 10-20 times. I couldn't find any memory leaks though. So i spend the last 2-3 days "playing" around with the pointers. Changing from pointers to smart pointers and the other way around. Adding delete for all pointers i found. Nothing seemed to work 100% fine. Anyone can help me? I uploaded my code to github because i honestly don't know what to do anymore.
https://github.com/Rankail/nStateMachine
Avatar de l’utilisateur
Rankail
Niveau 4: MC (Membre Confirmé)
Niveau 4: MC (Membre Confirmé)
Prochain niv.: 64%
 
Messages: 21
Inscription: 09 Nov 2019, 18:33
Localisation: Germany, North Rhine-Westfalia
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: 12

Re: Warning in Emulator

Message non lude Rankail » 02 Sep 2021, 20:08

If you want to know anything about how the code should work or i missed some info please tell me
Avatar de l’utilisateur
Rankail
Niveau 4: MC (Membre Confirmé)
Niveau 4: MC (Membre Confirmé)
Prochain niv.: 64%
 
Messages: 21
Inscription: 09 Nov 2019, 18:33
Localisation: Germany, North Rhine-Westfalia
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: 12


Retourner vers Native: Ndless, Linux, ...

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 11 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
Phi NumWorks jailbreak
123
-
Faire un don / Premium
Pour plus de concours, de lots, de tests, nous aider à payer le serveur et les domaines...
Faire un don
Découvrez les avantages d'un compte donateur !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partenaires et pub
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
966 utilisateurs:
>958 invités
>4 membres
>4 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Autres sites intéressants
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)