thank u for your answer,I am sure that here is no difference between the error case and the correct one,the apk was only build once ,and it is reported only once that is the same code ,sometimes work and sometimes not ,I will try what u suggest,thank u again.
在2024年10月9日星期三 UTC+8 23:09:04<[email protected]> 写道: > It sounds like something has corrupted the generated code - perhaps a > profanity filter that might have detected "rude" words embedded within > base64 and modified them? > > It seems unlikely that the generator has a bug here - even a one in a > thousand corner case would have been seen many, many times by now. > If you're able to reproduce this in a minimal .proto file that contains no > intellectual property, including that on the group would be fine. > > If you aren't able to reproduce it like that, I would suggest trying to > find a proto that reproduces the problem, and run protoc on multiple > machines - do you end up with it sometimes working and sometimes not? Can > you compare working and not working code? > > On Wednesday, October 9, 2024 at 8:40:10 AM UTC+1 欧阳兴旺 wrote: > >> sry my English is not that good,here is the problem >> language:C# protobuf26.x >> private void OnXXXChange(Logic.Protocol.XXX.XXXMsg msg) >> { >> XLog.ILog(TAG, $"Recieve OnxxxxChange:{msg}"); >> } >> >> the stacktrace >> System.TypeInitializationException: The type initializer for >> 'Logic.Protocol.Hvac.HvacMsgReflection' threw an exception. ---> >> System.FormatException: The input is not a valid Base-64 string as it >> contains a non-base 64 character, more than two padding characters, or an >> illegal character among the padding characters. >> at System.Convert.FromBase64CharPtr (System.Char* inputPtr, System.Int32 >> inputLength) >> at Logic.Protocol.XXXX.XXXMsgReflection..cctor () >> at Logic.Protocol.XXXX.XXXX.get_Descriptor >> at Google.Protobuf.JsonFormatter.Format (Google.Protobuf.IMessage >> message, System.IO.TextWriter writer) >> at Google.Protobuf.JsonFormatter.Format (Google.Protobuf.IMessage message) >> >> How does it happen? >> I do`nt know,never seen it before.it was reported online,restart app >> donot solve,we can not keep the environment,and Restore Factory Settings it >> works well. >> >> >> >> >> -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/99a2f947-9874-40b5-9317-e9d835642293n%40googlegroups.com.
