Crash reports

Post here your questions about the C++ API for SFS2X

Moderators: Lapo, Bax, MBagnati

dhuang11
Posts: 38
Joined: 02 May 2014, 08:21

Re: Crash reports

Postby dhuang11 » 13 Oct 2015, 06:58

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).
User avatar
Lapo
Site Admin
Posts: 19759
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Crash reports

Postby Lapo » 13 Oct 2015, 08:26

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=https://books.google.it/books?id=cWK4CAAAQBAJ&pg=PA407&lpg=PA407&dq=boost+pointers+android&source=bl&ots=Du1MqHzrVJ&sig=38fGRbg-ZkJste1RyrXNFWwysyE&hl=en&sa=X&ved=0CEUQ6AEwBmoVChMIkOKF4P6-yAIVBTIaCh0j8QnO#v=onepage&q=boost%20pointers%20android&f=false
]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.

thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
dhuang11
Posts: 38
Joined: 02 May 2014, 08:21

Re: Crash reports

Postby dhuang11 » 19 Oct 2015, 09:22

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.
User avatar
Lapo
Site Admin
Posts: 19759
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Crash reports

Postby Lapo » 19 Oct 2015, 09:29

Hi,
thanks for the update. Good to know!
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X C++ API”

Who is online

Users browsing this forum: No registered users and 1 guest