Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Crash for unknown reason; faultlog not populated on restart
-
I have composed a simple program to calculate the number of fractions in base form with denominators up to and including 12000, and values in the range (1/3, 1/2). The program always crashes shortly after it reaches he low 6000’s in the denominator. It uses little memory, because it just keeps count rather than saving the numbers. I have tried debugging, and using the fault finder method to no avail. I normally use Python 3x but I altered the code to run in 2x, thinking that might help.link text
-
What kind of device are you running this on? I just tried your script on an iPad Pro, and it doesn't crash there. The result is 7295372 by the way.
-
@ld3 The faulthandler code doesn't work properly if you import and run it from your script. You should create/edit the
pythonista_startup.py
file in yoursite-packages
folder, and import and run the faulthandler there (or copy-paste the entire faulthandler code into thepythonista_startup
).This is necessary because the faulthandler has to run in the Python 2 and 3 interpreters, and it has to run when you restart Pythonista after a crash. Otherwise it produces empty or incomplete crash logs.
Just to be sure - when you say the program crashes, you mean that Pythonista itself crashes to the home screen, right? Or do you mean you get a Python exception/error printed to the console? The faulthandler only does something when Pythonista crashes completely, it's not useful when dealing with Python exceptions.
-
It also happened to me when the app or the script running try to access a restricted part of the memory or when there is not enough RAM
Since your script does not crash on my ipad pro 2017 (4GBs of RAM) too, i believe it's the second option