SDL Forum Index
SDL
Simple DirectMedia Layer Forums
Reply to topic
Re: Suspend worker thread when in background
rtrussell


Joined: 10 Feb 2016
Posts: 88
Reply with quote
Eric Wing wrote:
First, you need to make sure you are distinguishing between a background event and a quit event (which are you getting or maybe you
are getting both).

By "quit event" I take it you are referring to SDL_APP_TERMINATING, is that right? I am assuming that I will not receive that event as a result of putting my app into the background. The events I am 'expecting' are SDL_APP_WILLENTERBACKGROUND, SDL_APP_DIDENTERBACKGROUND and/or SDL_APP_DIDENTERFOREGROUND.

Quote:
I don't know what Android does with mmap, if anything.

I have to use mmap rather than an alternative memory allocation function because I need the memory to be executable.

Here's a logcat entry for one of the crashes that happened when my app is backgrounded:

Code:
02-01 20:03:54.947   553   553 F DEBUG   : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x200390a5

It's a segfault for address 0x200390a5, which is within the block allocated to my process by mmap. How can I interpret this other than an indication that the memory has been unmapped?

Richard.
View user's profileSend private messageVisit poster's website
Suspend worker thread when in background
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 2 of 2  

  
  
 Reply to topic