Comments (10)
Are you by any chance on non-x86_64 architecture?
from skija.
x64 but win7 (!), netbeans 12.5, java17, Semeru IBM Runtimes (openj9), could it be win7 OS related? is there any internal dependency that needs something newer like maybe directX12 or something?
from skija.
We do link with DX12, I believe. Not sure if it matters if you are only using OpenGL backend, but problem here seems to happen way earlier, when library is loaded.
We build on Windows 10, too, maybe this is the reason?
from skija.
I see, unfortunately I cannot test it in an other system at the moment, I will report back if it will happen.
dll info shows:
OPENGL32.dll
wglGetProcAddress
Ordinal: 0x0163
Address: 0x008DEE08
Delayed: NO
wglGetCurrentContext
Ordinal: 0x015E
Address: 0x008DEDF0
Delayed: NO
d3d12.dll
D3D12SerializeRootSignature
Ordinal: 0x000E
Address: 0x008DF132
Delayed: NO
D3DCOMPILER_47.dll
D3DCompile
Ordinal: 0x0001
Address: 0x008DF15A
Delayed: NO
....USER32.dll, KERNEL32.dll
Not sure if this is the case either. I would expect a more informative error, not this simple "Can't load".
I guess it is deeper, an idea would be to recompile skija.dll without d3d12 (openGL only) or compile against d3d11 if applicable. I am not familiar with the needed C++ dev environment.
So lets forget it at the moment, but if you are by chance interested and it is relatively easy for you to make a special dll, I could test it and report my results. We keep in mind that many older GPUs only support dx11, and win7 only supports dx11 natively. Only special games with the related drivers and new GPUs can load dx12 from win7. But we still do not know if this is the case.
https://devblogs.microsoft.com/directx/porting-directx-12-games-to-windows-7/
from skija.
The message from an alternative jvm. Now it is "Can't find dependent libraries"
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: C:\Users\...\AppData\Local\Temp\skija_0.100.0\skija.dll: Can't find dependent libraries
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at io.github.humbleui.skija.impl.Library.load(Library.java:73)
at io.github.humbleui.skija.impl.Library.staticLoad(Library.java:47)
at io.github.humbleui.skija.Surface.<clinit>(Surface.java:10)
from skija.
https://skia.org/docs/user/special/angle/
https://groups.google.com/g/skia-discuss/c/TGBzojV7Ygs/m/TDWDgOZPCQAJ?utm_medium=email&utm_source=footer
I guess there could be a build for older GPUs based on dx11
from skija.
update: The project https://github.com/micycle1/processing-skia loads its bundled skija dll OK, the version for windows linked at the releases page here: https://github.com/micycle1/processing-skia/releases/ the bundled version is 0.90 a version with a time stamp 20/4/2021 1:44:34
The dlls if switched we get different error
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: 'void io.github.humbleui.skija.impl.Library._nAfterLoad()'
at io.github.humbleui.skija.impl.Library._nAfterLoad(Native Method)
at io.github.humbleui.skija.impl.Library.load(Library.java:108)
at io.github.humbleui.skija.impl.Library.staticLoad(Library.java:47)
at io.github.humbleui.skija.Surface.<clinit>(Surface.java:10)
The old dll does not import the D3D 12 dependency and loads OK. So as far as I can test those dependencies are the problem. It will be very useful if there could be a dll release based on open OpenGL only in order to prevent this incompatibility with GPUs/hardware that do not support D3D 12. OpenGL seems compatible with more systems.
So we could change this as a Feature Request.
from skija.
Just replacing Skia DLL won’t work, Skija adds a translation layer (which is also in C++) to it.
I’d like to help you out but honestly Windows 7 is quite a low priority right now. Microsoft stopped supporting it 7 years ago. We don’t have infinite resources, and have to focus our effort on what benefits the most people.
Projecting into the future, needing a separate Windows 7 machine just to test this could also become a problem.
My suggestion is that you build Skia and Skija yourself. It shouldn’t be that hard, start by trying to turn off this flag https://github.com/HumbleUI/SkiaBuild/blob/37a6b6018a5a94ce8e118e09d2f4f7adbb06a4c3/script/build.py#L61
from skija.
Note that it is possible to use DirectX12 on Windows 7 but it does not come with the operating system by default. https://github.com/microsoft/DirectX-Graphics-Samples/tree/develop/Samples/Desktop/D3D12On7
Not sure if this requires linking separately or if the distributed binaries just work.
from skija.
After upgrading to windows10 from 7 have realized that the restriction is not only the OS but the hardware also.
If your hardware doesn't support dx12, there is no way to use skija.
I am not sure about the requirements for openGL, but if an automated new "windows dll" build could be managed in the github action system with Direct3d disabled could be a useful addition. At least we could build here if possible, just a test dll for openGL only hardware..
I have tried to build it locally without success. If someone knows how to do this, that would be awesome.
Testing 0.109 with skijaGraphics2D graphics2d-tester actually works
and produces the test image, a guess is that the dll takes place on drawing pixels on screen (canvas in skia?), and the skijaGraphics2D parser at the end does not need dll to work by design, final objects are being translated to Graphics2D.
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd4d47cbd0, pid=17668, tid=16644
...
... log
--------------- T H R E A D ---------------
Current thread (0x00000206ed422160): JavaThread "main" [_thread_in_vm, id=16644, stack(0x0000003a3ab00000,0x0000003a3ac00000)]
Stack: [0x0000003a3ab00000,0x0000003a3ac00000], sp=0x0000003a3abfe288, free space=1016k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x1cbd0]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j io.github.humbleui.skija.impl.Library._nAfterLoad()V+0
j io.github.humbleui.skija.impl.Library.load()V+285
j io.github.humbleui.skija.impl.Library.staticLoad()V+19
j io.github.humbleui.skija.Surface.<clinit>()V+16
v ~StubRoutines::call_stub
j com.jan.skija.SkijaTestingWiki.<init>()V+16
j com.jan.skija.SkijaTestingWiki.main([Ljava/lang/String;)V+19
v ~StubRoutines::call_stub
siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), reading address 0x0000000000000000
Register to memory mapping:
RIP=0x00007ffd4d47cbd0 jvm.dll
RAX=0x0000000800456798 is pointing into metadata
RBX=0x0000000800453c08 is pointing into metadata
RCX=0x0 is NULL
RDX=0x00007ff574462c9e is an unknown value
RSP=0x0000003a3abfe288 is pointing into the stack for thread: 0x00000206ed422160
RBP=0x00007ffd748b943c skija.dll
RSI=0x0 is NULL
RDI=0x0000000800456798 is pointing into metadata
R8 =0x0 is NULL
R9 =0x0000000000000005 is an unknown value
R10=0x0 is NULL
R11=0x0000003a3abfe258 is pointing into the stack for thread: 0x00000206ed422160
R12=0x00007ffd748b9444 skija.dll
R13=0x00000206ed422160 is a thread
R14=0x00007ffd748b943c skija.dll
R15=0x0 is NULL
...
from skija.
Related Issues (20)
- LWJGL, JRE Exception: Access Violation @ DirectContext.makeGL HOT 2
- Rect size limit? HOT 2
- Typeface._nMakeFromName returns null on linux HOT 5
- Text Style Scene in examples crashed on linux because of AssertionError HOT 3
- The performance monitor of Text Shape Bench example is abnormal on Linux HOT 1
- Force no antialiasing when painting / set texture filter quality? HOT 4
- Starting two Skija-using applications at the same time may segfault HOT 3
- [Question] Multiple windows with a shared DirectContext? HOT 9
- skija.dll fails to load (windows 10 pro / directx12 ) HOT 11
- Some path effects causing shader compilation errors on macOS HOT 2
- how to get a canvas from Image or Bitmap HOT 3
- Fat/uber Jar doesn't work because of the multi-release feature HOT 2
- Java 8 doesn't work HOT 4
- Memory Leak: Runtime Effect + Runtime generated Images HOT 2
- How to update shader uniforms? HOT 1
- How do we add Metal Kit Device to the surface and render HOT 3
- Canvas not marked as closed when its parent Surface is collected HOT 3
- Create an image from backend texture handle HOT 1
- Doesn't seem to be any way to use LCD font rendering? HOT 9
- JVM CRASHED while Skija initializing on jdk 1.8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skija.