• @stephen 👍

  • Thanks to @tomkirn for providing the solution at this earlier question: https://forum.omz-software.com/topic/5835/crash-on-open

    If you wanna access the file contents again, in the same directory do:

    with open("{filename}.py","r") as r: oldcontent = r.readlines() with open("{otherfilename}.txt","w+") as f: f.writelines(oldcontent)

    To Ensure your editor doesn’t load it as a py file and crash, and also so that you may pick out the part of the file you believe is causing the crash to occur!

  • Thank you for the info

  • If I remember correctly, the enable_faulthandler.py can't be used as a pythonista_startup.py directly (by default the faulthandler script is meant to be importable, so it doesn't run when loaded). This gist contains the faulthandler script as a working pythonista_startup.py. (The faulthandler prints a message in the console when it runs, so you can tell when it's working correctly.)

  • Yeah, FIFOs are strange, I don't think there's any use for them in Pythonista. A FIFO works kind of like a normal pipe in a shell - one side writes to it, the other one reads from it. (Usually the two sides would be different processes, but you can probably do it in a single process if you use threads or non-blocking IO.) The reason why Pythonista froze when you opened the FIFO is because the editor tried to read the file contents, but because there was no writer attached to it, the read (or possibly the file open) blocked forever.

    I don't know why Pythonista crashed when you tried to do anything else with the FIFO - my guess would be that the file manipulation methods that Pythonista uses don't handle FIFOs properly. I also have no idea why safe mode helped (I thought it did the same thing as pythonista3:// - disabling pythonista_startup and closing all editor tabs) but I'm not going to complain.

    In case safe mode ever doesn't work, there is another way you can get rid of a problematic file. Pythonista's share extension has full access to all files stored in the app, so you can use the Python console there to delete the file. The share extension has much fewer features than the main app, and the file browser and editor aren't loaded by default, so it's much less likely to crash than the main app.

    If that doesn't work either, and you have purchased the old Pythonista 2 when it was still available, you can use it as well. Although you can't see Pythonista 3 files in Pythonista 2's UI anywhere, both versions share the same storage location internally. In Pythonista 2, Pythonista 3's files are located at os.path.expanduser("~/Pythonista3/Documents"). The chance of a Pythonista 3 file crashing Pythonista 2 is basically zero, because Pythonista 2 never looks at Pythonista 3's files (unless you do so manually using Python).

    If that isn't an option either, you can make a backup of your device using iTunes, and then use a tool like iFunbox or iExplorer to extract your Pythonista files from the backup. (I honestly don't know how either of those tools deal with FIFOs and other special files in backups, or if iTunes even backs such files up. If special files cause issues when extracting, you can manually copy out all files except the problematic special files.) Once you're sure that you've gotten all your data out, you can delete and reinstall Pythonista and copy all of your data back.

  • It seems like this is a problem with some of the built-in image collections being compressed too aggressively in 2.1, which apparently leads to issues with loading OpenGL textures. I'm not exactly sure why this is, but the problem seems to go away entirely when I replace the image collections in 2.1 with those from 3.0 – the content is the same, but the size of the app will go up very slightly as a result of the fix.

    I haven't always been able to reproduce the crash; it sometimes worked, and when it worked, it usually did until restarting the app (as loaded images/textures are cached). So I think the initial suspicion about certain variable names or text formatting issues might have been a red herring.

  • @Oscar Should be in the Examples folder (use "Restore Examples" in the settings if it's not there).

Internal error.

Oops! Looks like something went wrong!