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

Pages: [1]
1
General / Re: Double free or corruption (!prev) error?
« on: April 11, 2017, 01:26:20 pm »
I'm trying to minimise manual memory management by using smart pointers as much as possible though?

2
General / Double free or corruption (!prev) error?
« on: April 11, 2017, 12:31:00 pm »
Hi guys

So I've started to use SFML2 after a couple of years and have hit a pretty nasty error (or so I believe as I've never come across it). I get a double free or corruption (!prev) error when terminating my window.

Now, after looking at a few different topics, they all state the cause is a call to a double freeing of pointers. Granted, initially I did indeed have a double call to my destroy() function so I removed it. However, I'm still getting the error.

The full dump is:
(click to show/hide)

I'm using std::unique_ptr's for my resources and sprites, might that be causing this?

I'm also as you can guess, using Linux. Namely Ubuntu 16.10.

3
Graphics / OpenGL call failed in RenderTarget.cpp?
« on: December 23, 2015, 03:29:41 pm »
Hi guys,

So I'm now using CodeLite to develop my SFML game, and also reading from the SFML Game Development book and have hit a little bit of a hitch in the third chapter called "World".

This is the github for the chapter: https://github.com/SFML/SFML-Game-Development-Book/tree/master/03_World

Now onto my error... I've copied what's both in the book and the github word for word in terms of code (I've added extra functions here and there to break the code into more understandable parts for me).

Now it all comes out error and warning free, but when I go to run the program I get a black window and the following runtime error:
An internal OpenGL call failed in RenderTarget.cpp(418).
Expression:
   glViewport(viewport.left, top, viewport.width, viewport.height)
Error description:
   GL_INVALID_VALUE
   A numeric argument is out of range.
 

Now I've looked around the internet and found out that that error tends to lead to an out-of-date graphics card... But I've a very new Lenovo IdeaPad Flex 10 running Ubuntu 15.10.

Also when I do the following in the main Game class:
sf::Texture m_texture;
sf::Sprite m_sprite;

m_texture.loadFromFile("/Path/To/Texture/Resource.png");

m_sprite.setTexture(m_texture);

m_window.clear();
m_window.draw(m_sprite);
m_window.display();
 

The texture displays fine... I don't understand what could be going wrong... Any ideas?

Edit:-

I also placed the following into my Game::run() function to check the major version of OpenGL my graphics card can provide:
sf::ContextSettings settings = m_window.getSettings();
        std::cout << settings.majorVersion << "." << settings.minorVersion << std::endl;
 

and it came out with a value of 3.0.

4
General / Re: Developing using Eclipse in Ubuntu
« on: December 18, 2015, 04:09:01 pm »
So it turns out that Eclipse is smart enough to find the include. It's also able to find SFMLs non-static library.

My goal is to use the static version of SFML... (Given that I've come over from WIndows) but I could be completely wrong with how SFML works in Linux.

Does SFML have a static library for Linux?

5
General / Developing using Eclipse in Ubuntu
« on: December 17, 2015, 09:26:36 pm »
Hi guys,

Was trying to find out how I can go about developing my own game using SFML in Eclipse on Ubuntu.

I did what the wiki said and installed SFML onto my system but I cannot for the life of me find where it's all installed to.

I'm trying to use Eclipse and of course, you need to know where the library is and where the includes are.

I'm able to get it all working and compiling in Code::Blocks but due to the program being extremely buggy on my system I'm refraining from using it indefinitely.

So my question is as follows:

Where did SFML install to on my Ubuntu Linux System?

Thanks

Jamie.

Using Ubuntu 15.10
Eclipse Mars.1
SFML2.0

6
Graphics / Re: Weird Eclipse Mars Error involving Vector2?
« on: December 16, 2015, 03:00:31 am »
I did modify the OP with the correct code for Game.cpp and it turns out you're right.

Because I've been ctr+shift+o'ing, it's been including everything I need... including .inl files. So thank you very much for the help, couldn't find anything previous to this before so I'll leave this here.

7
Graphics / Weird Eclipse Mars Error involving Vector2?
« on: December 16, 2015, 01:33:49 am »
Hi guys,

So I'm currently following the "SFML Game Development" from Packt Publishing and I've come up with a very unusual error from my compiler.

So I'm using Eclipse Mars with MinGW and half way through chapter one I end up with the following class:

Game.hpp:
(click to show/hide)

and I get the following errors from my compiler:
(click to show/hide)

The thing I don't understand is that I used Visual Studio 2015 previous to this and got a lot further into the book than here without any hitch or errors relating to Vector2.

So my question is, what is happening and more importantly, how do I get rid of the errors so I can continue in Eclipse and not have to go back to VS2015...

Thanks guys,

Jamie.

Pages: [1]
anything