-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Crashes while ad loading on android #90
Comments
Hmm... Someone added thread safety recently for Qt versions > 5.10 maybe it's a result of those changes? I can't dig out the commit right now - but it's fairly recent. Maybe that's the culprit? |
It seems to be a fundamental problem of the Admob implementation in QtFirebase. The use of callbacks across threads and the storage of payload in the objects, which can be destroyed at any time by QML. I try to read in the code the next few days. When I get to that, I completely change the code to the polling mechanisms of firebase_cpp. |
greets from germany There is a first iteration of the refactoring:
We still testing the branch, so it is not bug free. We also currently have no chance to test it on iOS in the wild. Take a look at the changes and tell me how we go on from here?
|
@GaRaOne - thanks for your efforts! |
... on a quick side note: I don't think I'll do the merges manually no matter what. When I first wrote the AdMob module it was made to support primarily QML - so it's use was designed to follow the QML engine's garbage collection. I haven't had any crashes recently in any of my live apps using it - that's why I'm questioning the crashes 🙂 |
The Qml flow is the cause for the crashes. firebase_cpp assume static c strings in all its examples. Qml/QtFirebase use dynamic allocated strings. you tried to solve this by caching the strings in the Request-Object. But at the point an AdmobBanner, AdmobInterstitial or AdmobRewardedAd gets destructed, all the this strings/pointer get undefined. Same if you change a Request Property. Also there is a flaw with the callbacks. If a callback is processed after the destruction of an AdmobXxx instance, the whole app crashes. I try to do no logic in the Listener-Callbacks (OnBoundingBoxChanged is the only left) to address this Problem. We have a trigger in the App which activates/deactivates all Advertising by QmlLoaders, if the user purchase an InApp-Item ... with the master branch it crashes in QtFirebase/firebase_cpp nearly every time. Just look at it and give it a try :) ... |
We have serveral crash reports on android in our last release... mostly while loading of banner and rewared ads... interstitials seems to be stable instead.
do you have any idea?
we shipped with:
QtFirebaseAdMobBanner::loadInternal
QtFirebaseAdMobRewardedVideoAd::loadInternal
The text was updated successfully, but these errors were encountered: