Page 2 of 2

Re: Crash reports

Posted: 13 Oct 2015, 06:58
by dhuang11
Ok and finally - this is what we've found works and the decision on which resolution to use in our next app update:

boost::shared_ptr appears to be very compiler optimization dependent for about 1/3 of all Android devices. We changed Android NDK's NDK_DEBUG flag to 0 and this issue no longer occurs. We've run for nearly 10 hours with no crashes using the same code that previously would crash within 30 minutes (most of the time less).

Re: Crash reports

Posted: 13 Oct 2015, 08:26
by Lapo
Thanks for the detailed feedback.

I'd be interested in knowing if updating to the latest Boost helps the situation. We are not aware of any outstanding issues with Smart Pointers under Android. A quick google search doesn't bring up anything of interest, so I am not sure if this is a known problem or if something else is afoot.

I even noticed that Boost is highly recommended in technical books for native [url=
]Android app development:[/url]

Code: Select all

Also, is there a way to re-organize the SFS2X code in this area so that it would be less compiler/boost sensitive?

We'll think about it. At the moment I have no idea how this could be done in practice. Probably more investigation is necessary. Keep us posted on the tests with the latest Boost. I am still hoping there's a simple solution to this.


Re: Crash reports

Posted: 19 Oct 2015, 09:22
by dhuang11
One last follow-up...

We've had thousands of players on the new build that is compiled with C++ optimizer -O2 over the past week or so. Android devices are no longer crashing frequently from the problematic scenario we detailed out in previous posts.

So this confirms that changing the NDK build settings and turning on compiler optimization makes the issue go away.

Re: Crash reports

Posted: 19 Oct 2015, 09:29
by Lapo
thanks for the update. Good to know!