Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Problems and Crash with DriftFXSurface(Crash of DriftFXSurface due to the driftfx.dll)
Problems and Crash with DriftFXSurface [message #1827848] Mon, 25 May 2020 14:08 Go to next message
Marco Maisano is currently offline Marco MaisanoFriend
Messages: 22
Registered: March 2020
Junior Member
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 #1827888 is a reply to message #1827848] Tue, 26 May 2020 11:31 Go to previous messageGo to next message
Christoph Caks is currently offline Christoph CaksFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Marco,

A third surface should not break it.

[C] [ERROR] WGLGLContext.cpp:191 - driftfx::internal::gl::wgl::WGLGLContext::createGL Windows Error 0x5 (HGLRC hTempContext = wglCreateContext(hDC);)
Message: Access is denied.


This tells us that we got no opengl context. I assume the 3rd surface got no context. This may be the root cause of the crash, but it could also be something that happend before - There may be more drift messages on stderr.
As to why your wgl api declined creating an opengl context - i have no idea -.-


here are some questions:

  • Does the main memory mode work for you?
  • Are you able to always reproduce this when displaying the 3rd surface?
  • The with drift included sample only features 2 surfaces. if you modify it to 3 does it also crash for you?
  • Have you / can you reproduce it on different hardware?


Also note that the nv_dx_interop mode has issues on some driver/hardware combinations.




Re: Problems and Crash with DriftFXSurface [message #1827901 is a reply to message #1827888] Tue, 26 May 2020 14:40 Go to previous messageGo to next message
Marco Maisano is currently offline Marco MaisanoFriend
Messages: 22
Registered: March 2020
Junior Member
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 #1827953 is a reply to message #1827901] Wed, 27 May 2020 13:54 Go to previous messageGo to next message
Christoph Caks is currently offline Christoph CaksFriend
Messages: 10
Registered: July 2009
Junior Member
Are you talking about your own textures or the drift textures? What is the "texture layer"?

drift gives you an opengl texture by calling acquire, you can draw onto that whatever you want and give it back to drift by calling present.
This drift texture id is only valid for you between the acquire and the present call - if you access it outside of this scope anything could happen.
the size of this texture is determined on calling acquire, you can specifiy the size you want and also ask the surface what size it currently has.

Using your own textures while drawing onto the drift texture should not affect anything at all. and the sizes of your own textures should also not affect anthing at all.
Re: Problems and Crash with DriftFXSurface [message #1828269 is a reply to message #1827953] Fri, 05 June 2020 09:32 Go to previous messageGo to next message
Marco Maisano is currently offline Marco MaisanoFriend
Messages: 22
Registered: March 2020
Junior Member
Hi,
following your suggestions I reordered all my code structure and I resolved the texture issue. I was mixing in a bad way my own texture ids, but now the application works as expected.

In my RCP application I am able to open several Parts containing different DriftFXSurfaces displaying their own textures.

There is just one remaining issue: if the application runs in Main Memory mode I have no problems, but if it runs in NV_DX_Interop Mode, it crashes after 2/3 hours.

I put the native crash log in attachment.
Do you have some suggestions about this?

Thanks for all the support.
Re: Problems and Crash with DriftFXSurface [message #1828585 is a reply to message #1828269] Sat, 13 June 2020 14:54 Go to previous message
Christoph Caks is currently offline Christoph CaksFriend
Messages: 10
Registered: July 2009
Junior Member
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.
Previous Topic: java.lang.IllegalArgumentException: module javafx.graphics not in layer
Next Topic:Java 11 + Tycho-Surefire + bundled OpenJFX11
Goto Forum:
  


Current Time: Fri Apr 19 14:09:21 GMT 2024

Powered by FUDForum. Page generated in 0.02051 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top