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

Pages: 1 2 3 [4] 5 6 7
46
Window / Memory Leaks in sf::RenderWindow
« on: August 05, 2008, 11:21:56 am »
I noticed that a while ago, but I'm not sure if it really is a SFML related problem.
Anyway, here is the valgrind result (Ubuntu 8.04.1 32-bit, but I remember that the same happened with 8.10 alpha versions):

Code: [Select]
int main(int argc, char **argv)
{
sf::VideoMode Mode(640, 480);

sf::RenderWindow* RenderWindow = new sf::RenderWindow(Mode,"Test",sf::Style::Close|sf::Style::Resize);

delete RenderWindow;

return 0;
}


This is the valgrind output (run with  --leak-check=full):
Code: [Select]
==9284== Memcheck, a memory error detector.
==9284== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==9284== Using LibVEX rev 1804, a library for dynamic binary translation.
==9284== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==9284== Using valgrind-3.3.0-Debian, a dynamic binary instrumentation framework.
==9284== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==9284== For more details, rerun with: -v
==9284==
==9284== Syscall param writev(vector[...]) points to uninitialised byte(s)
==9284==    at 0x40007F2: (within /lib/ld-2.7.so)
==9284==    by 0x4718EC2: (within /usr/lib/libxcb.so.1.0.0)
==9284==    by 0x47194AA: (within /usr/lib/libxcb.so.1.0.0)
==9284==    by 0x47195DE: (within /usr/lib/libxcb.so.1.0.0)
==9284==    by 0x471AB36: xcb_wait_for_reply (in /usr/lib/libxcb.so.1.0.0)
==9284==    by 0x44B61EA: _XReply (in /usr/lib/libX11.so.6.2.0)
==9284==    by 0x4499661: XInternAtom (in /usr/lib/libX11.so.6.2.0)
==9284==    by 0x406482A: sf::priv::WindowImplX11::Initialize() (WindowImplX11.cpp:691)
==9284==    by 0x4066306: sf::priv::WindowImplX11::WindowImplX11(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings&) (WindowImplX11.cpp:304)
==9284==    by 0x406107C: sf::priv::WindowImpl::New(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings&) (WindowImpl.cpp:113)
==9284==    by 0x405E0A8: sf::Window::Create(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&) (Window.cpp:121)
==9284==    by 0x40EF5E8: sf::RenderWindow::RenderWindow(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&) (RenderWindow.cpp:51)
==9284==  Address 0x533c034 is 4,380 bytes inside a block of size 8,556 alloc'd
==9284==    at 0x4021BDE: calloc (vg_replace_malloc.c:397)
==9284==    by 0x4719130: xcb_connect_to_fd (in /usr/lib/libxcb.so.1.0.0)
==9284==    by 0x471BA50: xcb_connect (in /usr/lib/libxcb.so.1.0.0)
==9284==    by 0x44B5716: _XConnectXCB (in /usr/lib/libX11.so.6.2.0)
==9284==    by 0x449E028: XOpenDisplay (in /usr/lib/libX11.so.6.2.0)
==9284==    by 0x4063399: sf::priv::WindowImplX11::OpenDisplay(bool) (WindowImplX11.cpp:1139)
==9284==    by 0x4066A79: sf::priv::WindowImplX11::WindowImplX11() (WindowImplX11.cpp:71)
==9284==    by 0x40610DA: sf::priv::WindowImpl::New() (WindowImpl.cpp:80)
==9284==    by 0x405D82C: sf::Window::ForceContextInit() (Window.cpp:391)
==9284==    by 0x405DF96: sf::Window::Create(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&) (Window.cpp:104)
==9284==    by 0x40EF5E8: sf::RenderWindow::RenderWindow(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&) (RenderWindow.cpp:51)
==9284==    by 0x804C5C5: main (main.cpp:53)
==9284==
==9284== Invalid read of size 4
==9284==    at 0x4015220: (within /lib/ld-2.7.so)
==9284==    by 0x4005C69: (within /lib/ld-2.7.so)
==9284==    by 0x4007A97: (within /lib/ld-2.7.so)
==9284==    by 0x4011543: (within /lib/ld-2.7.so)
==9284==    by 0x400D5D5: (within /lib/ld-2.7.so)
==9284==    by 0x4010F5D: (within /lib/ld-2.7.so)
==9284==    by 0x4729C18: (within /lib/tls/i686/cmov/libdl-2.7.so)
==9284==    by 0x400D5D5: (within /lib/ld-2.7.so)
==9284==    by 0x472A2BB: (within /lib/tls/i686/cmov/libdl-2.7.so)
==9284==    by 0x4729B50: dlopen (in /lib/tls/i686/cmov/libdl-2.7.so)
==9284==    by 0x448C786: (within /usr/lib/libX11.so.6.2.0)
==9284==    by 0x448CA6E: _XNoticeCreateBitmap (in /usr/lib/libX11.so.6.2.0)
==9284==  Address 0x562fea0 is 24 bytes inside a block of size 25 alloc'd
==9284==    at 0x4022AB8: malloc (vg_replace_malloc.c:207)
==9284==    by 0x4008031: (within /lib/ld-2.7.so)
==9284==    by 0x4011543: (within /lib/ld-2.7.so)
==9284==    by 0x400D5D5: (within /lib/ld-2.7.so)
==9284==    by 0x4010F5D: (within /lib/ld-2.7.so)
==9284==    by 0x4729C18: (within /lib/tls/i686/cmov/libdl-2.7.so)
==9284==    by 0x400D5D5: (within /lib/ld-2.7.so)
==9284==    by 0x472A2BB: (within /lib/tls/i686/cmov/libdl-2.7.so)
==9284==    by 0x4729B50: dlopen (in /lib/tls/i686/cmov/libdl-2.7.so)
==9284==    by 0x448C786: (within /usr/lib/libX11.so.6.2.0)
==9284==    by 0x448CA6E: _XNoticeCreateBitmap (in /usr/lib/libX11.so.6.2.0)
==9284==    by 0x448CE6C: XCreatePixmap (in /usr/lib/libX11.so.6.2.0)
==9284==
==9284== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 71 from 1)
==9284== malloc/free: in use at exit: 359,080 bytes in 803 blocks.
==9284== malloc/free: 5,906 allocs, 5,103 frees, 3,470,686 bytes allocated.
==9284== For counts of detected errors, rerun with: -v
==9284== searching for pointers to 803 not-freed blocks.
==9284== checked 815,648 bytes.
==9284==
==9284==
==9284== 262,140 bytes in 1 blocks are possibly lost in loss record 100 of 100
==9284==    at 0x4022AB8: malloc (vg_replace_malloc.c:207)
==9284==    by 0x45AAD56: (within /usr/lib/libGL.so.169.12)
==9284==
==9284== LEAK SUMMARY:
==9284==    definitely lost: 0 bytes in 0 blocks.
==9284==      possibly lost: 262,140 bytes in 1 blocks.
==9284==    still reachable: 96,940 bytes in 802 blocks.
==9284==         suppressed: 0 bytes in 0 blocks.
==9284== Reachable blocks (those to which a pointer was found) are not shown.
==9284== To see them, rerun with: --leak-check=full --show-reachable=yes

