Engine v3.4.0 beta testing

New features and bug fixes: https://github.com/jMonkeyEngine/jmonkeyengine/releases/tag/v3.4.0-beta1

4 Likes

I’ve moved over to 3.4.0-beta1 as well. I’m Windows so doesn’t really help with your environment target list, but more eyes at least.

(I’ve removed my local fix for the LWJGL 3 framerate limiter bug and moved back to the JME framerate limiter and that bug is indeed fixed and working great)

3 Likes

i will move soon, but currently im on sideproject. need 1-2 weeks, hope testing will not end too quickly.

1 Like

I can guarantee at least 2 weeks of beta testing :wink:

2 Likes

Just rolled Outside Engine to the beta from alpha4.
The only code change was for Keyboard Mapping inconsistency between lwjgl2 and 3 · Issue #942 · jMonkeyEngine/jmonkeyengine (github.com)

This broke the jme-jfx11 library, which I put a hacky fix in place for. One of these days I will have to push out all my updates to it, as I have several bug fixes for it now.

Still testing, will report back what I find, but I imagine not much has changed from alpah4.

3 Likes

Initial testing with JMEControllerConfig works well. I’ll probably release an official build of it for jme3-3.4.0-beta1 in the next couple of days.

1 Like

I have updated all my projects on desktop, Android, PI4, no bugs so far till now…

But, i was testing the advanced vehicles on my laptop today after updating & there was a sudden crash after working fine for about 10-15 mins, with this feedback :

SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NullPointerException
	at com.jme3.renderer.opengl.GLRenderer.clearVertexAttribs(GLRenderer.java:2855)
	at com.jme3.renderer.opengl.GLRenderer.renderMeshDefault(GLRenderer.java:3188)
	at com.jme3.renderer.opengl.GLRenderer.renderMesh(GLRenderer.java:3219)
	at com.jme3.material.logic.DefaultTechniqueDefLogic.renderMeshFromGeometry(DefaultTechniqueDefLogic.java:72)
	at com.jme3.material.logic.SinglePassAndImageBasedLightingLogic.render(SinglePassAndImageBasedLightingLogic.java:268)
	at com.jme3.material.Technique.render(Technique.java:167)
	at com.jme3.material.Material.render(Material.java:1033)
	at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:634)
	at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:273)
	at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:318)
	at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:918)
	at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:799)
	at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1128)
	at com.jme3.renderer.RenderManager.render(RenderManager.java:1180)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:273)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:537)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:624)
	at com.jme3.system.lwjgl.LwjglWindow.create(LwjglWindow.java:473)
	at com.jme3.app.LegacyApplication.start(LegacyApplication.java:491)
	at com.jme3.app.LegacyApplication.start(LegacyApplication.java:443)
	at com.jme3.app.SimpleApplication.start(SimpleApplication.java:126)
	at com.jayfella.jme.vehicle.lemurdemo.MavDemo1.main(MavDemo1.java:226)

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Resource id in failed request:  0x4600056
  Serial number of failed request:  1652
  Current serial number in output stream:  1652

do you think, the problem is from my laptop ?

2 Likes

I glanced at the source, but I can’t tell what caused the NPE. Since it happened after 10-15 minutes, it may be difficult to reproduce.

Go ahead and open an issue at GitHub. Be sure to mention the JME and LWJGL version numbers, the platform type, and any other information you think might be relevant.

2 Likes

I now suspect this is caused by PR 1408. I’ve submitted a possible fix: PR 1527.

@RiccardoBlb please take a look.

1 Like

I see most VertexBuffers are handled in GLRenderer class against the nullptr, So this may be suspicious as well, :

I don’t know, may be it’s handled above here :

or even isn’t that vulnerable.

I can reproduce this error, after some time of doing multiple activities (multiple frame updates) at the same time after starting the Drive option, but unless that, the game continues normally.

1 Like

Does PR 1527 resolve the issue for you?

1 Like

I haven’t tried, but i think it would resolve it.

But, i think this may be better :

    if (buffer != null){ 
         if (buffer.isInstanced()) {
                glext.glVertexAttribDivisorARB(idx, 0);
            } 
        }

because, i don’t know what isInstanced() does.

I believe your version is exactly equivalent to mine.

&& is a short-circuit operand, so isInstanced() won’t be evaluated unless buffer != null.

1 Like

