Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Cenobite

Pages: [1]
1
General / Debugging SFML android app
« on: February 06, 2016, 05:47:11 pm »
I am starting out development of a small game using SFML and TGUI. So far I just have a bare bones menu example  which works fine on OS X, but when I launch it on Android it crashes and I see this in the adb logcat:

Quote
02-06 17:08:48.475  1407  1421 I sfml-error: Failed to activate the window's context
02-06 17:08:48.475  1407  1421 I sfml-error:
02-06 17:08:48.475  1407  1421 I sfml-error: Failed to activate the window's context
02-06 17:08:48.676   266   292 I WindowManager: Screen frozen for +2s833ms due to Window{9c6ed66 u0 Starting xyz.simek.theycome}
02-06 17:08:49.110   266   292 W art     : Long monitor contention event with owner method=int com.android.server.wm.WindowManagerService.relayoutWindow(com.android.server.wm.Session, android.view.IWindow, int, android.view.WindowManager$LayoutParams, int, int, int, int, android.graphics.Rect, android.graphics.Rect, android.graphics.Rect, android.graphics.Rect, android.graphics.Rect, android.graphics.Rect, android.content.res.Configuration, android.view.Surface) from WindowManagerService.java:3097 waiters=0 for 170ms
02-06 17:08:49.204    69   150 D AudioFlinger: mixer(0xb4480000) throttle end: throttle time(204)
02-06 17:08:49.416    69   150 D AudioFlinger: mixer(0xb4480000) throttle end: throttle time(12)
02-06 17:08:49.539  1407  1421 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x5c in tid 1421 (.simek.theycome)
02-06 17:08:49.698    66    66 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

What does it mean? I searched these forums and one post says it's threading issue, but I am not using threads (at least not that I know of). The android example bundled with SFML works fine, so it must be my mistake.

I have a simple state machine which stores states in a std::vector and each state has access to sfml::RenderWindow through a single Game object like this:

class Game
{
        public:
                sf::RenderWindow window;
                std::vector<GameState*> states;

                void pushState(GameState* state);
                void popState();
                void changeState(GameState* state);
                GameState* peekState();
};
...
class GameStateStart : public GameState
{
        public:
                Game* game;
                GameStateStart(Game* game) : game(game) {}

                virtual void draw(const float dt)
                {
                        this->game->window.draw(...);
                }
};
 

Full log is here: http://pastebin.com/WBe1BGnT

Any idea what might be wrong or a better way to go about debugging than using logcat?

Pages: [1]
anything