47
Graphics / Draw(Text) performance issue
« on: July 30, 2008, 08:46:53 am »
Quote from: "Daazku"

lollll 320X240... I will draw an fps string in a 10X100 window and we will see wich fps i will get XD.


Any results? :wink:

48
Graphics / Draw(Text) performance issue
« on: July 29, 2008, 06:20:07 pm »
Nope, it's a 8800GTX, rendering nothing but a message box (only a few lines of OpenGL code) + fps string in a 320x240 window (it drops to an average 15000 fps if I change the resolution to 640x480).
Don't worry, it gets slower the more I draw on the screen. :wink:

49
Graphics / Draw(Text) performance issue
« on: July 29, 2008, 05:45:33 pm »
It definitely got faster. I got 5000 fps before, now I get 24000 fps.
I almost thought that there was something wrong with my message box rendering code. :P

50
http://muffin.cias.osakafu-u.ac.jp/~matumoto/cgi-bin/xt.cgi?prog/squirrel
It seems to be down at random times. If there is nothing on that site, try again later...

That + Squirrel source code provides pretty much all information I need for the system I intend to create.

51
If you decide to switch, the source of the Squirrel standard library also turned out to be helpful (+ some japanese site :P).

52
Quote
I love Squirrel. Such fun  :D

I agree. Squirrel is quite nice.
I started to embed it just a few days ago. :wink:
It lacks documentation though.

53
If it's only for the binding purpose you could load the file into memory and then use sf::Image::LoadFromMemory.

54
Graphics / OpenGL performance issue
« on: July 27, 2008, 11:26:28 am »
You could use a profiler to find out what the bottleneck is.
A short question: Are you running Vista?
I get only about half of the performance I get on XP or Linux (on the same system). I always thought that it was a driver related problem, but maybe it is something different...

55
General discussions / Idling a program
« on: July 21, 2008, 10:19:04 pm »
You might have a look at sf::RenderWindow::SetFramerateLimit().

56
Audio / Audio "Clicks" on Linux
« on: July 13, 2008, 03:41:05 pm »
You're right. The problem is gone when I select the debug build.
Can you tell what causes the problem? Has it something to do with optimization?

57
Audio / Audio "Clicks" on Linux
« on: July 13, 2008, 02:14:33 pm »
Here is what ldd says:

Code: [Select]
linux-gate.so.1 =>  (0xb7f3d000)
libsfml-audio.so.1.3 => /usr/lib/libsfml-audio.so.1.3 (0xb7efe000)
libsfml-system.so.1.3 => /usr/lib/libsfml-system.so.1.3 (0xb7ef9000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7e0a000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7de4000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7dd6000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7c78000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7c5f000)
libsndfile.so.1 => /usr/lib/libsndfile.so.1 (0xb7c03000)
libopenal.so.1 => /usr/lib/libopenal.so.1 (0xb78bf000)
/lib/ld-linux.so.2 (0xb7f3e000)
libFLAC.so.8 => /usr/lib/libFLAC.so.8 (0xb786c000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7868000)
libogg.so.0 => /usr/lib/libogg.so.0 (0xb7862000)


I assume that those are the right ones.
I'm using the latest revision (rev 768).

58
Audio / Audio "Clicks" on Linux
« on: July 13, 2008, 01:33:28 pm »
It still clicks for me...

59
General / Something strange... (Mouse click)
« on: July 09, 2008, 09:47:44 pm »
I tried it under linux (wine and linux native build) and everything seemed to work.

60
Window / [Solved] Stretch to fit screen
« on: July 04, 2008, 03:55:28 pm »
It should be sufficient to create a window with the wanted resolution:
Code: [Select]
sf::RenderWindow App(sf::VideoMode(1024, 768), sTitle, sf::Style::Fullscreen);

Pages: 1 2 3 [4] 5 6 7
anything