Yes, it fixes the error !

1 Like

I get this when enabling the Vehicle points in the debug menu : (first time to try it)

BTW, what does the vehicle points does ?, from the error, it’s apparent that it enables wireframe debugging for the car, isn’t it ?

Apr 20, 2021 6:44:51 PM com.jme3.renderer.opengl.GLRenderer updateShaderSourceData
WARNING: Bad compile of:
1	#version 110
2	#define SRGB 1
3	#define FRAGMENT_SHADER 1
4	#define MATERIAL_COLOR 1
5	#define POINT_SHAPE 1
6	/*
7	 Copyright (c) 2017, Stephen Gold
8	 All rights reserved.
9	
10	 Redistribution and use in source and binary forms, with or without
11	 modification, are permitted provided that the following conditions are met:
12	    * Redistributions of source code must retain the above copyright
13	      notice, this list of conditions and the following disclaimer.
14	    * Redistributions in binary form must reproduce the above copyright
15	      notice, this list of conditions and the following disclaimer in the
16	      documentation and/or other materials provided with the distribution.
17	    * Neither the name of the copyright holder nor the names of its contributors
18	      may be used to endorse or promote products derived from this software
19	      without specific prior written permission.
20	
21	 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22	 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23	 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24	 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25	 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26	 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27	 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28	 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29	 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30	 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31	 */
32	
33	/*
34	 * fragment shader used by multicolor2.j3md
35	 */
36	
37	// -- begin import Common/ShaderLib/GLSLCompat.glsllib --
38	#if defined GL_ES
39	#  define hfloat highp float
40	#  define hvec2  highp vec2
41	#  define hvec3  highp vec3
42	#  define hvec4  highp vec4
43	#  define lfloat lowp float
44	#  define lvec2 lowp vec2
45	#  define lvec3 lowp vec3
46	#  define lvec4 lowp vec4
47	#else
48	#  define hfloat float
49	#  define hvec2  vec2
50	#  define hvec3  vec3
51	#  define hvec4  vec4
52	#  define lfloat float
53	#  define lvec2  vec2
54	#  define lvec3  vec3
55	#  define lvec4  vec4
56	#endif
57	
58	#if __VERSION__ >= 130
59	#  ifdef GL_ES
60	out highp vec4 outFragColor;
61	#  else
62	out vec4 outFragColor;
63	#endif
64	#  define texture1D texture
65	#  define texture2D texture
66	#  define texture3D texture
67	#  define textureCube texture
68	#  define texture2DLod textureLod
69	#  define textureCubeLod textureLod
70	#  define texture2DArray texture
71	#  if defined VERTEX_SHADER
72	#    define varying out
73	#    define attribute in
74	#  elif defined FRAGMENT_SHADER
75	#    define varying in
76	#    define gl_FragColor outFragColor
77	#  endif
78	#else
79	#  define isnan(val) !(val<0.0||val>0.0||val==0.0)
80	#endif
81	
82	#if __VERSION__ == 110
83	mat3 mat3_sub(mat4 m) {
84	  return mat3(m[0].xyz, m[1].xyz, m[2].xyz);
85	}
86	#else
87	 #define mat3_sub mat3
88	#endif
89	
90	#if __VERSION__ <= 140
91	float determinant(mat2 m) {
92	  return m[0][0] * m[1][1] - m[1][0] * m[0][1];
93	}
94	
95	float determinant(mat3 m) {
96	  return  + m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1])
97	          - m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0])
98	          + m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]);
99	}
100	#endif
101	
102	#if __VERSION__ <= 130
103	mat2 inverse(mat2 m) {
104	  return mat2(m[1][1], -m[0][1], -m[1][0], m[0][0]) / determinant(m);
105	}
106	
107	mat3 inverse(mat3 m) {
108	  return mat3(
109	    + (m[1][1] * m[2][2] - m[2][1] * m[1][2]),
110	    - (m[1][0] * m[2][2] - m[2][0] * m[1][2]),
111	    + (m[1][0] * m[2][1] - m[2][0] * m[1][1]),
112	    - (m[0][1] * m[2][2] - m[2][1] * m[0][2]),
113	    + (m[0][0] * m[2][2] - m[2][0] * m[0][2]),
114	    - (m[0][0] * m[2][1] - m[2][0] * m[0][1]),
115	    + (m[0][1] * m[1][2] - m[1][1] * m[0][2]),
116	    - (m[0][0] * m[1][2] - m[1][0] * m[0][2]),
117	    + (m[0][0] * m[1][1] - m[1][0] * m[0][1])) / determinant(m);
118	}
119	#endif
120	
121	// -- end import Common/ShaderLib/GLSLCompat.glsllib --
122	
123	#ifdef DISCARD_ALPHA
124	        uniform float m_AlphaDiscardThreshold;
125	#endif
126	#ifdef MATERIAL_COLOR
127	        uniform vec4 m_Color;
128	#endif
129	#ifdef POINT_SHAPE
130	        uniform sampler2D m_PointShape;
131	#endif
132	#ifdef VERTEX_COLOR
133	        varying vec4 vertexColor;
134	#endif
135	
136	void main(){
137	        #ifdef VERTEX_COLOR
138	                vec4 color = vertexColor;
139	        #else
140	                vec4 color = vec4(1.0);
141	        #endif
142	
143	        #if defined(DISCARD_ALPHA)
144	                if(color.a < m_AlphaDiscardThreshold){
145	                        discard;
146	                }
147	        #endif
148	
149	        #ifdef MATERIAL_COLOR
150	                color = m_Color;
151	        #endif
152	
153	        #ifdef POINT_SHAPE
154	                vec4 sample = texture2D(m_PointShape, gl_PointCoord);
155	                color *= sample;
156	        #endif
157	
158	        gl_FragColor = color;
159	}

