View Issue Details

IDProjectCategoryView StatusLast Update
0002924NoesisGUIC++ SDKpublic2023-12-11 17:32
ReporterAnKor Assigned Tojsantos  
PrioritynormalSeveritymajor 
Status resolvedResolutionfixed 
Product Version3.2.2 
Target Version3.2.3Fixed in Version3.2.3 
Summary0002924: Read access violation in D3D12RenderDevice::UploadUniforms
Description

I'm not 100% sure it is a Noesis bug, but it looks very suspicious.
Recently I catched a couple of "read access violation" crashes during memcpy part of D3D12RenderDevice::UploadUniforms

        uint32_t size = Align(data.numDwords * sizeof(uint32_t), 256);
        void* ptr = MapBuffer(mConstants[i], size);
        memcpy(ptr, data.values, size);

I didn't save exact values, but I can definitely say:

  • data->numDwords was 7;
  • data->values was not null, but seemingly a valid value;
  • access violation happened at 4096 byte boundary (last digits were 000 in hex);
  • the difference between the faulted address and data.values was exactly 240 bytes.

I can try to get more data when it happens next time, but it is very rare.
So far it just looks like memcpy reading beyond the input buffer. Shouldn't it be copying "numDwords * 4" instead of "size" bytes?

PlatformAny

Activities

jsantos

jsantos

2023-12-08 10:30

manager   ~0009002

You are right, we should be copying only "numDwords * 4" bytes. The code is not correct.

Could you please apply the change and let me know if this fixes your crash?

Thank you!

AnKor

AnKor

2023-12-08 11:25

reporter   ~0009003

I've applied the change and so far all is good, but the crash was very rare anyway.
Thanks for confirming.

Issue History

Date Modified Username Field Change
2023-12-07 19:24 AnKor New Issue
2023-12-07 19:25 AnKor Description Updated
2023-12-08 10:28 jsantos Assigned To => jsantos
2023-12-08 10:28 jsantos Status new => assigned
2023-12-08 10:28 jsantos Target Version => 3.2.3
2023-12-08 10:30 jsantos Note Added: 0009002
2023-12-08 10:30 jsantos Status assigned => feedback
2023-12-08 11:25 AnKor Note Added: 0009003
2023-12-08 11:25 AnKor Status feedback => assigned
2023-12-11 17:32 jsantos Status assigned => resolved
2023-12-11 17:32 jsantos Resolution open => fixed
2023-12-11 17:32 jsantos Fixed in Version => 3.2.3