Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 |
void printError(int line, char * file) { GLenum error = glGetError(); if(error != GL_NO_ERROR) { if(file) std::cout << "(" << file << ": " << line << ") GL error " << error << ": " << gluErrorString(error) << std::endl; else std::cout << "(" << line << ") GL error " << error << ": " << gluErrorString(error) << std::endl; exit(1); } } |
Zitat
==4796== Syscall param writev(vector[...]) points to uninitialised byte(s)
==4796== at 0x40007F2: (within /lib/ld-2.7.so)
==4796== by 0x469DEC2: (within /usr/lib/libxcb.so.1.0.0)
==4796== by 0x469E4AA: (within /usr/lib/libxcb.so.1.0.0)
==4796== by 0x469E5DE: (within /usr/lib/libxcb.so.1.0.0)
==4796== by 0x469FB36: xcb_wait_for_reply (in /usr/lib/libxcb.so.1.0.0)
==4796== by 0x454F1EA: _XReply (in /usr/lib/libX11.so.6.2.0)
==4796== by 0x4532661: XInternAtom (in /usr/lib/libX11.so.6.2.0)
==4796== by 0x40542C8: sf::priv::WindowImplX11::Initialize() (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x4054B69: sf::priv::WindowImplX11::WindowImplX11(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings&) (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x4050FD9: sf::priv::WindowImpl::New(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings&) (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x404EEEF: sf::Window::Create(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&) (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x4095048: sf::RenderWindow::RenderWindow(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&) (in /usr/lib/libsfml-graphics.so.1.4)
==4796== Address 0x46d84dc is 4,380 bytes inside a block of size 8,556 alloc'd
==4796== at 0x4021BDE: calloc (vg_replace_malloc.c:397)
==4796== by 0x469E130: xcb_connect_to_fd (in /usr/lib/libxcb.so.1.0.0)
==4796== by 0x46A0A50: xcb_connect (in /usr/lib/libxcb.so.1.0.0)
==4796== by 0x454E716: _XConnectXCB (in /usr/lib/libX11.so.6.2.0)
==4796== by 0x4537028: XOpenDisplay (in /usr/lib/libX11.so.6.2.0)
==4796== by 0x4054229: sf::priv::WindowImplX11::OpenDisplay(bool) (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x4055692: sf::priv::WindowImplX11::WindowImplX11() (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x405102F: sf::priv::WindowImpl::New() (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x404D556: sf::Context::Context() (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x404D5D1: sf::Context::GetGlobal() (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x404D63C: __static_initialization_and_destruction_0(int, int) (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x4055B25: (within /usr/lib/libsfml-window.so.1.4)
==4796==
==4796== Invalid read of size 4
==4796== at 0x4015210: (within /lib/ld-2.7.so)
==4796== by 0x4005C59: (within /lib/ld-2.7.so)
==4796== by 0x4007A87: (within /lib/ld-2.7.so)
==4796== by 0x4011533: (within /lib/ld-2.7.so)
==4796== by 0x400D5C5: (within /lib/ld-2.7.so)
==4796== by 0x4010F4D: (within /lib/ld-2.7.so)
==4796== by 0x4686C18: (within /lib/tls/i686/cmov/libdl-2.7.so)
==4796== by 0x400D5C5: (within /lib/ld-2.7.so)
==4796== by 0x46872BB: (within /lib/tls/i686/cmov/libdl-2.7.so)
==4796== by 0x4686B50: dlopen (in /lib/tls/i686/cmov/libdl-2.7.so)
==4796== by 0x4525786: (within /usr/lib/libX11.so.6.2.0)
==4796== by 0x4525A6E: _XNoticeCreateBitmap (in /usr/lib/libX11.so.6.2.0)
==4796== Address 0x47ba930 is 24 bytes inside a block of size 25 alloc'd
==4796== at 0x4022AB8: malloc (vg_replace_malloc.c:207)
==4796== by 0x4008021: (within /lib/ld-2.7.so)
==4796== by 0x4011533: (within /lib/ld-2.7.so)
==4796== by 0x400D5C5: (within /lib/ld-2.7.so)
==4796== by 0x4010F4D: (within /lib/ld-2.7.so)
==4796== by 0x4686C18: (within /lib/tls/i686/cmov/libdl-2.7.so)
==4796== by 0x400D5C5: (within /lib/ld-2.7.so)
==4796== by 0x46872BB: (within /lib/tls/i686/cmov/libdl-2.7.so)
==4796== by 0x4686B50: dlopen (in /lib/tls/i686/cmov/libdl-2.7.so)
==4796== by 0x4525786: (within /usr/lib/libX11.so.6.2.0)
==4796== by 0x4525A6E: _XNoticeCreateBitmap (in /usr/lib/libX11.so.6.2.0)
==4796== by 0x4525E6C: XCreatePixmap (in /usr/lib/libX11.so.6.2.0)
(II) Successfully loaded texture: dice1.bmp
(II) Successfully loaded texture: dice2.bmp
(II) Successfully loaded texture: dice3.bmp
(II) Successfully loaded texture: dice4.bmp
(II) Successfully loaded texture: dice5.bmp
(II) Successfully loaded texture: dice6.bmp
(II) StateMachine -> DiceIdlingState
(II) Successfully loaded texture: field1.bmp
==4796==
==4796== Syscall param writev(vector[...]) points to uninitialised byte(s)
==4796== at 0x40007F2: (within /lib/ld-2.7.so)
==4796== by 0x469DEC2: (within /usr/lib/libxcb.so.1.0.0)
==4796== by 0x469E4AA: (within /usr/lib/libxcb.so.1.0.0)
==4796== by 0x469ED49: xcb_send_request (in /usr/lib/libxcb.so.1.0.0)
==4796== by 0x454E040: _XPutXCBBuffer (in /usr/lib/libX11.so.6.2.0)
==4796== by 0x454F5DE: _XSend (in /usr/lib/libX11.so.6.2.0)
==4796== by 0x4443555: __glXFlushRenderBuffer (in /usr/lib/libGL.so.1.2)
==4796== by 0x4454553: (within /usr/lib/libGL.so.1.2)
==4796== by 0x4454798: (within /usr/lib/libGL.so.1.2)
==4796== by 0x8051B11: DisplayList::endPreDraw() (displaylist.h:120)
==4796== by 0x8052E67: BoardRenderer::BoardRenderer(Board&) (boardrenderer.cpp:19)
==4796== by 0x805F5B3: __real_main() (main.cpp:69)
==4796== Address 0x47792db is 963 bytes inside a block of size 262,132 alloc'd
==4796== at 0x4022AB8: malloc (vg_replace_malloc.c:207)
==4796== by 0x4441B7B: (within /usr/lib/libGL.so.1.2)
==4796== by 0x4442127: glXCreateContext (in /usr/lib/libGL.so.1.2)
==4796== by 0x4054644: sf::priv::WindowImplX11::CreateContext(sf::VideoMode const&, XVisualInfo&, sf::WindowSettings&, XVisualInfo, unsigned long) (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x4054943: sf::priv::WindowImplX11::WindowImplX11(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings&) (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x4050FD9: sf::priv::WindowImpl::New(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings&) (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x404EEEF: sf::Window::Create(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&) (in /usr/lib/libsfml-window.so.1.4)
==4796== by 0x4095048: sf::RenderWindow::RenderWindow(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&) (in /usr/lib/libsfml-graphics.so.1.4)
==4796== by 0x805F2DA: __real_main() (main.cpp:35)
==4796== by 0x8060007: main (main.cpp:11)
==4796==
==4796== Thread 2:
==4796== Conditional jump or move depends on uninitialised value(s)
==4796== at 0x805C9CC: Animation::setTime(float const&) (animation.h:27)
==4796== by 0x805DC36: Game::Run() (game.h:149)
==4796== by 0x40443E5: sf::Thread::ThreadFunc(void*) (in /usr/lib/libsfml-system.so.1.4)
==4796== by 0x44174FA: start_thread (in /lib/tls/i686/cmov/libpthread-2.7.so)
==4796== by 0x4398E5D: clone (in /lib/tls/i686/cmov/libc-2.7.so)
==4796==
==4796== Conditional jump or move depends on uninitialised value(s)
==4796== at 0x805CA19: Animation::setTime(float const&) (animation.h:30)
==4796== by 0x805DC36: Game::Run() (game.h:149)
==4796== by 0x40443E5: sf::Thread::ThreadFunc(void*) (in /usr/lib/libsfml-system.so.1.4)
==4796== by 0x44174FA: start_thread (in /lib/tls/i686/cmov/libpthread-2.7.so)
==4796== by 0x4398E5D: clone (in /lib/tls/i686/cmov/libc-2.7.so)
(II) StateMachine -> DiceRollingState
(II) StateMachine -> CounterMovementChoiceState
(EE) Failed to create texture, checking for GL error...
(EE) Failed to create texture
(EE) Unexpected exception, aborting
==4796==
==4796== ERROR SUMMARY: 9 errors from 5 contexts (suppressed: 63 from 1)
==4796== malloc/free: in use at exit: 715,406 bytes in 1,282 blocks.
==4796== malloc/free: 11,372 allocs, 10,090 frees, 2,278,733 bytes allocated.
==4796== For counts of detected errors, rerun with: -v
==4796== searching for pointers to 1,282 not-freed blocks.
==4796== checked 8,893,680 bytes.
==4796==
==4796== Thread 1:
==4796==
==4796== 48 bytes in 1 blocks are possibly lost in loss record 54 of 144
==4796== at 0x4023294: operator new(unsigned) (vg_replace_malloc.c:224)
==4796== by 0x806912A: __gnu_cxx::new_allocator<char>::allocate(unsigned, void const*) (new_allocator.h:91)
==4796== by 0x8069201: std::basic_string<unsigned, std::char_traits<unsigned>, std::allocator<unsigned> >::_Rep::_S_create(unsigned, unsigned, std::allocator<unsigned> const&) (basic_string.tcc:589)
==4796== by 0x806941C: std::basic_string<unsigned, std::char_traits<unsigned>, std::allocator<unsigned> >::_Rep::_M_clone(std::allocator<unsigned> const&, unsigned) (basic_string.tcc:611)
==4796== by 0x4044087: std::basic_string<unsigned, std::char_traits<unsigned>, std::allocator<unsigned> >::reserve(unsigned) (in /usr/lib/libsfml-system.so.1.4)
==4796== by 0x40423C8: sf::Unicode::Text::Text(std::string const&) (in /usr/lib/libsfml-system.so.1.4)
==4796== by 0x805FCE9: __real_main() (main.cpp:163)
==4796== by 0x8060007: main (main.cpp:11)
==4796==
==4796==
==4796== 144 bytes in 1 blocks are possibly lost in loss record 80 of 144
==4796== at 0x4021BDE: calloc (vg_replace_malloc.c:397)
==4796== by 0x4010617: (within /lib/ld-2.7.so)
==4796== by 0x40106DB: _dl_allocate_tls (in /lib/ld-2.7.so)
==4796== by 0x4417C3C: pthread_create@@GLIBC_2.1 (in /lib/tls/i686/cmov/libpthread-2.7.so)
==4796== by 0x40444CE: sf::Thread::Launch() (in /usr/lib/libsfml-system.so.1.4)
==4796== by 0x80642CB: Game::updateState(float const&, std::queue<sf::Event::KeyEvent, std::deque<sf::Event::KeyEvent, std::allocator<sf::Event::KeyEvent> > >&, std::queue<sf::Event::MouseButtonEvent, std::deque<sf::Event::MouseButtonEvent, std::allocator<sf::Event::MouseButtonEvent> > >&) (game.h:72)
==4796== by 0x805F9E1: __real_main() (main.cpp:123)
==4796== by 0x8060007: main (main.cpp:11)
==4796==
==4796==
==4796== 3,500 bytes in 87 blocks are possibly lost in loss record 130 of 144
==4796== at 0x4023294: operator new(unsigned) (vg_replace_malloc.c:224)
==4796== by 0x4232750: std::string::_Rep::_S_create(unsigned, unsigned, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.9)
==4796== by 0x4233984: (within /usr/lib/libstdc++.so.6.0.9)
==4796== by 0x4233B36: std::string::string(char const*, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.9)
==4796== by 0x805F4AE: __real_main() (main.cpp:65)
==4796== by 0x8060007: main (main.cpp:11)
==4796==
==4796==
==4796== 12,288 bytes in 1 blocks are definitely lost in loss record 140 of 144
==4796== at 0x4022F14: operator new[](unsigned) (vg_replace_malloc.c:26
==4796== by 0x806A0EC: Texture::loadFromBMP(std::string const&) (texture.cpp:65)
==4796== by 0x804F925: BoardFieldChoiceIndicator::BoardFieldChoiceIndicator(BoardPosition const&, bool) (boardfieldchoiceindicator.cpp:15)
==4796== by 0x8057188: CounterMovementChoiceState::spreadChoiceIndicators(BoardPosition const&, Snapshot&, short, short) (countermovementchoicestate.cpp:107)
==4796== by 0x8057D8B: CounterMovementChoiceState::onInit(Snapshot&) (countermovementchoicestate.cpp:11)
==4796== by 0x80688E8: StateMachine::updateToState(State*) (statemachine.cpp:23)
==4796== by 0x805B5E9: DiceRollingState::onAnimationEnd(Snapshot&, Animation&) (dicerollingstate.cpp:96)
==4796== by 0x805DCA6: Game::Run() (game.h:153)
==4796== by 0x40443E5: sf::Thread::ThreadFunc(void*) (in /usr/lib/libsfml-system.so.1.4)
==4796== by 0x44174FA: start_thread (in /lib/tls/i686/cmov/libpthread-2.7.so)
==4796== by 0x4398E5D: clone (in /lib/tls/i686/cmov/libc-2.7.so)
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 |
GLuint nTextureID = 0; glGenTextures (1, &nTextureID); if (!nTextureID) { std::cerr << "(EE) Failed to create texture, checking for GL error..." << std::endl; printError (__LINE__, __FILE__); throw new InitializationException (); } |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 |
float f = (fTime - m_fStartTime) / m_fDuration; if (f > 1.0f) f = 1.0f; // Die Meldung betrifft diese Zeile ... if (f < 0.0f) f = 0.0f; update (f); if (fTime >= m_fEndTime) // ... und diese. { m_bDone = true; } |
Werbeanzeige