Apr 20, 2021 6:44:51 PM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
com.jme3.renderer.RendererException: compile error in: ShaderSource[name=Shaders/wireframe/multicolor2.frag, defines, type=Fragment, language=GLSL110]
0:154(40): error: `gl_PointCoord' undeclared
0:154(16): error: no matching function for call to `texture2D(sampler2D, error)'; candidates are:
0:154(16): error:    vec4 texture2D(sampler2D, vec2)
0:154(16): error:    vec4 texture2D(sampler2D, vec2, float)
0:155(11): warning: `sample' used uninitialized

	at com.jme3.renderer.opengl.GLRenderer.updateShaderSourceData(GLRenderer.java:1516)
	at com.jme3.renderer.opengl.GLRenderer.updateShaderData(GLRenderer.java:1543)
	at com.jme3.renderer.opengl.GLRenderer.setShader(GLRenderer.java:1608)
	at com.jme3.material.logic.DefaultTechniqueDefLogic.render(DefaultTechniqueDefLogic.java:96)
	at com.jme3.material.Technique.render(Technique.java:167)
	at com.jme3.material.Material.render(Material.java:1033)
	at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:634)
	at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:273)
	at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:321)
	at com.jme3.renderer.RenderManager.renderTranslucentQueue(RenderManager.java:953)
	at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1139)
	at com.jme3.renderer.RenderManager.render(RenderManager.java:1180)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:273)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:537)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:624)
	at com.jme3.system.lwjgl.LwjglWindow.create(LwjglWindow.java:473)
	at com.jme3.app.LegacyApplication.start(LegacyApplication.java:491)
	at com.jme3.app.LegacyApplication.start(LegacyApplication.java:443)
	at com.jme3.app.SimpleApplication.start(SimpleApplication.java:126)
	at com.jayfella.jme.vehicle.lemurdemo.MavDemo1.main(MavDemo1.java:227)

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Resource id in failed request:  0x5200056
  Serial number of failed request:  1923
  Current serial number in output stream:  1923

Process finished with exit code 1

Should i open other thread ?

1 Like

is caused by :

this being not defined in this scope,

1 Like

This doesn’t occur with JME 3.3.2-stable on the same system?

1 Like

I am still using my local build v3.4.0-SNAPSHOT, but if you haven’t changed this shader file in the new 3.4.0 version then it would happen jme3.3.2 too.

I don’t think it’s connected with wireframes or physics debug visualization. More likely it’s connected with the VehiclePointsState used to visualize the vehicle cameras.

I am still using my local build v3.4.0-SNAPSHOT, but if you haven’t changed this shader file in the new 3.4.0 version then it would happen jme3.3.2 too.

The failing shader is in my Heart library. I’m worried there might be a regression between JME 3.3.2 and JME 3.4.0-beta1 that breaks certain shaders such as this one. Please check.

1 Like