This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Hey all,

I've got this weird bug where I get a segfault when attempting to run on a real android device using a release build. No segfault occurs when running on an emulator or when using a debug build.

Using adb -d logcat turns up a standard SIGSEGV log, mentioning a GLThread 1200.

Does anyone know what could be going on here?

Godot version 3.2.3
in Engine by (174 points)

1 Answer

0 votes
Best answer

After some more research, I suspected that the infamous dangling variant bug was to blame. It turns out that I was right. Here's how I got my release builds to work:

I downloaded the godot 3.2.3 source, and then modified the .cpp and .h files such that the dangling variant fix would apply to release builds too. Luckily, all of this can be done by simply removing preprocessor commands. Then, I rebuilt godot and the applicable build templates. It's a lot of work, but it works.

On a side note, it's a bit too late for this but I think the dangling variant fix should apply to release builds as well. I would imagine that the vast majority of godot users are like me, and would gladly take the performance hit in exchange for not having segfaults in release builds. For those who care enough about performance that they are willing to tiptoe around segfaults, a separate build/source should be provided. But that's just my two cents...

by (174 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.