Return Value Convention
Most SDK methods returnint:
BeautyEffectEngine::Create() returns a std::shared_ptr; it returns nullptr on failure.
Common Errors and Fixes
1. Engine Creation Fails (Create Returns nullptr)
Possible causes:
- Invalid or inactive
app_id/app_key resource.fbdfile not found atresource_pathfacebetter.dllmissing or version mismatch- No network access (online authentication failed)
- Use an absolute path to rule out relative path issues:
- Make sure
facebetter.dllis in the same directory as the executable (CMake copies it automatically after build). - Get fresh
app_idandapp_keyfrom the dashboard.
2. facebetter.dll Not Found at Runtime
Symptom: A Windows dialog reports “facebetter.dll was not found” on startup.
Fix:
cmake --build build — CMake automatically copies the DLL after every build.
3. ProcessImage Returns nullptr
Possible causes:
- Input
ImageFrameis null (file not found, unsupported format, etc.) - Engine was not initialized successfully
- Out of memory
4. Beauty Effects Have No Visible Impact
Possible causes:- The relevant
BeautyTypewas not enabled viaSetBeautyTypeEnabled - Parameter value is
0(effect is off) - No face detected in the frame (reshape/makeup require face detection to succeed)
5. SetBeautyParam Returns Non-Zero
Possible causes:
engineisnullptr(engine creation failed earlier)- Value out of range
[0.0, 1.0]
6. OpenGL / Display Issues
Possible causes:- GLFW initialization failed (driver issue or OpenGL 3.0+ not available)
gladLoadGLLoaderreturned false
Enabling Debug Logs
During development, enableDebug-level logging for maximum detail:

