Description
[REQUIRED] Please fill in the following fields:
- Pre-built SDK from the website or open-source from this repo: Pre-built SDK from website
- Firebase C++ SDK version: 12.8.0
- Problematic Firebase Component: Core (App)
- Other Firebase Components in use: Auth, Firestore, Storage, Analytics, Messaging
- Platform you are using the C++ SDK on: Windows (Visual Studio)
- Platform you are targeting: Windows Desktop
[REQUIRED] Please describe the issue here:
🚨 [Regression] Windows crash in AppCallback::AddCallback()
before App is created in SDK 12.8.0
firebase::App::Create()
or firebase::App::GetInstance()
. The application fails during startup with a runtime crash in firebase::AppCallback::AddCallback()
.
This behavior did not occur in SDK 12.7.0, and started with SDK 12.8.0, indicating a regression.
✅ This issue is Windows-only. Android builds and runs correctly.
Call Stack (Visual Studio):
...exe!_report_gsfailure(...) Line 220
...exe!firebase::AppCallback::AddCallback(class firebase::AppCallback *)
...exe!cocos2d::TransitionShrinkGrow::TransitionShrinkGrow(void)
ucrtbased.dll!...
This error triggers _report_gsfailure()
and aborts the process.
Steps to reproduce:
- Create a Windows desktop app with Firebase C++ SDK 12.8.0
- Do not call
firebase::App::Create()
yet - Launch the app and enter a scene with any usage of
Storage::GetInstance()
or indirect Firebase access - App crashes at runtime before Firebase initialization
Expected behavior
Firebase components (especially AppCallback
registration) should not invoke logic that depends on App::GetInstance()
before the user has explicitly initialized it.
If callbacks must be added automatically, the SDK should gracefully check for null app instance and skip or defer until the app is ready.
Regression?
✅ Yes — this crash does not happen in Firebase C++ SDK 12.7.0
❌ Reproduces 100% in Firebase C++ SDK 12.8.0 (Windows only)
Suggested Fix
Internally guard AppCallback::AddCallback()
or similar logic to check for a valid app instance:
if (firebase::App::GetInstance() == nullptr) return;
Workaround
Downgrade to Firebase C++ SDK 12.7.0, which does not exhibit this problem.
Please let us know if this was an intended structural change, or if it's an unintended regression.
Thanks!