|
Exception thrown at 0x0F42F557 |
frordX
Member #16,148
January 2016
|
Hi, |
Edgar Reynaldo
Major Reynaldo
May 2007
|
To clarify, your problem is not when you compile an Allegro program, but when you run it. The error image says you're accessing a NULL pointer. Either it is uninitialized, initialized to zero and never created with new or malloc, or you're destroying a resource and setting it back to zero and then trying to access it again. To help more, we need to see code. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Chris Katko
Member #1,881
January 2002
|
One more additional note. If you never check return values this can happen as well. If Allegro isn't setup correctly, you won't get an image. If you try and load a file that doesn't exist or is corrupted, you won't get an image. If you try to create a new bitmap and it fails because of something like invalid width/height or running out of memory, it will fail. All of those cases will return error codes that need to be checked otherwise your program can fail at any time. Always check for and deal with return codes. Some functions return NULL if they fail, some functions return -1 or another value. Read documentation to know when and where. -----sig: |
frordX
Member #16,148
January 2016
|
I suppose that the mistake has to be here: |
Edgar Reynaldo
Major Reynaldo
May 2007
|
It's much more helpful to us if you post your code in <code>code goes here</code> tags. Also, you don't want to create and destroy a display on every frame of your logic processing. You want to do it once at the beginning and once at the end. In addition, you never called al_init. Allegro functions won't work unless this call is successful. Try fixing those things and then report back. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Bruce Pascoe
Member #15,931
April 2015
|
For some reason I misread the title of this thread as Explosion thrown...
|
Mark Oates
Member #1,146
March 2001
|
{"name":"610061","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/5\/8539aae09846c0985ea9760e8946d00a.gif","w":500,"h":239,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/5\/8539aae09846c0985ea9760e8946d00a"} -- |
frordX
Member #16,148
January 2016
|
It worked, thanks |
Chris Katko
Member #1,881
January 2002
|
Bruce Pascoe: People might take them a little more seriously if end users saw "Explosion was Thrown" on their software! -----sig: |
Rodolfo Lam
Member #16,045
August 2015
|
Just happened to notice... On the top of the page it says that credits go to Edgar for helping... Was that automatic or did Matthew manually modify this page to reflect that?
|
GullRaDriel
Member #3,861
September 2003
|
The OP can edit his post to give forgotten credit IIRC. "Code is like shit - it only smells if it is not yours" |
Edgar Reynaldo
Major Reynaldo
May 2007
|
When you submit or edit a post you get the chance to give credit to the people who replied if you set the thread type as 'A question or problem with a specific answer'. You only get to do it once though. Once you decide who to give credit to you can't change it. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|