Skip to content

Segmentation Violation #7

Description

@dleslie

I ran into a segmentation violation while a short way into the tutorial you wrote:

(import chicken scheme)
(use hypergiant)

(define keys (make-bindings
              `((quit ,+key-escape+ press: ,stop))))

(define scene (make-parameter #f))
(define camera (make-parameter #f))

(define board-mesh (rectangle-mesh 1.2 1.2
                                   color: (lambda (_)
                                            '(0.5 0.4 0.2))))

(define (init-board)
  (add-node (scene) color-pipeline-render-pipeline
            mesh: board-mesh
            position: (make-point 0.5 0.5 0)))

(define (init)
  (push-key-bindings keys)
  (scene (make-scene))
  (camera (make-camera #:perspective #:position (scene) 
                       near: 0.001 angle: 35))
  (set-camera-position! (camera) (make-point 0.5 0.5 2))
  (init-board))

(start 800 600 "Go" resizable: #f init: init)

Output:

Error: segmentation violation

    Call history:

    glls-renderable.scm:502: gl-utils-mesh#mesh-n-indices     
    glls-renderable.scm:508: get-arg      
    glls-renderable.scm:486: get-keyword      
    glls-renderable.scm:488: default      
    glls-renderable.scm:508: set-renderable-offset!   
    glls-renderable.scm:53: address->pointer      
    glls-renderable.scm:482: symbol->string   
    glls-renderable.scm:482: string->keyword      
    glls-renderable.scm:516: get-arg      
    glls-renderable.scm:486: get-keyword      
    glls-renderable.scm:515: set-renderable-uniform-value!    
    glls-renderable.scm:57: f32vector?    
    glls-renderable.scm:62: s32vector?    
    glls-renderable.scm:67: u32vector?    
    glls-renderable.scm:72: pointer?      
    glls-renderable.scm:518: loop       <--

I'm using the latest 64-bit MateUbuntu with an AMD A4-5000 APU that has a builtin Radeon HD 8330.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions