DlangUI

Vadim Lopatin via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed Jun 11 04:00:24 PDT 2014


On Thursday, 5 June 2014 at 14:22:46 UTC, Mike James wrote:
> First problem: you need to add gl3n to the git clone list for 
> developing under Visual-D.

Fixed. I've removed gl3n and libpng references from project.

> 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?

Search log file examples/example1/ui.log for lines like
2014-06-11 13:21:11.070 D  DrawableCache: adding path 
C:\projects\d\dlangui\examples\example1\Debug\..\..\..\res\ to 
resource dir list.
2014-06-11 13:21:11.070 D  DrawableCache: adding path 
C:\projects\d\dlangui\examples\example1\Debug\..\..\..\res\mdpi\ 
to resource dir list.
2014-06-11 13:21:11.070 D  DrawableCache: path 
C:\projects\d\dlangui\examples\example1\Debug\..\..\..\..\res\ 
does not exist.
....
2014-06-11 13:21:11.086 D  DrawableCache: path 
C:\projects\d\dlangui\examples\example1\Debug\..\..\res\mdpi\ 
does not exist.

In examples/example1/main.d several directories are added as 
resource path
candidates

     // resource directory search paths
     string[] resourceDirs = [
         appendPath(exePath, "../../../res/"),   // for Visual D 
and DUB builds
         appendPath(exePath, "../../../res/mdpi/"),   // for 
Visual D and DUB builds
         appendPath(exePath, "../../../../res/"),// for Mono-D 
builds
         appendPath(exePath, "../../../../res/mdpi/"),// for 
Mono-D builds
		appendPath(exePath, "res/"), // when res dir is located at the 
same directory as executable
		appendPath(exePath, "../res/"), // when res dir is located at 
project directory
		appendPath(exePath, "../../res/"), // when res dir is located 
at the same directory as executable
		appendPath(exePath, "res/mdpi/"), // when res dir is located at 
the same directory as executable
		appendPath(exePath, "../res/mdpi/"), // when res dir is located 
at project directory
		appendPath(exePath, "../../res/mdpi/") // when res dir is 
located at the same directory as executable
	];

If your executable is not located in examples/example1/Debug, 
probably you add path to your directory to list of resource dirs.

Another possible reason - FreeImage.dll is found.
Try to copy FreeImage.dll from lib directory to 
examples/example1/Debug


More information about the Digitalmars-d-announce mailing list