Comments (5)
I took a look into it but couldn't reproduce that bug just with this file (and a few other shaders).
First: It is usual that the Shaders themselves (.frag, .vert) have the White Sheet whereas the .j3md's have the palette with the gear (Materials only have the palette).
What I could imagine is that some Exception happens when trying to process those files (.j3md's could be interpreted as Shader Nodes and it could try to find the referenced .frag/.vert's).
The Exception alone shouldn't lead to a lockup but an Exception could lead to a Stack Overflow for example (For this, try to set the Logging Level to FINE. You can do that by clicking on that monkey with that blueish something or even better: Compile the SDK from Source and Launch it in Netbeans.
It will capture all output (even made to STDOUT instead of the Logger))
from sdk.
I changed the logging level to fine, but nothing prints out in the output window when the lockup occurs. It seems to lockup before anything has a chance to respond. Hopefully you can reproduce it with more files:
SimpleLight.j3md:
MaterialDef SimpleLight {
MaterialParameters {
Vector2 Alpha
Texture2D Texture
Texture2D NoiseTexture
Color Color (Color)
// For VR instancing
Matrix4 RightEyeViewProjectionMatrix
}
Technique PreNormalPass15 {
VertexShader GLSL150 : jmevr/shaders/normal.vert
FragmentShader GLSL150 : jmevr/shaders/normal.frag
WorldParameters {
ViewProjectionMatrix // needed for VR instancing
WorldViewProjectionMatrix
WorldViewMatrix
NormalMatrix
ViewMatrix
}
Defines {
INSTANCING : RightEyeViewProjectionMatrix // For VR instancing
NUM_BONES : NumberOfBones
}
}
Technique PreNormalPass {
VertexShader GLSL100 : jmevr/shaders/normal.vert
FragmentShader GLSL100 : jmevr/shaders/normal.frag
WorldParameters {
ViewProjectionMatrix // needed for VR instancing
WorldViewProjectionMatrix
WorldViewMatrix
NormalMatrix
ViewMatrix
}
Defines {
INSTANCING : RightEyeViewProjectionMatrix // For VR instancing
NUM_BONES : NumberOfBones
}
}
Technique {
VertexShader GLSL150: Shaders/SimpleLight.vert
FragmentShader GLSL150: Shaders/SimpleLight.frag
WorldParameters {
ViewProjectionMatrix // needed for VR instancing
WorldViewProjectionMatrix
WorldMatrixInverseTranspose
}
Defines {
INSTANCING : RightEyeViewProjectionMatrix // For VR instancing
HAS_NOISETEXTURE : NoiseTexture
HAS_ALPHA : Alpha
HAS_TEXTURE : Texture
HAS_COLOR : Color
}
}
Technique {
VertexShader GLSL100: Shaders/SimpleLight.vert
FragmentShader GLSL100: Shaders/SimpleLight.frag
WorldParameters {
ViewProjectionMatrix // needed for VR instancing
WorldViewProjectionMatrix
WorldMatrixInverseTranspose
}
Defines {
INSTANCING : RightEyeViewProjectionMatrix // For VR instancing
HAS_NOISETEXTURE : NoiseTexture
HAS_ALPHA : Alpha
HAS_TEXTURE : Texture
HAS_COLOR : Color
}
}
}
SimpleLight.vert:
#define VERTEX_SHADER
#import "Common/ShaderLib/GLSLCompat.glsllib"
// import the following for VR instancing
#import "jmevr/shaders/InstanceVR.glsllib"
uniform mat3 g_WorldMatrixInverseTranspose;
attribute vec3 inPosition;
attribute vec3 inNormal;
varying vec3 vNormal;
varying float zdist;
#if defined(HAS_TEXTURE) || defined(HAS_NOISETEXTURE)
attribute vec2 inTexCoord;
varying vec2 texCoord1;
#endif
void main(){
vec4 position = vec4(inPosition, 1.0);
gl_Position = TransformWorldViewProjectionVR(position);
vNormal = normalize(g_WorldMatrixInverseTranspose * inNormal);
zdist = gl_Position.z;
#if defined(HAS_TEXTURE) || defined(HAS_NOISETEXTURE)
texCoord1 = inTexCoord;
#endif
}
from sdk.
You could try with Java mission Controll or any other tool thaqt can display the current thread stacks to connect.
Then use application till lockup and look at all Thread stacks if you see something interesting. (Eg like somethingImageGenerate() wait() maybee this should help to narrow down what classes are responsible.
from sdk.
Thread monitor:
http://i.imgur.com/eZY7oLx.png
When the highlighted thread turns red is when the lockup happens. AWT-EventQueue-0 seems to go to "Wait" at the same time indefinitely -- probably explains why the GUI just becomes unresponsive.
Thread dump BEFORE the lockup:
Thread dumps AFTER the lockup:
http://pastebin.com/ffkxxd0D
http://pastebin.com/4Rtj5qng
from sdk.
Okay, so my findings so far are:
We're currently experiencing a deadlock situation between the AWTTreeLock
and the DataObjectPool
for some reason.
In Line 330 the AWT-EventQueue-0
locks the AWTTreeLock
. This is expected.
In Line 239 it also gets hold of a loaders.DataObjectPool
. This is also okay, someone simply wants information about the .j3md and waits for the current Pool Request to finish.
The Thread "DataSystemNodes" in Line 87 is the Problem though.
It locks the DataObjectPool by Processing a Request. This Request is faulty since it tries to create a JPanel without being enqueued in the AWT Thread. This leads to the acquiration of the AWTTreeLock which isn't available ofcourse (though it would if we were the AWT Thread).
Now there are two sights on this: Usually the Creation of a Panel happens from inside the AWT Thread (just checked that: If I place a breakpoint into the Panel's Constructor, it is in AWT Thread) and hence the Invokation of new JPanel() is completely legit. I have to check but I guess this is even what the Netbeans Sample Code does.
The Solution here would be to find the faulty request and change it to be in the AWT Thread instead.
The other sight is, that these requests happen wherever you try to get some information about a file.
In that case you wouldn't expect something AWT related to happen.
The Solution here would be to simply place that Constructor in the AWT Thread and make the other code NPE safe.
Now I am uncertain in what would be the best solution?
BTW: That AWT Stacktrace is the regular one: AssetNode#isFile seems to be the first thing called when a new node is displayed.
from sdk.
Related Issues (20)
- NPE when the VehicleWheel node is selected + broken SDK HOT 3
- AssetPackBrowser: index of packs is not available HOT 9
- Primitives menu: add Cylinder and CenterQuad HOT 1
- Error while deleting an AnimClip HOT 3
- VehicleCreator not receiving input
- Primitives menu: add WireBox, WireSphere and Torus HOT 2
- User Camera View: missing icons Front, Back, Left, Right, Top, Bottom HOT 1
- Add FBX loader HOT 1
- NPE when adding CharacterControl to the Spatial HOT 2
- JmeVehicleWheel: wrong Sheet.Set name HOT 5
- MaterialEditor: MorphWeights - wrong parameter type. HOT 1
- Use Adoptium API to always get the latest JDK
- MaterialEditor: Duplicate Items in the MatDefs Selection Dropdown Menu. HOT 3
- MaterialEditor: unable to edit the name of the Material HOT 2
- Design and implement components to edit material values (vectors etc) HOT 5
- MaterialEditor: PBR Light toggle button doesn't work HOT 1
- Duplicate Common Materials file in scene dropdown menu HOT 3
- Upgrade to Netbeans 22
- Add module exception to allow viewing Javadoc in the SDK
- Migrate from NBI to nbpackage HOT 2
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 sdk.