Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Android as start init eglDisplay Manager before native window created #282

Open
julee opened this issue Nov 27, 2017 · 1 comment
Assignees
Labels

Comments

@julee
Copy link

julee commented Nov 27, 2017

See App.cc, in StartMainLoop(), this->addBlocker(AppState::Init) try to block app init until native window created(readyForInit will call when native window create, this try to unblock app init).
But, App::onFrame:

    if ((this->nextState != AppState::InvalidAppState) && (this->nextState != this->curState)) {
        // check if the next state is blocked
        if (this->blockers.Contains(this->nextState)) {
            // yikes, we're blocked
            if (AppState::Blocked != this->curState) {
                Log::Info("App::onFrame(): state '%s' is blocked, switching to Blocked state!\n", AppState::ToString(this->nextState));
                this->curState = AppState::Blocked;
            }
        }
       ..........

block operation only work when nextState is not AppState::InvalidAppState, unfortunately, when app created, it's nextState is AppState::InvalidAppState. So app loop won't block here!

This cause oryol sometimes crash when loop has run but native window has not create yet.

@floooh floooh self-assigned this Nov 27, 2017
@floooh floooh added the bug label Nov 27, 2017
@floooh
Copy link
Owner

floooh commented Nov 27, 2017

thanks for the bug report! I'll try to have a look soon-ish, haven't checked the Android build for quite a while, maybe something has regressed, or this is a situation which doesn't happen on my device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants