View Issue Details

IDProjectCategoryView StatusLast Update
0002442NoesisGUIC# SDKpublic2022-12-01 20:44
Reporterladwhn3 Assigned Tojsantos  
PrioritynormalSeveritycrash 
Status assignedResolutionopen 
Product Version3.1.5 
Target Version3.1.7 
Summary0002442: Access violation in Noesis_RenderDeviceD3D12_Create
Description

When trying to use RenderContextD3D12 in HelloWorld C# sample, an Access violation exception is thrown in Noesis_RenderDeviceD3D12_Create.

Exception is not thrown and RenderContextD3D12 works fine when app's target framework is .NET 6.0 or 7.0. HelloWorld sample targets .NET Framework.

Exception is thrown when compiling with Native AOT in .NET 7.0. Stack trace in Noesis module looks exactly the same.

Child-SP RetAddr Call Site

00 0000003290df5ee0 00007ff95efbb1f9 Noesis!MouseWheelEventArgs_Delta_get+0x84c
01 0000003290df60b0 00007ff95efbd3fc Noesis!MouseEventArgs_RightButton_get+0x2529
02 0000003290dfe370 00007ff95efb92b3 Noesis!MouseEventArgs_RightButton_get+0x472c
03 0000003290dfe7a0 00007ff95efbf172 Noesis!MouseEventArgs_RightButton_get+0x5e3
04 0000003290dfe800 00007ff95ef43a05 Noesis!MouseWheelEventArgs_Delta_get+0x1072
05 0000003290dfe850 00007ff9f9385c96 Noesis!Noesis_RenderDeviceD3D12_Create+0x65
06 0000003290dfe8a0 00007ff9f937f97c 0x00007ff9f9385c96 07 0000003290dfe960 00007ff9f936523e Noesis_App_RenderContexts_D3D12_1606ca80000!NoesisApp.RenderContextD3D12.Init+0xec 08 0000003290dfe9c0 00007ff9f93644a3 Noesis_App_1606c900000!NoesisApp.Application.Start+0x5ce 09 0000003290dfeb40 00007ff9f9190b4f Noesis_App_1606c900000!NoesisApp.Application.Run+0x13 0a 0000003290dfeb90 00007ffa58696893 HelloWorld!HelloWorld.App.Main+0x6f [...\HelloWorld\C#\Projects\windows\App.cs @ 23] 0b 0000003290dfebe0 00007ffa586967b0 clr!CallDescrWorkerInternal+0x83 0c 0000003290dfec20 00007ffa58697050 clr!CallDescrWorkerWithHandler+0x4e 0d 0000003290dfec60 00007ffa588218c4 clr!MethodDescCallSite::CallTargetWorker+0xfa 0e 0000003290dfed60 00007ffa5882216f clr!RunMain+0x25f 0f 0000003290dfef40 00007ffa58822022 clr!Assembly::ExecuteMainMethod+0xb7 10 0000003290dff230 00007ffa58821968 clr!SystemDomain::ExecuteMainMethod+0x643 11 0000003290dff830 00007ffa588216c1 clr!ExecuteEXE+0x3f 12 0000003290dff8a0 00007ffa588222d4 clr!_CorExeMainInternal+0xb2 13 0000003290dff930 00007ffa59f38c01 clr!CorExeMain+0x14 14 0000003290dff970 00007ffa5b1eac42 mscoreei!CorExeMain+0x112 15 0000003290dff9d0 00007ffa75277034 MSCOREE!CorExeMain_Exported+0x72 16 0000003290dffa00 00007ffa75da26a1 KERNEL32!BaseThreadInitThunk+0x14 17 0000003290dffa30 00000000`00000000 ntdll!RtlUserThreadStart+0x21

PlatformAny

Activities

jsantos

jsantos

2022-10-17 12:17

manager   ~0008102

Thanks for reporting this. We haven't tried Native AOT Deployment yet.

Is this also happening with D3D11 ?

ladwhn3

ladwhn3

2022-10-17 13:47

reporter   ~0008103

Exception is thrown for Native AOT but also for .NET Framework (which HelloWorld sample targets, so the issue can be easily reproduced). Excuse my confusing syntax.

D3D11 does not have this issue.

sfernandez

sfernandez

2022-12-01 20:40

manager   ~0008182

Last edited: 2022-12-01 20:44

The callstack for the error is:

Noesis.dll!NoesisApp::D3D12RenderDevice::CreatePipelines(NoesisApp::D3D12RenderDevice::Program program, unsigned char shader_, const char label_, D3D12_GRAPHICS_PIPELINE_STATE_DESC & desc) Line 2036 C++
Noesis.dll!NoesisApp::D3D12RenderDevice::CreateShaders() Line 2200 C++
Noesis.dll!NoesisApp::D3D12RenderDevice::D3D12RenderDevice(ID3D12Device device, ID3D12Fence frameFence, DXGI_FORMAT colorFormat, DXGI_FORMAT stencilFormat, DXGI_SAMPLE_DESC sampleDesc, bool sRGB) Line 362 C++
Noesis.dll!NoesisApp::D3D12Factory::CreateDevice(ID3D12Device device, ID3D12Fence frameFence, DXGI_FORMAT colorFormat, DXGI_FORMAT stencilFormat, DXGI_SAMPLE_DESC sampleDesc, bool sRGB) Line 22 C++
Noesis.dll!Noesis_RenderDeviceD3D12_Create(void device, void frameFence, int colorFormat, int stencilFormat, int samples, bool sRGB) Line 175 C++


D3D12: Removing Device.
DXGI_ERROR_DEVICE_REMOVED (0x887a0005): The GPU instance has been suspended.
DXGI_ERROR_DRIVER_INTERNAL_ERROR (0x887A0020): The driver encountered a problem and was put into the device removed state.

The error occur when calling: mDevice->CreateGraphicsPipelineState(&desc, DX_ARGS(&program->pso[i]));

Issue History

Date Modified Username Field Change
2022-10-14 20:10 ladwhn3 New Issue
2022-10-14 20:10 ladwhn3 Tag Attached: D3D12
2022-10-17 12:17 jsantos Note Added: 0008102
2022-10-17 12:17 jsantos Assigned To => jsantos
2022-10-17 12:17 jsantos Status new => feedback
2022-10-17 12:17 jsantos Assigned To jsantos => sfernandez
2022-10-17 13:47 ladwhn3 Note Added: 0008103
2022-10-17 13:47 ladwhn3 Status feedback => assigned
2022-11-02 12:00 jsantos Target Version => 3.1.6
2022-11-07 17:13 sfernandez Target Version 3.1.6 => 3.1.7
2022-12-01 20:40 sfernandez Note Added: 0008182
2022-12-01 20:40 sfernandez Assigned To sfernandez => jsantos
2022-12-01 20:41 sfernandez Note Edited: 0008182
2022-12-01 20:44 sfernandez Note Edited: 0008182