Hey guys, I'm trying to use Allegro to draw some shapes for a school project. I got the error: Process returned -1073741819 (0xC0000005). This was the same error I got when I tried to draw bitmaps previously. I borrowed code that my teacher uses for a demo to see if it was just my code that was the problem. I am still getting the same error. From my research, 0xC0000005 seems to be an access violation error. I believe that it is a problem with my computer, what can I do to fix? Thank you.
Attached below is the code from my teacher that I am using. Other Allegro functions that do not require drawing shapes, such as creating a pop-up or drawing a single pixel work.
You are saying it works if you comment out the draw functions? Or it doesn't work at all?
Do you have a step-by-step debugger to go through each line to find out where it breaks?
also, when you post code put it inside the code tags please. Makes it easier to read and allegro functions link to the manual (Even though they need updated)
<code> //source code goes here </code>
One thing I noticed is that you're not calling `al_init_native_dialog_addon`
But that would only matter if something went wrong creating display or initializing primitives. Correct? Otherwise those calls would never be called to cause issues with native dialog not being initialized.
DanielH, it is breaking at the draw functions. If I comment out lines 56 through 59 it works perfectly. It creates a window titled "Allegro Example 8 - Shapes", waits, then closes. From my previous work with Allegro, I can create pop-ups and draw individual pixels as well.
I believe that the problem lies with my computer, as this code works on my teacher's.
You're not checking the return value of al_init. If it fails, it means your runtime version of allegro is not the same as your compile time allegro. Delete old copies of allegro and relink.
Yes, get a clean copy of Allegro. Your code is fine.
{"name":"612951","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/2\/d2947eb60dfa50439cdb105ce1527fbf.png","w":648,"h":524,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/2\/d2947eb60dfa50439cdb105ce1527fbf"}