Problems and Crash with DriftFXSurface [message #1827848] |
Mon, 25 May 2020 10:08  |
Eclipse User |
|
|
|
Hi Tom,
I am developing an e4 RCP application which allows to open many Parts containing a DriftFXSurface; each Part has its own Trimmed Window.
I am using Windows 10 64 bit, an NVIDIA Quadro K2000 and the NVDXInterop Transfer Mode for the surfaces.
Everything seems to work fine when I have one or two Parts, but when I try to open the third, the application crashes with the following error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007fffab4d2101, pid=15240, tid=0x0000000000004b6c
#
# JRE version: Java(TM) SE Runtime Environment (8.0_162-b12) (build 1.8.0_162-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.162-b12 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C 0x00007fffab4d2101
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Usa\ECLIPSE\eclipse-rcp-2020-03\hs_err_pid15240.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
[C] [ERROR] WGLGLContext.cpp:191 - driftfx::internal::gl::wgl::WGLGLContext::createGL Windows Error 0x5 (HGLRC hTempContext = wglCreateContext(hDC);)
Message: Access is denied.
[C] [ERROR] D3D9Texture.cpp: 41 - driftfx::internal::win32::D3D9Texture::D3D9Texture D3DERR_INVALIDCALL
[C] [ERROR] D3D9Texture.cpp: 48 - driftfx::internal::win32::D3D9Texture::D3D9Texture Unknown DirectX Error; Got no texture
You can find the error report file in the attachment.
I have also experimented a similar crash happening when my application runs for several hours (about ten/twelve).
Do you have any suggestion about what could be the cause of this issue? How to resolve it?
|
|
|
|
Re: Problems and Crash with DriftFXSurface [message #1827901 is a reply to message #1827888] |
Tue, 26 May 2020 10:40   |
Eclipse User |
|
|
|
With the main memory mode I experimented the same behaviour, also on another PC with the NvIDIA GeForce 1060.
Anyway, the drift samples seem to work fine with 3 surfaces, so I think maybe the issue is related to something I am doing wrong.
In my JavaFX e4 RCP application, I have to display a different quad texture on each opened Part containing a DriftFXSurface. Since the Parts can be resized, textures have to be created and deleted to fit the corresponding DriftFXSurface pixel dimensions.
I tried to disable the textures, and I have seen that I can open many Parts/DriftFXSurfaces without problems; but when I have the texture layer enabled, the issue rises. I verified that the crash happens not only when I open the third surface, but also if I resize the second one after having opened it. With only one surface everything works fine, so I think the problem is related to the creation/deletion of textures at runtime when I have more than one surface/GLContext.
According to you, which is the correct strategy for creating, updating and deleting textures at runtime with multiple DriftFXSurfaces?
Following the error logs I obtained resizing the second surface with texture layer enabled for both NV_DX_Interop Mode and Main Memory Mode:
NV_DX_Interop Mode
[C] [ERROR] WGLGLContext.cpp:191 - driftfx::internal::gl::wgl::WGLGLContext::createGL Windows Error 0x5 (HGLRC hTempContext = wglCreateContext(hDC);)
Message: Access is denied.
[C] [ INFO] WGLGLContext.cpp:268 - driftfx::internal::gl::wgl::WGLGLContext::createGL Created OpenGL Context 0000000000010001: 4.1.0 NVIDIA 442.92 ( shared: 0000000000000000 )
[C] [ INFO] WGLGLContext.cpp:268 - driftfx::internal::gl::wgl::WGLGLContext::createGL Created OpenGL Context 0000000000010002: 4.1.0 NVIDIA 442.92 ( shared: 0000000000010001 )
[C] [ INFO] WGLGLContext.cpp:268 - driftfx::internal::gl::wgl::WGLGLContext::createGL Created OpenGL Context 0000000000010003: 4.1.0 NVIDIA 442.92 ( shared: 0000000000010001 )
[C] [ INFO] WGLGLContext.cpp:268 - driftfx::internal::gl::wgl::WGLGLContext::createGL Created OpenGL Context 0000000000010004: 4.1.0 NVIDIA 442.92 ( shared: 0000000000010001 )
[C] [ERROR] GLTexture.cpp: 52 - glDeleteTextures(1, &textureName) GL Error occurred! GL_INVALID_OPERATION:
GL call: glDeleteTextures(1, &textureName)
Location: C:\DriftFX-native\DriftFX\src\gl\GLTexture.cpp;52
Function: driftfx::gl::GLTexture::~GLTexture
Main Memory Mode
[C] [ERROR] WGLGLContext.cpp:191 - driftfx::internal::gl::wgl::WGLGLContext::createGL Windows Error 0x5 (HGLRC hTempContext = wglCreateContext(hDC);)
Message: Access is denied.
[C] [ INFO] WGLGLContext.cpp:268 - driftfx::internal::gl::wgl::WGLGLContext::createGL Created OpenGL Context 0000000000010001: 4.1.0 NVIDIA 442.92 ( shared: 0000000000000000 )
[C] [ INFO] WGLGLContext.cpp:268 - driftfx::internal::gl::wgl::WGLGLContext::createGL Created OpenGL Context 0000000000010002: 4.1.0 NVIDIA 442.92 ( shared: 0000000000010001 )
[C] [ INFO] WGLGLContext.cpp:268 - driftfx::internal::gl::wgl::WGLGLContext::createGL Created OpenGL Context 0000000000010003: 4.1.0 NVIDIA 442.92 ( shared: 0000000000010001 )
[C] [ INFO] WGLGLContext.cpp:268 - driftfx::internal::gl::wgl::WGLGLContext::createGL Created OpenGL Context 0000000000010004: 4.1.0 NVIDIA 442.92 ( shared: 0000000000010001 )
[C] [ERROR] SharedTexture.cpp: 47 - frameReady = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0) GL Error occurred! GL_INVALID_OPERATION:
GL call: frameReady = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0)
Location: C:\DriftFX-native\DriftFX\src\SharedTexture.cpp;47
Function: driftfx::internal::SharedTexture::SignalFrameReady
|
|
|
|
|
Re: Problems and Crash with DriftFXSurface [message #1828585 is a reply to message #1828269] |
Sat, 13 June 2020 10:54  |
Eclipse User |
|
|
|
Hi Marco,
The nv_dx_interop crashes you are describing now are kind of a known issue -.-
It seems that some of the nv_dx_interop implementations dont like heavy allocations - and the current drift allocates new resources for each frame.
I hope they will go away with the next drift release. It will use a swap chain approach where resource allocations only happen on swap chain creation.
|
|
|
Powered by
FUDForum. Page generated in 0.19625 seconds