Re: [protobuf] Re: FAIL: Structured exception occurred [Access Violation].

2023-05-17 Thread Harsh Ranjan
Looks like other folks faced similar issues with debug mode. https://github.com/protocolbuffers/protobuf/issues/6443 On Wednesday, May 17, 2023 at 11:25:26 PM UTC-7 Harsh Ranjan wrote: > The code is working fine in release mode but in debug mode it is > throwing Structured exception. Anyway by w

Re: [protobuf] Re: FAIL: Structured exception occurred [Access Violation].

2023-05-17 Thread Harsh Ranjan
The code is working fine in release mode but in debug mode it is throwing Structured exception. Anyway by which we can enable same library for both debug and release mode. On Wednesday, May 17, 2023 at 3:37:22 PM UTC-7 Harsh Ranjan wrote: > > Is there a way I can debug on my local machine where

Re: [protobuf] Re: FAIL: Structured exception occurred [Access Violation].

2023-05-17 Thread Harsh Ranjan
Is there a way I can debug on my local machine where protobufEventName is getting created? That is either stack/heap or arena? Based on the error it looks to me it is getting created in arena. at google::protobuf::Arena::CreateInternal [x64\debug\telemetry_serializersink\x-none\x64\inc\google

Re: [protobuf] Re: FAIL: Structured exception occurred [Access Violation].

2023-05-17 Thread 'Adam Cozzette' via Protocol Buffers
It's hard to know the answer to those questions without knowing how protobufEventName was created. If it was allocated on the stack then it will be automatically destroyed once it goes out of scope, but if it was allocated on the heap then you may need to explicitly delete it. If it was allocated o

Re: [protobuf] Re: FAIL: Structured exception occurred [Access Violation].

2023-05-17 Thread Harsh Ranjan
Do we need to explicitly destroy them? I am calling google::protobuf::ShutdownProtobufLibrary() at then end but this error pops up before this. Should I try to get rid of pointers and work with copy? On Wednesday, May 17, 2023 at 2:48:42 PM UTC-7 Adam Cozzette wrote: > The code you have poste

Re: [protobuf] Re: FAIL: Structured exception occurred [Access Violation].

2023-05-17 Thread 'Adam Cozzette' via Protocol Buffers
The code you have posted looks fine as far as I can tell, so if there is a memory leak then I think the problem is elsewhere. I suspect that the TelemetryProtobuf::EventName proto passed to PopulateEventName() is not getting destroyed. Or if you're using an arena, then the arena that proto was allo

[protobuf] Re: FAIL: Structured exception occurred [Access Violation].

2023-05-17 Thread Harsh Ranjan
It is cpp code. I initially thought the issue is NULL pointers but then I replaced all the fields with hardcoded constant values and I still got the same issue. On Wednesday, May 17, 2023 at 12:41:37 PM UTC-7 Harsh Ranjan wrote: > Hey Team, > > I have been trying to add unit-test for my protob

[protobuf] FAIL: Structured exception occurred [Access Violation].

2023-05-17 Thread Harsh Ranjan
Hey Team, I have been trying to add unit-test for my protobuf class. Attaching the full error as pdf. [3 / 3] Leaked 72 bytes allocated at 02E2A001AAC0 at Mso::Memory::AllocateEx [liblet\debugheap\memoryapiimpl\memoryapi.cpp(19)] at Mso::Memory::Throw::AllocateEx [x64\debug\lible

[protobuf] Protocol Buffers Version 23.1 is Released!

2023-05-17 Thread 'habe...@google.com' via Protocol Buffers
This version includes the following non-breaking changes: *C++* - Add a workaround for GCC constexpr bug (67ecdde ) *Csharp* - [C#] Replace regex that validates descriptor names (#12174