protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

Error in while debugging in xutility

Open MattyGroGy opened this issue 6 years ago • 6 comments

When i compile my code everything is fine, but after that when i try to create message i get error in xutility here: picture

this is my proto: picture

this is code for message: (blue arrow is where is when error) picture

MattyGroGy avatar Jan 29 '19 10:01 MattyGroGy

What kind of error message are you getting?

acozzette avatar Jan 29 '19 17:01 acozzette

During boot im doing initialization of my networking manager async (using std async), then when i click on button i call function that makes my message, exact error is 0x00B42F32 in -projectname- 0xC0000005, write access violation (I have my visual studio in czech but i can send you exact photo)

MattyGroGy avatar Jan 29 '19 18:01 MattyGroGy

OK, it's hard to say based on that kind of error message but I am guessing that the problem is not related to protocol buffers. My guess is that game->inputReader->wstringToString(pwd).c_str() is returning NULL or an invalid pointer, or perhaps the crash is occurring before msg.set_mail(...) even begins executing. You might want to try logging that string and seeing if it appears to be valid.

acozzette avatar Jan 29 '19 19:01 acozzette

I just used some breakpoints and game->inputReader->wstringToString(pwd) is returning valid string, error happens when msg.set_mail(...) is executed

MattyGroGy avatar Jan 29 '19 19:01 MattyGroGy

@MattyGroGy The code looks OK so it's kind of hard to tell what the problem is. If you could post a reproducible example then that would help. By the way, what does wstringToString(pwd) return? If it's a std::string then you could set that directly, but if it's something other than a std::string, I wonder if perhaps c_str() is returning a string that's not NULL-terminated and which would therefore be problematic. That is just a guess, though.

acozzette avatar Jan 31 '19 05:01 acozzette

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

github-actions[bot] avatar May 05 '24 10:05 github-actions[bot]

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.

This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.

github-actions[bot] avatar May 20 '24 10:05 github-actions[bot]