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

glDrawElements SIGSEGV: Illegal storage access #458

Open
jlp765 opened this issue Dec 23, 2020 · 2 comments
Open

glDrawElements SIGSEGV: Illegal storage access #458

jlp765 opened this issue Dec 23, 2020 · 2 comments

Comments

@jlp765
Copy link
Contributor

jlp765 commented Dec 23, 2020

On nim version
Nim Compiler Version 1.4.2 [Linux: amd64]
with libSDL2-2.0

Traceback (most recent call last)
/home/james/nimx/test/t1.nim(3) t1
/home/james/.nimble/pkgs/nimx-0.1/nimx/private/windows/sdl_window.nim(546) runUntilQuit
/home/james/.nimble/pkgs/nimx-0.1/nimx/private/windows/sdl_window.nim(470) animateAndDraw
/home/james/.nimble/pkgs/nimx-0.1/nimx/app.nim(105) drawWindows
/home/james/.nimble/pkgs/nimx-0.1/nimx/abstract_window.nim(79) drawWindow
/home/james/.nimble/pkgs/nimx-0.1/nimx/private/windows/sdl_window.nim(284) drawWindow
/home/james/.nimble/pkgs/nimx-0.1/nimx/abstract_window.nim(85) drawWindow
/home/james/.nimble/pkgs/nimx-0.1/nimx/view.nim(419) recursiveDrawSubviews
/home/james/.nimble/pkgs/nimx-0.1/nimx/view.nim(414) drawSubviews
/home/james/.nimble/pkgs/nimx-0.1/nimx/view.nim(402) drawWithinSuperview
/home/james/.nimble/pkgs/nimx-0.1/nimx/view.nim(418) recursiveDrawSubviews
/home/james/.nimble/pkgs/nimx-0.1/nimx/view.nim(404) draw
/home/james/.nimble/pkgs/nimx-0.1/nimx/text_field.nim(268) draw
/home/james/.nimble/pkgs/nimx-0.1/nimx/formatted_text.nim(816) drawText
/home/james/.nimble/pkgs/nimx-0.1/nimx/formatted_text.nim(717) forEachLineAttribute
/home/james/.nimble/pkgs/nimx-0.1/nimx/formatted_text.nim(846) :anonymous
/home/james/.nimble/pkgs/nimx-0.1/nimx/private/text_drawing.nim(271) drawText
/home/james/.nimble/pkgs/nimx-0.1/nimx/private/text_drawing.nim(212) drawTextBase
/home/james/.nimble/pkgs/opengl-#head/opengl/private/errors.nim(22) glDrawElements
SIGSEGV: Illegal storage access. (Attempt to read from nil?)

Am I missing an opengl library I need to install or something equally simple?

@yglukhov
Copy link
Owner

Please show your test program

@jlp765
Copy link
Contributor Author

jlp765 commented Dec 23, 2020

import nimx / [ window, layout, button, text_field ]

runApplication:
    let w = newWindow(newRect(50, 50, 500, 150))
    w.makeLayout: # DSL follows
        - Label as greetingLabel: # Add a view of type Label to the window. Create a local reference to it named greetingLabel.
            center == super # center point of the label should be equal to center point of superview
            width == 300 # width should be 300 points
            height == 15 # well, this should be obvious now
            text: "Press the Greet button to see thegreeting" # property "text" should be set to whatever the label should display

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

2 participants