fl1k Posted August 18, 2021 Posted August 18, 2021 Clientside CEFs keep crashing the game on random occurances (same code) I ran the server, submitted Login CEF, it closed. I shut the server down, I run it again, I press login and I crash. (jquery used inside) [code] mp.events.add('SendLoginData', (password) => { mp.events.callRemote('client:LoginData', password); }); var loginBrowser = null; mp.events.add('server:OpenLoginPage', () => { mp.players.local.freezePosition(true); mp.gui.cursor.show(true, true); mp.gui.chat.activate(false); mp.game.ui.displayRadar(false); loginBrowser = mp.browsers.new('package://Auth/Login/Login.html'); }); mp.events.add('server:CloseLoginPage', () => { mp.players.local.freezePosition(false); mp.gui.cursor.show(false, false); mp.gui.chat.activate(true); mp.game.ui.displayRadar(true); if(loginBrowser) { loginBrowser.destroy(); loginBrowser = null; } }); [/code] nulled browser like Panckakers said but no difference <!DOCTYPE html> <html> <head> <link type="text/css" rel="stylesheet" href="../styles.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("#loginButton").click(function(){ if($("#passwordText").val().length > 3) { mp.trigger('SendLoginData', $("#passwordText").val()); } // alert }); }); </script> </head> <body> <div id="container"> <form id="authForm"> <div class="rows"> <div class="row"> <h1>Welcome! Please login.</h1> </div> <div class="row"> <input id="passwordText" class="inputbox" placeholder="Password" type="password"> </div> <div class="row"> <input id="loginButton" type="submit" value="Login"> </div> </div> </form> </div> </body> </html>
fl1k Posted August 18, 2021 Author Posted August 18, 2021 My cef logs are full of these: D:\RageMP\clientdata [0818/233415.121:ERROR:gpu_process_transport_factory.cc(990)] Lost UI shared context.
fl1k Posted August 18, 2021 Author Posted August 18, 2021 [0819/005618.289:INFO:CONSOLE(1)] "REGEX IS: ", source: rui://main/js/app.1950bf4f.js (1) [0819/005626.152:WARNING:angle_platform_impl.cc(59)] compileToBinary(235): C:\fakepath(73,10-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them C:\fakepath(95,10-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them [0819/005633.668:WARNING:angle_platform_impl.cc(59)] compileToBinary(235): C:\fakepath(73,10-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them C:\fakepath(95,10-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them cef_launcher_log
sparx Posted August 19, 2021 Posted August 19, 2021 Have you enabled CEF debugging to test on the browser? Fakepath warnings are usually ok, after a quick google it seems to point to a shader issue, feel free to delve into that if you think it could be causing issues. But if you could debug on CEF via a web browser and inspect the devtools. On the other hand, change your <input> tag to <a> with your own style, seems to not cause issues with refreshing the CEF (which could be a cause of crashing?) but still calls your trigger. https://codepen.io/scomitch/pen/jOmjedy?editors=1111
fl1k Posted August 19, 2021 Author Posted August 19, 2021 I tried using CEF debugging but failed, The devtools session would end when I press the button
fl1k Posted August 19, 2021 Author Posted August 19, 2021 (edited) https://i.imgur.com/QxqziHs.png https://i.imgur.com/NbsgYje.png https://i.imgur.com/qTlvg7Q.png https://i.imgur.com/AfJAJqi.png 1st time debugging, no issues 2nd time. no issues 3rd time, no issues. Now I will try without debugger Edited August 19, 2021 by fl1k
fl1k Posted August 19, 2021 Author Posted August 19, 2021 no debugger: crash..... 8 hours ago, sparx said: Have you enabled CEF debugging to test on the browser? Fakepath warnings are usually ok, after a quick google it seems to point to a shader issue, feel free to delve into that if you think it could be causing issues. But if you could debug on CEF via a web browser and inspect the devtools. On the other hand, change your <input> tag to <a> with your own style, seems to not cause issues with refreshing the CEF (which could be a cause of crashing?) but still calls your trigger. https://codepen.io/scomitch/pen/jOmjedy?editors=1111 it only crashes if I CloseLoginPage is called, making me think it's osmething with destroy
fl1k Posted August 19, 2021 Author Posted August 19, 2021 Tried again, didn't crash 2 times and then crashed.. Just seems random
ConnorGuy Posted August 19, 2021 Posted August 19, 2021 Okay so I have resolved this my side I recommend not using the browser.destroy() to close the CEF, I am at work right now when I'm back home I will explain and give an example on how I am using CEF.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now