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.


Messages - EldarFara

Pages: [1]
1
General / Re: Read access violation with unknown reason
« on: April 18, 2020, 12:33:36 pm »
Thanks for your answer. I changed vector of object pointers to vector of objects (changed RenderTexture to RenderTexture* to make copy assignment possible) and now main() looks like this:
(click to show/hide)

This time, I get read access violation "this was 0x30" on the line with drawing to the window.

EDIT: I simplified code so much (to show a minimal example) that I deleted part with creating window, thats why I got read access violation. Problem is solved now. Cheers!

2
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

3
Graphics / Re: Access violation when declaring Texture object
« on: May 10, 2018, 10:19:23 am »
After discussing the the topic in SFML discord group it turned out that using another precompiled SFML binaries helps. So problem is solved for now

4
Graphics / Re: Access violation when declaring Texture object
« on: May 07, 2018, 01:10:52 pm »
Good day,
Here is my callstack:
(click to show/hide)

5
Graphics / Re: Access violation when declaring Texture object
« on: May 06, 2018, 06:47:18 pm »
Many thanks for fast answer,
I use 32bit binaries and x86 compiler (in case if you meant it).
Not sure about what debugger you meant, I compile in debug mode, it builds the program and opens debug console but not the SFML window, and pointing to exception in line with declaring object of class with textures, as I described.

6
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]
anything