Open protyposis opened 8 months ago
OpenGL ES error 0x500 is "GL_INVALID_ENUM", which points to some flag being used that the particular OpenGL implementation on that device does not understand.
Please make sure the device properly supports and uses OpenGL ES 3.1 as the selected profile to run projectM. Any previous version will not work due to projectM making use of OpenGL ES 3.1 functionality.
Your debug output suggests you're using a OpenGL ES 2.0 rendering profile. I suggest checking the OpenGL version after context creation to make sure it's really "3.1 ES" and not some older fallback version.
In the release build, the crash in the playlist library will probably happen because the projectM instance creation fails without sigabort being called as an assertion and projectm_create()
returns NULL or an invalid pointer. Passing this to the playlist manager will cause the projectM callback registration to crash.
Thank you, you're right, the version was set to 2.0 (it still worked on most tested devices). Increasing to v3 (it is not possible to explicitly request minor versions) makes it work on the API 30 emulator :)
It still doesn't work on the Pixel phone (which supports up to 3.2), on which I noticed it doesn't log the 0x500
error, so I might just have erroneously assumed that it's affected by the same issue. Need to investigate further.
On the Pixel phone, it seems that LoadIdlePreset()
fails in the init function (exception message is unfortunately just std::exception
). I traced it to a failing member initialization at https://github.com/projectM-visualizer/projectm/blob/50c64d4e653a9f6dcb97f59f377b8796eed278fe/src/libprojectM/MilkdropPreset/MilkdropPreset.cpp#L47-L56
but got stuck here due to my limited C++ experience.
Further pinned it down to m_motionVectors
-> m_presetState
-> globalMemory
, where it seems to fail at the projectm_eval_memory_buffer_create()
call.
If this call fails, the only reason I could see here is an out-of-memory issue, as the function is a single line with calloc() that reserves a small array of pointers (1024 bytes on 64-bit platforms) and initializes the area with zeroes. Since I don't have any Android experience or any test systems, I can also just guess on this one - never happened on any other platform I've tested on, including the Raspbery Pi 5.
Describe the bug
I am testing projectM 4.1.0 on a few Android devices. The
projectm_create()
call seems to fail on some of them, with the following errors:It doesn't crash though, and following
projectm_opengl_render_frame
calls just don't render anything. There are no further errors.When using the debug build, the app crashes immediately at instance creation with
Using the release build and initializing a playlist with
projectm_playlist_create
, a crash doesn't happen until the firstprojectm_opengl_render_frame
call:When additionally loading presets into the playlist, I receive a
projectm_playlist_preset_switch_failed_event
on the first render call with error messagestd::exception
, and afterwards it seems to enter an infinite loop trying to load the idle presetidle://Geiss & Sperl - Feedback (projectM idle HDR mix).milk
and again failing all the time with error messagestd::exception
.Tested devices: