Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Robotsandstuff

Pages: [1]
1
D / Access Violation?
« on: October 12, 2016, 07:22:27 am »
Using the 32bit binaries from your site,and DMD 2.071.2

With your example below I get an error.

Code: [Select]
object.Error@(0): Access Violation
0x0041B3B9
0x004038FB
0x004037FC
0x004035F0
0x75767c04 in BaseThreadInitThunk
0x7719Ad1F in RtlInitializeExceptionChain
0x7719ACEA in RtInitializeExceptionChain

module main;

import dsfml.graphics;

void main(string[] args)
{
    auto window = new RenderWindow(VideoMode(800,600),"Hello DSFML!");

    auto head = new CircleShape(100);
    head.fillColor = Color.Green;
    head.position = Vector2f(300,100);

    auto leftEye = new CircleShape(10);
    leftEye.fillColor = Color.Blue;
    leftEye.position = Vector2f(350,150);

    auto rightEye = new CircleShape(10);
    rightEye.fillColor = Color.Blue;
    rightEye.position = Vector2f(430,150);

    auto smile = new CircleShape(30);
    smile.fillColor = Color.Red;
    smile.position = Vector2f(368,200);

    auto smileCover = new RectangleShape(Vector2f(60,30));
    smileCover.fillColor = Color.Green;
    smileCover.position = Vector2f(368,200);

    while (window.isOpen())
    {
        Event event;

        while(window.pollEvent(event))
        {
            if(event.type == event.EventType.Closed)
            {
                window.close();
            }
        }

        window.clear();

        window.draw(head);
        window.draw(leftEye);
        window.draw(rightEye);
        window.draw(smile);
        window.draw(smileCover);

        window.display();
    }
}
 

I imagine I'm doing something wrong as this doesn't seem like a wide-spread issue.
Any help or advice is appreciated, thanks.

Pages: [1]