DlangUI

via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Jun 5 08:15:46 PDT 2014


On Thursday, 5 June 2014 at 14:22:46 UTC, Mike James wrote:
> I am having problems running (debugging) the example1 program. 
> When loading the resources it gets to tab_up_background.9.png 
> (line 579 in file resources.d) and then fails with an exception:
>
> "Unhandled exception at 0x0044f932 in example1.exe: 0xC0000005: 
> Access violation reading location 0x00000000."
>
> Do you have any clues as to what the problem could be?

I didn't compile this, so take it with a grain of salt.

Access violation reading 0x00000000 is a null pointer 
dereference. Looking at the source:

_drawbuf = loadImage(_filename);
if (_filename.endsWith(".9.png"))
     _drawbuf.detectNinePatch();

I'm making a wild guess that loadImage returns a null if it can't 
find the file. Dereferencing thus throws. You probably lack the 
image or it's in the wrong place.


More information about the Digitalmars-d-announce mailing list