Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DrRacket Internal Error #33

Open
lehitoskin opened this issue Jul 21, 2015 · 10 comments
Open

DrRacket Internal Error #33

lehitoskin opened this issue Jul 21, 2015 · 10 comments

Comments

@lehitoskin
Copy link

Running (sphere origin 1) in Racket version 6.1.1 creates the following error:

make-gl-shader: 0(10) : error C1101: ambiguous overloaded function reference "mix(float, float, int)"
    (0) : gp5 float64_t mix(float64_t, float64_t, float64_t)
    (0) : vec4 mix(vec4, vec4, float)
    (0) : vec3 mix(vec3, vec3, float)
    (0) : vec2 mix(vec2, vec2, float)
    (0) : float mix(float, float, float)
0(11) : error C1101: ambiguous overloaded function reference "mix(float, float, int)"
    (0) : gp5 float64_t mix(float64_t, float64_t, float64_t)
    (0) : vec4 mix(vec4, vec4, float)
    (0) : vec3 mix(vec3, vec3, float)
    (0) : vec2 mix(vec2, vec2, float)
    (0) : float mix(float, float, float)
0(12) : error C1101: ambiguous overloaded function reference "mix(float, float, int)"
    (0) : gp5 float64_t mix(float64_t, float64_t, float64_t)
    (0) : vec4 mix(vec4, vec4, float)
    (0) : vec3 mix(vec3, vec3, float)
    (0) : vec2 mix(vec2, vec2, float)
    (0) : float mix(float, float, float)

The box that's supposed to contain the sphere contains what appears to be everything but the sphere: position coordinates and several icons/buttons at the top that I can click.

@lduguid
Copy link

lduguid commented Aug 28, 2015

Same error, running clean install of DrRacket 6.2.1 - 64 bit

#lang racket
(require pict3d)
(sphere origin 1/2)

@jeapostrophe
Copy link

Can you say what graphics card and OpenGL versions you have?

@lehitoskin
Copy link
Author

I'm using a gtx 560 ti and glxinfo says this:

OpenGL core profile version string: 4.4.0 NVIDIA 358.09

OpenGL core profile shading language version string: 4.40 NVIDIA via Cg compiler

OpenGL version string: 4.5.0 NVIDIA 358.09

@jeapostrophe
Copy link

This is the same error as oflatt/space-orbs#8 and the root cause is that the shader isn't casting a value to a float. Some OpenGL implementations like Intel and AMD's don't seem to enforce this GLSL rule. I will shortly update pict3d and I'll let you know so you can re-test.

@lehitoskin
Copy link
Author

Excellent work!

@lduguid
Copy link

lduguid commented Dec 8, 2015

Nvidia GeForce GTX 650 - latest drivers. (Windows 8.1). Cannot recall any other OpenGL or DirectX applications having issues of this nature. Let me know if you require various subsystem version numbers etc.

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 650/PCIe/SSE2
OpenGL version string: 4.5.0 NVIDIA 358.91

@jeapostrophe
Copy link

I believe this is fixed now on https://github.com/jeapostrophe/pict3d (you should be able to raco pkg update pict3d and get the new version)

If it is not working for you, can you send me the output of racket -l pict3d/tests/shaders please

@lehitoskin
Copy link
Author

Running the same command as before (this time with Racket 6.3) makes DrRacket freeze.

racket -l pict3d/tests/shaders opens up a window that promptly closes with this terminal output:

XSetErrorHandler: given value does not fit primitive C type
  C type: _fpointer
  given value: #<procedure:flag-x-error-handler>
  context...:
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:292:5
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:276:0: glx-create-context-attribs
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:319:4: for-loop
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:318:2
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:344:0: make-gtk-drawable-gl-context
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:469:0: create-widget-gl-context
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/dc.rkt:189:4: get-gl-context method in dc%
   /home/lehi/.racket/6.3/pkgs/pict3d/pict3d/tests/shaders.rkt:24:6
XSetErrorHandler: given value does not fit primitive C type
  C type: _fpointer
  given value: #<procedure:flag-x-error-handler>
  context...:
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:292:5
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:276:0: glx-create-context-attribs
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:319:4: for-loop
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:318:2
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:344:0: make-gtk-drawable-gl-context
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:469:0: create-widget-gl-context
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/dc.rkt:189:4: get-gl-context method in dc%
   /home/lehi/.racket/6.3/pkgs/pict3d/pict3d/tests/shaders.rkt:24:6
   /usr/share/racket/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /usr/share/racket/collects/racket/private/more-scheme.rkt:265:2: call-with-exception-handler
XSetErrorHandler: given value does not fit primitive C type
  C type: _fpointer
  given value: #<procedure:flag-x-error-handler>
  context...:
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:292:5
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:276:0: glx-create-context-attribs
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:319:4: for-loop
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:318:2
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:344:0: make-gtk-drawable-gl-context
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt:469:0: create-widget-gl-context
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/gtk/dc.rkt:189:4: get-gl-context method in dc%
   /home/lehi/.racket/6.3/pkgs/pict3d/pict3d/tests/shaders.rkt:24:6
   /usr/share/racket/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /usr/share/racket/collects/racket/private/more-scheme.rkt:265:2: call-with-exception-handler
about to suspend in atomic mode
fish: Job 1, “racket -l pict3d/tests/shaders” terminated by signal SIGABRT (Abort)

@jeapostrophe
Copy link

Ah yes, Lehi, I found the same problem when I tried Linux debugging this problem. I pushed a fix to gui-lib for that (racket/gui@c1cddc5) You could try with a snapshot build, unless you are already using the git release

@lehitoskin
Copy link
Author

I'll have to check it out once 6.3.1 comes around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants