Closed MMitsuha closed 7 months ago
Can you try upgrading to the latest release (23.2) and see if that fixes anything?
3.21 isn't so old I'd expect any issues like this. There are three things I'd be curious to see:
1) the return value of SerializeToArray
. If this returns false it would explain the symptom, and means that the root cause it that message failed to serialize for some reason
2) the return value of ParseFromArray
for similar reasons
3) qwq.DebugString(), to see if there's anything else in there or if it's just empty
Thanks for your reply, the problem is parsing, I see protobuf did generated the correct buffer (I used a online parser and parsed the buffer which protobuf gave me and its output is correct), but when it comes to my protobuf, everything expect the string is okay, the string field (in std::string)'s pointer pointed to a wrong position (which is behind the string I wanted)
I would send these debug information ASAP.
It seems to be qt's fault
Before calling ParseFromString (Stack trace is at right buttom):
After calling ParseFromString:
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.
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.
What version of protobuf and what language are you using? Version: v3.21.12 etc. (NOTE: please try updating to the latest version of protoc/runtime possible beforehand to attempt to resolve your problem) Language: C++
What operating system (Linux, Windows, ...) and version? Windows 11 22H2
What runtime / compiler are you using (e.g., python version or gcc version) Microsoft Visual Studio 2022
What did you do? Here are my codes:
main.cpp:
message.proto:
What did you expect to see MessageBoxA outputs string: "qwq"
What did you see instead? No output from MessageBoxA
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
I am using vcpkg and the version of protobuf seemed a little bit old