SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
88 stars 18 forks source link

Scroll the chat window will cause game crash #1970

Closed warren39 closed 4 years ago

warren39 commented 4 years ago

Scroll the chat window to top, sometimes Unturned will stuck about 10 seconds (00:04 - 00:14 in video), and then automatic exit, without popping the crash window.

I think it just my computer's problem. But after more and more Player reports this, it may have a problem in my server.

I use API UnturnedChat.Say() to send message in the plugin. It shouldn't cause game crash.

How to locate problem and fix it? I have no idea!

Video: https://youtu.be/yJ6Dx6UyW2g

Log: Client_Prev.log

educatalan02 commented 4 years ago

Send the log of the server too

warren39 commented 4 years ago

Server log shows : [Info] Disconnecting: PlayerID: 765611988...

It is Info level. can't find any Warning or Error level log.

SDGNelson commented 4 years ago

Off the top of my head the only difference with UnturnedChat.Say would be because Rocket (UnturnedChat) splits long strings into multiple messages, but crash-wise that should be no different than players chatting multiple messages.

Are any other hosts running into this issue?

warren39 commented 4 years ago

Singleplayer offline mode also running into this issue. Unturned will run normally if you chat in English, but got this issue if you chat in Chinese or Japanese.

Video: https://youtu.be/GusGtndmY2c

SDGNelson commented 4 years ago

Sorry about the issue. It looks like this is probably related to the older IMGUI system being used for the game HUD. It should be fixed when the UI text is updated to use TMP, but that is a big rewrite which I do not have an ETA for yet. :/

warren39 commented 4 years ago

Oh! Rewrite the IMGUI system really isn't an easy! Suggest provide a temporary solution: Add a config option to disable the chat window scrollable in server Config.json And then player can't scroll the chat window in the server. The server can use a EffectUI plugin to show more chat history. I can make the plugin.

SDGNelson commented 4 years ago

Definitely not easy. My plan is to abstract the IMGUI vs uGUI vs UIElements implementation so the existing UI code can remain relatively the same for now. Here is the issue if you want to subscribe for updates: #1234

SDGNelson commented 4 years ago

Happy to say the uGUI refactor is now on a beta branch! #2059