Hi I am trying to build a multiplayer . Everything runs fine until I get an error "Unable to find Kernel32" during game and just after that socket gets disconnected . I happens so frequently that in 4 mins game , I get disconnected around 8-9 times. I tried to switch unity version but of no use. I tried it on 2017.2 , 2018.2 and 2018.3 . Scripting runtime version is 4x equivalent and Scripting backend is Mono. I am using nakama for multiplayer but after doing some research I found that this is something related to Unity only. please help.
Can you paste more log? Alternatively try enable stacktrace logging to full (in PlayerSettings), maybe it will print a stacktrace from where it tries to access kernel32, though this is a window library.
Logs are as followed: Code (CSharp): 12-18 12:08:55.933 28228 28461 E Unity : Unable to find Kernel32 12-18 12:08:56.168 1135 1135 I DeviceIdleController: updateChargingLocked: charging=true 12-18 12:08:56.168 1135 1135 I DeviceIdleController: becomeActiveLocked, reason = charging 12-18 12:08:56.172 6462 6462 D AbstractProcessor: onBatteryChange Percent:56 State:2 12-18 12:08:56.425 28228 28242 I Unity : shot no.15ball in pocket set to inpocketThisTurn 12-18 12:08:56.425 28228 28242 I Unity : #0 0xdff8627c (libunity.so) ? 0x46727c 12-18 12:08:56.425 28228 28242 I Unity : #1 0xe051ba7c (libunity.so) ? 0x9fca7c 12-18 12:08:56.425 28228 28242 I Unity : #2 0xe02023b8 (libunity.so) ? 0x6e33b8 12-18 12:08:56.425 28228 28242 I Unity : #3 0xe02022c0 (libunity.so) ? 0x6e32c0 12-18 12:08:56.425 28228 28242 I Unity : 12-18 12:08:56.425 28228 28242 I Unity : (Filename: ./Runtime/Export/Debug.bindings.h Line: 45) 12-18 12:08:56.425 28228 28242 I Unity : 12-18 12:08:56.425 28228 28242 I Unity : shot no.15ball in pocket set to inpocketThisTurn 12-18 12:08:56.425 28228 28242 I Unity : #0 0xdff8627c (libunity.so) ? 0x46727c 12-18 12:08:56.425 28228 28242 I Unity : #1 0xe051ba7c (libunity.so) ? 0x9fca7c 12-18 12:08:56.425 28228 28242 I Unity : #2 0xe02023b8 (libunity.so) ? 0x6e33b8 12-18 12:08:56.425 28228 28242 I Unity : #3 0xe02022c0 (libunity.so) ? 0x6e32c0 in this Code (CSharp): shot no.15ball in pocket set to inpocketThisTurn is just a dubug logs in unity.
No idea what 'shot no.15ball in pocket set to inpocketThisTurn' is . Still it's not clear where Kernel32 is being accessed. Did you really enable stacktrace logging to Full?
'shot no.15ball in pocket set to inpocketThisTurn' was my logs . I was trying to check something else as well. Anyways I removed all my custom logs and now posting new logs . Code (CSharp): 12-20 13:09:02.216 10357 10778 E Unity : Unable to find Kernel32 12-20 13:09:02.598 624 624 I MSM-irqbalance: Decided to move IRQ240 from CPU3 to CPU1 12-20 13:09:02.734 5249 6175 D PhoneInterfaceManager: [PhoneIntfMgr] getDataEnabled: subId=1 phoneId=0 12-20 13:09:02.734 5249 6175 D PhoneInterfaceManager: [PhoneIntfMgr] getDataEnabled: subId=1 retVal=true 12-20 13:09:02.736 4539 5327 D TelephonyManager: getDataEnabled: retVal=true 12-20 13:09:02.747 5249 15573 D PhoneInterfaceManager: [PhoneIntfMgr] getDataEnabled: subId=1 phoneId=0 12-20 13:09:02.748 5249 15573 D PhoneInterfaceManager: [PhoneIntfMgr] getDataEnabled: subId=1 retVal=true 12-20 13:09:02.751 4539 5327 D TelephonyManager: getDataEnabled: retVal=true Also by "enable stacktrace logging to Full" means making logging in player setting to full right? I have attached a screenshot of player setting Logging as well. Please tell me if I am missing something here.
Yes, that's correct. Maybe you're not using Development player then ? I think stacktrace resolving doesn't work in NonDevelopment player
ok I tried this on development build and here are the logs: Code (CSharp): I/Unity ( 1944): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45) I/Unity ( 1944): E/Unity ( 1944): javax.net.ssl.SSLHandshakeException: Connection closed by peer E/Unity ( 1944): #0 0xe1447474 (libunity.so) GetStacktrace(int) 0x44 E/Unity ( 1944): #1 0xe1ff33ac (libunity.so) DebugStringToFile(DebugStringToFileData const&) 0x230 E/Unity ( 1944): #2 0xe1f088a4 (libunity.so) TransportAndroid::ErrorCallback(void*, void*, long long, int, void*) 0x114 E/Unity ( 1944): E/Unity ( 1944): (Filename: /Users/builduser/buildslave/unity/build/Platforms/Android/Modules/UnityWebRequest/Transports/TransportAndroid.cpp Line: 451) E/Unity ( 1944): E/Unity ( 1944): javax.net.ssl.SSLHandshakeException: Connection closed by peer E/Unity ( 1944): #0 0xe1447474 (libunity.so) GetStacktrace(int) 0x44 E/Unity ( 1944): #1 0xe1ff33ac (libunity.so) DebugStringToFile(DebugStringToFileData const&) 0x230 E/Unity ( 1944): #2 0xe1f088a4 (libunity.so) TransportAndroid::ErrorCallback(void*, void*, long long, int, void*) 0x114 E/Unity ( 1944): E/Unity ( 1944): (Filename: /Users/builduser/buildslave/unity/build/Platforms/Android/Modules/UnityWebRequest/Transports/TransportAndroid.cpp Line: 451) E/Unity ( 1944): D/Unity ( 1944): Unable to lookup library path for 'Kernel32', native render plugin support disabled. E/Unity ( 1944): Unable to find Kernel32 I/Unity ( 1944): unfortunately there are no other logs . I have enabled development build from build settings as well.
I get the exact same message in my logcat. I am currently on 2018.3.0f2. I don't know if it happened earlier. I do have some kernel32.dll (and user32.dll) imports in my code, but they are all behind #if UNITY_STANDALONE_WIN I can add to the information by @Polo07 that the two lines are not from the main thread. The thread in question doesn't post anything else to the log. Besides this and the main thread I only see the graphics thread posting about framebuffers and some shader issues. Code (CSharp): 01-08 16:51:53.312 19688 19729 I Unity : //some stuff I log 01-08 16:51:53.442 19688 20072 D Unity : Unable to lookup library path for 'Kernel32', native render plugin support disabled. 01-08 16:51:53.442 19688 20072 E Unity : Unable to find Kernel32 01-08 16:51:53.652 19688 19729 I Unity : //some more stuff I log
Interesting. Still, I can't see any other way of trying to import kernel32 besides from something in the code doing dllimport.
@Piflik were you able to find any solution to this?? I found out that if I use Code (CSharp): api compatibility level to .Net Standard 2.0 then the message "Unable to find Kernel32" is not printing but socket still gets disconnected frequently without logs. Also I deleted all library apart from nakama and json.Net(Newtonsoft) , but still the problem persists.