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.


Topics - random_canadian

Pages: [1]
1
Graphics / Unhandled Exception Error with Texture
« on: June 12, 2013, 03:26:34 am »
Hello lovely sfml community. First, let me apologize if the question I'm about to ask is considered "stupid." I am fairly new at sfml/c++, having been dabbling in other programming languages in my free time over the past few years. Anyways, I seemed to have stumbled onto a problem. It seems that I cannot load texture images from a file! After finding the source of the problem in my code, I isolated the issue. I removed all other code paths so that only the following code should run, considering it is the main() function. However, the following code does not even work:

#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
        sf::Texture texture = sf::Texture();
        texture.loadFromFile("image.png"); //This line is the source of the error. The file "image.png" exists, I assure you.

        return 0;
}

I receive the following (very scary) error:

Quote
Unhandled exception at 0x6CCDDEF8 (msvcr110.dll) in MyGame.exe: 0xC0000005: Access violation reading location 0x00D41000.

Then, Visual Studio directs me to line 367 in the file "memcpy.asm"

        rep     movsd           ;N - move all of our dwords

I honestly have no clue what is going on  :P. I've isolated the issue and don't know where to go from here. Any help is greatly appreciated!

2
DotNet / Where are the System and Networking dlls?
« on: June 06, 2013, 05:47:10 am »
Please forgive me if I'm doing something stupid, but I would really like to use the classes in the SFML-System module lol!  :-\




3
DotNet / C# SFML Visual Studio - Error on Build
« on: June 03, 2013, 03:20:07 am »
Following the steps given on this thread (http://en.sfml-dev.org/forums/index.php?topic=7674.0), I managed to setup SFML.Net 2.0 with Visual Studio C# 2012. However, I get the following error whenever I actually try to build something that references the SFML library...

Quote
An unhandled exception of type 'System.BadImageFormatException' occurred in mscorlib.dll

Additional information: Could not load file or assembly 'sfmlnet-graphics-2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

According to this page (http://msdn.microsoft.com/en-us/library/system.badimageformatexception.aspx), the file image of the sfmlnet-graphics-2 DLL is "invalid."

Quote
The exception that is thrown when the file image of a dynamic link library (DLL) or an executable program is invalid.

Any ideas about what I may have done wrong?
Thanks!

EDIT: After some more research it appears this is a problem with discrepancies between x64 or x86 builds (http://en.sfml-dev.org/forums/index.php?topic=9917.0). If I change the CPU settings to "prefer x64" (I am using 64-bit SFML), then the build succeeds. So my question is what happens if my user wants to run the game on a x86 system? Do I need to include DLLs of both x64 and x86 versions of SFML? How do I do this?

EDIT #2: Here's yet another thread about this issue (http://en.sfml-dev.org/forums/index.php?topic=2405.0) but, my question remains. What is the permanent solution?

Pages: [1]