-
Notifications
You must be signed in to change notification settings - Fork 863
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
Cases where log4net manager can be found, but Internal logger can fail initialization causing a NullReferenceException #1747
Comments
I'm also having this issue. Any resolution yet? |
@AdamBebko I have a suggested fix above, but I haven't heard anything yet. I'm away from my desktop for holidays atm, but can update next week. |
I don’t know how to do that haha. I’m using the AWS SDK dlls If it helps resolve things I’m getting the error in IOS. I also suspected code stripping being the culprit. I also don’t have log4net.dll in my project. When I do, the game won’t even boot and crashes on launch. For me, I’m getting errors when I hit the buttons in my game that calls the methods that try to sign into or sign up for cognito. I think it’s when I create the clientprovider object. I’ve tried playing around with link.XML in unity but no success so far. I’ve also tried setting disablelogging = true. It that didn’t change anything. |
I'm facing a similar issue; I'm trying to get a WebGL build in Unity for my game to work, so I'm also using IL2CPP. I pulled this repo, added the fix that @jasonboukheir suggested, built the Cognito and GameLift related libraries and used those in my project. At first it was promising, I got through the logger initialization error, however, when the execution proceeds, it fails later downstream when the SDK attempts to encrypt data through the UserCrypto module as it's trying to import Crypt32.dll which is a Windows native library. In any case it would be great if the SDK team could make these modules available for platforms that require AOT compilation and don't have access to Win native libraries. I'd imagine there's plenty of use-cases where people might want to use Cognito, DynamoDB and GameLift in their Unity games on various platforms, which is quite impossible at the moment. |
I ended up going slightly deeper and fixed the Fixing that, however, caused another issue where I don't even have a stack trace anymore. All it says is a Would love to hear if anyone's managed to solve this. |
We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue. |
This is still happening:
Edit: |
Closing this due to lack of traction and based on last comment that it's fixed with latest version of SDK. Feel free to open new issue in case problem still occurs. |
Comments on closed issues are hard for our team to see. |
Description
I'm getting
NullReferenceException
in my unity android build, and I sourced it toInternalLog4netLogger.ctor(Type declaringType)
. I'm still not sure if it's being caused becausegetLoggerWithTypeMethod
is null, but it seems that's the case. I figure that there's some stripping happening with IL2CPP causing this condition. I don't have log4net logging enabled in my aws config. One of my 3rd party packages is using log4net.I have a hunch there's a condition where
logMangerType
can be non-null, butgetLoggerWithTypeMethod
can be null.Reproduction Steps
Logs
Environment
Resolution
In lines 149-155:
There are conditions where
loadStatics()
can fail, butlogMangerType != null
. My suggestion is to check forloadState == LoadState.Failed
instead oflogMangerType == null
to make sure thatgetLoggerWithTypeMethod
is not null.This is a 🐛 bug-report
The text was updated successfully, but these errors were encountered: