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

Pages: [1]
1
General / (Solved) Read access violation with unknown reason
« on: April 18, 2020, 01:41:20 am »
Hello! I am getting read access violation while running game code, here is a minimal example:
https://pastebin.com/cEqKDaGk
It is designed to render some sprites to the RenderTexture and then render it to the window.
Exception occures on any line of Menu::DrawMenu().
(click to show/hide)
Code seems to work OK if I am not using vectors for storing Menu class.
C++ 17, SFML 2.5.1, VS 2019

2
Graphics / Access violation when declaring Texture object
« on: May 06, 2018, 06:19:40 pm »
Hello, I have strange problem while trying to declare Texture object inside class.
What I have:
(click to show/hide)
That supposed to be a menu class that declaring images, textures and sprites for menu and draws it, and i have "Unhandled exception at 0x779522E2 (ntdll.dll) in Project137.exe: 0xC0000005: Access violation writing location 0x00000004." on the line where system_main_menu object is being declared.
Problem solves only if I will remove that 3 lines with declaring textures: Texture t_main_logo, Texture t_main_menu_background and Texture t_welcome_to_loading and usage of them.
For example this code won't work:
(click to show/hide)
It works if I declare texture outside class (in main() for example) but still doesnt work if I declare them in any other class.
Strange thing is that code worked fine until I started to use cout to get some variables values, then that error appeared, and when I used ctrl+z to undo code I wrote that problem didn't disappear. I'm not sure if this problem connected to SFML itself (probably my software problem) but I googled that problem I have and found out they all have very different reasons. Sorry if provided not enough info about problem, feel free to ask for more.
I use SFML 2.4.2 x32 in VS 2017, precompiled build by Nightlybuilds (here).

Pages: [1]