flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Access violation reading location 0xFFFFFFFFFFFFFFFF

Open heimao63531 opened this issue 5 years ago • 1 comments

Hi flatbuffer team,

i want to use flatbuffers in windows 10 (x64). currently i debug the code with visual studio (c++) and it failed with

Exception thrown at 0x00007FF689C49942 in client.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. at void WriteScalar(void *p, T t) { *reinterpret_cast<T *>(p) = EndianScalar(t); }

Here is my code. i have no idea of which parameter is illegal, flatbuffers::FlatBufferBuilder build_data; std::vector<uint32_t> capVector; for (int i = 0; i < VD_AGENT_CAPS_SIZE; i++) { capVector.push_back(cap->caps[i]); } flatbuffers::Offset<flatbuffers::Vector<uint32_t>> capVector_fb = build_data.CreateVector(capVector);

auto capOfSet = proto::CreateCapabilities(build_data, cap->request, capVector_fb) <---- failed here

heimao63531 avatar Nov 12 '21 07:11 heimao63531

We will need more info. Can you share the schema, the value of VD_AGENT_CAP_SIZE, and the rest of the code?

dbaileychess avatar Nov 12 '21 20:11 dbaileychess