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.
Presenting ViewController
-
Could anyone else with an iPad Air 2 test this?
Unfortunately I don't have such a device here. As the OS I'm testing on is the same, I can't think of anything else that could be different, apart from the actual hardware... I don't suppose your device is jailbroken? (don't think that's possible on iOS 9, but I don't really follow this closely).
The crashes with
on_main_thread
surprise/worry me more than those with blocks, to be honest. With the blocks, I know that what I'm doing is a total hack, but theon_main_thread
stuff should be pretty standard, and uses documented APIs... -
What exactly is the problem with the crash reports btw?
-
Device is not jailbroken, True statement( if it changes something)is off.
For the logs i cant find a Pythonista-date.log but i find LatestCrash-Pythonista and LatestCrash-Pythonista2, but they're both empty Screenshot -
@filippocld said:
True statement( if it changes something)is off.
What do you mean by this?
To be honest, I'm not sure the crash reports would help me very much anyway. It's very difficult to fix something that I can't reproduce at all myself. Usually, a crash report helps with reproducing issues, and then fixing them, but from what I've seen so far, I think the problem may be hardware-specific and just not reproducible on what I have here. I might need to get an iPad Air 2 myself, though I'm a bit reluctant to buy one now, given that there will probably be new iPads in less than 2 months...
-
In Pythonista Settings there is an option called True statement, which i don't know what does, so i left it to No
For the @on_main_thread thing i remember that in the beta before the introduction of the blocks(160022) @on_main_thread was working fine.Then in beta 160023 you changed something in on_main_thead that caused the crash
From the Beta Release notes of 160023: "on_main_thread()` should be reentrant now (which means that it's possible to nest calls that are executed to the main thread -- while this mostly worked before, there were cases in which it would result in corrupted return values)."
-
That's very interesting information, thanks!
I think you mean the "True Divisison" setting – that shouldn't make a difference at all, it's just for the interactive console, and determines whether something like
5/2
evaluates to2
or2.5
. -
Oh, then that's useful :-) thanks
-
I just ordered an iPad Air 2 that I'll pick up later today. I'm curious if the issue is reproducible, though I'm really not sure if I can fix it, even if it is – it might be too low-level... In any case, it'll be useful to test the new split-screen stuff in iOS 9 as well...
-
Good! Hope will fix both the crashes or at least one of them.
I am kinda angry when i make a iOS 9 api scripts(Replaykit,Search Apis,Touch id etc.) and cant use it because blocks crash and on main thread crashes too -
Okay, I have the new iPad set up for development, and it really seems like this is a hardware-specific issue. I can at least reproduce your crashes now... haven't really investigated this much further yet, just wanted to let you know that I don't really need crash reports anymore.
-
Oh, thanks! Finally im not only the one with theese problems.
Looking forward for more infos.
Thanks in advance
Filippo -
I think I've made some progress! :)
It seems that some compiler optimizations were responsible for the crashes. I have no idea why this only happens on the A8X (or why it happens at all, to be honest), but after I've recompiled libffi (the library ctypes is based on) with a lower optimization level, everything seems to work fine on the iPad Air 2.
I'll need to do a little more testing to make sure that this doesn't somehow break things on other devices, but I'm pretty optimistic that I can fix the crashes you've seen with the next build.
-
This is Fantastic!
Thanks, if all goes well i will seriously enjoy using objcutil!
Waiing for the next build
Thanks in advance,
Filippo -
Knowing a fair bit about processor architectures - S/360 from 1964 application code running unchanged on z13 in 2015 :-) - I'm surprised a NEW processor should have problems with instructions that worked before. Maybe the optimisations were timing-dependent and the compiler authors got that wrong.
So I'd expect A8X issues to be more pervasive.
But we live and learn.
-
@MartinPacker This is very strange, indeed.
@omz Did you make any progress? -
Turns out it isn't quite as easy as I thought... :/
I wanted to release a new beta yesterday, but then I did some final testing with the build I actually uploaded to TestFlight, and while it worked totally fine when testing in Xcode, it turned out that the TestFlight exhibited the very same crashes I had before... :/
Release builds have a slightly different configuration in Xcode, so I've tried a lot of things to make the release build behave like the debug build, but I've already spent hours with this, and haven't found out what causes the different behavior so far. I'm still somewhat optimistic that I'll be able to sort this out eventually, but it's probably going to take a bit longer than I expected...
-
No, I believed! :-(
-
Quote:
"The biggest difference between these is that: In a debug build the complete symbolic debug information is emitted to help while debugging applications and also the code optimization is not taken into account. While in release build the symbolic debug info is not emitted and the code execution is optimized. Also, because the symbolic info is not emitted in a release build, the size of the final executable is lesser than a debug executable.One can expect to see funny errors in release builds due to compiler optimizations or differences in memory layout or initialization. These are ususally referred to as Release - Only bugs :)
Release configuration by default uses different code optimization than Debug configuration, so some code lines can be optimized and skipped
You can check/change configurations at Target -> Build Settings -> search for Optimization Level"
-
My favorite problem with optimized builds (in Linux) is that I forget to mark a variable as
volatile
. Works for debug builds, but in optimized builds the compiler often holds values in registers, and voila the update from a different thread gets lost.Maybe its is something like this.
Georg -
@omz So, I installed the new build and IT WORKS, YES!
Can you tell me how did you achieve that?
Thanks for your help, pythonista is the most powerful and useful app ever with objc integration 😍.
One last thing: what is restype for?