Bug 820

Summary: URI Regressions in IOUtil/JarUtil with [un]escaped chars (was: TextRender curve shaders don't load if library path contains a space)
Product: [JogAmp] Gluegen Reporter: leigh beattie <laykunowns>
Component: coreAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: critical CC: gouessej, rami.santina, sgothel
Priority: ---    
Version: 2   
Hardware: All   
OS: all   
Type: --- SCM Refs:
41fce94f95448bbea110a455ea508740fac8d8c9
Workaround: ---
Bug Depends on: 757    
Bug Blocks: 683, 857    

Description leigh beattie 2013-08-25 10:57:18 CEST
Problem described here : http://forum.jogamp.org/Update-from-Jogamp-2-0-to-2-0-2-causes-curve-TextRenderer-exception-td4029789.html#a4029877

Exporting project with libraries in a separate folder produces this error when there is a space character in the path to the libraries. For example when application is stored in "Google Drive" folder on any platform the exception happens. If I change it to "Google_Drive" everything works fine. Since the application is portable this is pretty big problem.

Exception in thread "GL Render Thread" java.lang.RuntimeException: readShaderSource(shader/curverenderer01.vp) error: 
        at com.jogamp.opengl.util.glsl.ShaderCode.create(ShaderCode.java:179) 
        at com.jogamp.opengl.util.glsl.ShaderCode.create(ShaderCode.java:365) 
        at com.jogamp.opengl.util.glsl.ShaderCode.create(ShaderCode.java:447) 
        at jogamp.graph.curve.opengl.TextRendererImpl01.initShaderProgram(TextRendererImpl01.java:52) 
        at com.jogamp.graph.curve.opengl.Renderer.init(Renderer.java:134) 
        at engine.GameEngine$5.init(GameEngine.java:513) 
        at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:540) 
        at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:586) 
        at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:572) 
        at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:377) 
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1034) 
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:909) 
        at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:602) 
        at engine.GameEngine$8.run(GameEngine.java:727) 
        at java.lang.Thread.run(Thread.java:722) 
Caused by: java.io.FileNotFoundException: Can't find include file uniforms.glsl 
        at com.jogamp.opengl.util.glsl.ShaderCode.readShaderSource(ShaderCode.java:746) 
        at com.jogamp.opengl.util.glsl.ShaderCode.readShaderSource(ShaderCode.java:767) 
        at com.jogamp.opengl.util.glsl.ShaderCode.readShaderSource(ShaderCode.java:796) 
        at com.jogamp.opengl.util.glsl.ShaderCode.create(ShaderCode.java:177) 
        ... 14 more
Comment 1 leigh beattie 2013-08-25 10:57:52 CEST
This is with jogl release 2.0.2.
Comment 2 Julien Gouesse 2013-08-29 15:47:09 CEST
This is a possible root cause:
http://forum.jogamp.org/JOGL-2-0-2-and-Netbeans-RCP-Applications-tp4029897p4029904.html
Comment 3 Sven Gothel 2013-10-07 01:09:51 CEST
    Bug 820: Escape SPACE in filenames for URI ctor, use decoded URI components when compiling new URI.
    
    Add IOUtil:
      - String encodeToURI(String)
      - String decodeFromURI(String)
    
    Both only handle escaping of SPACE only. Determine whether other chars need to be treated.