I have discovered that the function USteamFriends::GetFriendMessage seems to always crash. After some poking around I figured out that changing the uses of MAX_int32 to a much smaller number fixes this crash.
It seems to me that it should not have been trying to allocate an array of that size anyway.
This is the relevant lines from your version:
TmpMessage.SetNum(MAX_int32);
int32 res = SteamFriends()->GetFriendMessage(SteamIDFriend, MessageIndex, TmpMessage.GetData(), MAX_int32, &TmpEntryType);
But before I make a pull request about this, I was wondering if you have a better number to use. I used 2048 in my local repo and that worked fine. (I actually tested by messaging a steam friend in an in-game chat window and displayed their messages back.)
If there is a defined max length to messages that steam allows that would be ideal.
I have discovered that the function USteamFriends::GetFriendMessage seems to always crash. After some poking around I figured out that changing the uses of MAX_int32 to a much smaller number fixes this crash. It seems to me that it should not have been trying to allocate an array of that size anyway. This is the relevant lines from your version:
And this is after my change:
But before I make a pull request about this, I was wondering if you have a better number to use. I used 2048 in my local repo and that worked fine. (I actually tested by messaging a steam friend in an in-game chat window and displayed their messages back.) If there is a defined max length to messages that steam allows that would be ideal.