-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fatal Exception on Banner.getWidth #230
Labels
bug
Something isn't working
Comments
Hi, are you trying to set an ad size manually? |
I'm not changing the ad size manually. Here are the only scripts that interact with the addon in my code:
And also this one:
|
I have created a PR that solves this issue: |
Thank you I will review |
@catabriga merged, will be on v3.0.5 soon, thank you very much! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Godot version
4.2.2
Plugin version
v3.1.1
Phone information
Motorola One Vision Android 11
Issue description
Sometimes the app crashes due to a fatal exception in the admob addon. The issue appears to happen when the width of the banner is requested but the ad size has not been initialized yet. This happens because the mAdSize variable is labeled as lateinit, but it is possible for godot to try to access it before it is initialized.
Here is a stacktrace of a crash:
Steps to reproduce
The crash does not happen very frequently. To reproduce it reliably I made my app automatically change between two screens such as that one of the screens shows a banner and the other does not. This causes the banner to repeatedly load and unload, which triggers the crash after some minutes.
Additional context
No response
The text was updated successfully, but these errors were encountered: