1
Graphics / Re: AW: Problem with Tutorial: window.draw() causes exception
« on: December 18, 2014, 08:59:04 pm »I'm definitely not good enough at build errors to spot exactly what the issue is here, but I can't help noticing that your code is NOT the same as the tutorial's code, because you have Windows-specific junk like stdafx.h and _TCHAR* in there. Maybe that has something to do with it.Right, it is almost exactly the tutorial's code, since I built it in 2013 and it came with those parts. I had tried removing the stdafx.h, but it returned an error. I just now tried completely removing the input args part of the main, but unfortunately that didn't fix anything, and stdafx.h still returns an error. I also tried creating a new project that does not include the extra stdafx.h junk, but that returns the same unhandled exception error.
Are you in release mode? Don't mix debug libraries (-d suffix) and the release mode.I am most definitely in debug mode; I made sure about that multiple times. I fixed the repetition of .lib includes, and even tried running the project in release mode after tweaking the include .lib, but unfortunately the unhandled exception error still gets thrown.
Also: Only add SFML's dependencies once, i.e. there should only be one winmm.lib.
Thank you both for the suggestions, though!
EDIT: Out of curiosity and a grab into the dark, I'm going to download the 32-bit version of SFML and build the project with that. I'll update the project and try it with that once the download decides to work. It might actually fix the issue, since I remember having a problem with x64/x86 in the past when I did the C# binding of SFML, since I consistently missed some obscure option somewhere in the config properties. I'll update here when I have results. EDIT2: Unfortunately, that didn't fix anything, either. However, when I run it in 32-bit mode, the error changes to the following:
Quote
Unhandled exception at 0x77D81A91 in HelloSimple.exe: 0xC0000005: Access violation executing location 0x00000000.Not sure how useful that new piece of information is, but it's something new, at least. Unfortunately, googling that hexcode returns absolutely nothing of significance (only two results appear, and they both have to do with FlightSim).
EDIT: Apparently, even though it's been a full reset since I had updated the drivers on this computer, the graphics drivers hadn't been fully installed (which meant OpenGL wasn't updated). After a second reset, which prompted a windows update, the project builds and runs like a charm. (I had moved to a new computer to visit family over winter break, so the computer I'm using is a fresh install). *sigh*