Skip to content

glutBitmapCharacter causes SIGSEGV on macOS #53

@brechtm

Description

@brechtm

Adding the following to glut_example.nim (following glEnd() # End of drawing) causes a segmentation fault:

  for character in "text":
    glutBitmapCharacter(GLUT_BITMAP_HELVETICA_10, character.ord)

Output:

...
CC: opengl_glu
Hint:  [Link]
Hint: operation successful (28380 lines compiled; 1.209 sec total; 60.383MiB peakmem; Debug Build) [SuccessX]
Hint: /private/tmp/glut_example  [Exec]
Traceback (most recent call last)
glut_example.nim(114)    glut_example
glut_example.nim(76)     display
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Error: execution of an external program failed: '/private/tmp/glut_example '

GDB output:

(gdb) r
Starting program: /private/tmp/glut_example
[New Thread 0xf03 of process 8414]
warning: unhandled dyld version (15)
[New Thread 0x1003 of process 8414]
[New Thread 0x1107 of process 8414]
[New Thread 0x1503 of process 8414]
[New Thread 0x2603 of process 8414]
[New Thread 0x2703 of process 8414]
[New Thread 0x2803 of process 8414]
[New Thread 0x2903 of process 8414]

Thread 2 received signal SIGSEGV, Segmentation fault.
0x00007fff48330def in ?? ()

Can I make gdb output more useful information?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions