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 - waleed mujeeb

Pages: [1]
1
General / SF:Font Crashing
« on: May 12, 2013, 10:04:25 am »
IDE: CodeBlocks 12.11
Compiler: MingW shipped with CodeBlocks
OS: Win7-64bit
API: SFML-2.0-32bit-SJLJ
Linking: Tried both Static/Dynamic with debug libs

I re-compiled my previously working sfml-2.0-RC project with SFML-2.0 stable. It crashes at any sf:font code. Here's the debug call stack. I tried arial and some-other fonts but no luck.

Note: In tutorials, the author says to check mingW folder for libgcc_s_sjlj-1.dll or libgcc_s_dw2-1.dll. Mine has both.

#0 68F9A954   std::less<unsigned int>::operator() (this=0x28e340, __x=@0x16: <error reading variable>, __y=@0x28ee70: 12) (d:/programmes/mingw-tdm32-4.7/bin/../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_function.h:237)

#1 68FE1540   std::_Rb_tree<unsigned int, std::pair<unsigned int const, sf::Font::Page>, std::_Select1st<std::pair<unsigned int const, sf::Font::Page> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, sf::Font::Page> > >::_M_lower_bound(this=0x28e340, __x=0x6, __y=0x5b4b518, __k=@0x28ee70: 12) (d:/programmes/mingw-tdm32-4.7/bin/../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_tree.h:1098)

#2 68FE12A0   std::_Rb_tree<unsigned int, std::pair<unsigned int const, sf::Font::Page>, std::_Select1st<std::pair<unsigned int const, sf::Font::Page> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, sf::Font::Page> > >::lower_bound(this=0x28e340, __k=@0x28ee70: 12) (d:/programmes/mingw-tdm32-4.7/bin/../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_tree.h:835)

#3 68FDC295   std::map<unsigned int, sf::Font::Page, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, sf::Font::Page> > >::lower_bound(this=0x28e340, __x=@0x28ee70: 12) (d:/programmes/mingw-tdm32-4.7/bin/../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_map.h:791)

#4 68FDC443   std::map<unsigned int, sf::Font::Page, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, sf::Font::Page> > >::operator[](this=0x28e340, __k=@0x28ee70: 12) (d:/programmes/mingw-tdm32-4.7/bin/../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_map.h:455)

#5 68EC23F0   sf::Font::getTexture(this=0x28e330, characterSize=12) (D:\developpement\sfml\sfml\src\SFML\Graphics\Font.cpp:310)

#6 68EDEF01   sf::Text::draw(this=0x6773fa8, target=..., states=...) (D:\developpement\sfml\sfml\src\SFML\Graphics\Text.cpp:219)

#7 68ED5445   sf::RenderTarget::draw(this=0x4990a0, drawable=..., states=...) (D:\developpement\sfml\sfml\src\SFML\Graphics\RenderTarget.cpp:146)

#8 00405358   _fu5___ZN2sf12RenderStates7DefaultE() (D:\Programming\Projects\SE1-Proj-(May-11-13)(6-25-PM)\Test\Gui_Button.cpp:63)

#9 00407B3E   _fu6___ZN2sf12RenderStates7DefaultE() (D:\Programming\Projects\SE1-Proj-(May-11-13)(6-25-PM)\Test\Level_Editor.cpp:179)

#10 0040B69F   Level_Editor::run(this=0x28f140) (D:\Programming\Projects\SE1-Proj-(May-11-13)(6-25-PM)\Test\Level_Editor.cpp:704)

#11 0040BF19   main() (D:\Programming\Projects\SE1-Proj-(May-11-13)(6-25-PM)\Test\Main.cpp:131)

2
Audio / Re: setBuffer Issue
« on: April 04, 2013, 10:16:48 pm »
Thanks. reserve function worked.

3
Audio / setBuffer Issue
« on: April 04, 2013, 10:07:11 pm »
IDE: CodeBlocks 10.05
Compiler: GCC 4.6.2
OS: WinXp 32bit
Language: C++
API: SFML-2.0-rc-win32-mingW-dw2
Linking: Static with sfml debug libs
 std::vector<sf::SoundBuffer> sound_buffer;
 std::vector<sf::Sound> sound;
int i=0;
 while(!file.eof())
    {
       file>>state;
        file>>file_name;
         sound_buffer.push_back(sf::SoundBuffer());
         sound_buffer[i].loadFromFile(dir+file_name)
       sound.push_back(sf::Sound());
      sound[i].setBuffer(sound_buffer[i]);
       ++i;
    }
 
Problem: I am making a small game. file has state name with associated sound_file.
eg. DIE death.wav
     SHOOT shoot.wav

For some reason,except for some, most of the elements in sound vector are set to NULL. So they dont play.
If i change above code to this, it starts to work without any problem

while(!file.eof())
    {
       file>>state;
        file>>file_name;
         sound_buffer.push_back(sf::SoundBuffer());
         sound_buffer[i].loadFromFile(dir+file_name)
         ++i;
    }

for(int i=0; i!=sound_buffer.size(); ++i)
{
        sound.push_back(sf::Sound());
      sound[i].setBuffer(sound_buffer[i]);
}
 
I cant seem to figure out why it doesnt work in the first code. I could use a hint.

4
General / Running Tutorial Program
« on: March 03, 2012, 07:14:20 am »
I ran the tutorial graphicsFont program but the output is some ASCII values in DOS window with CPU sound beeps? Using Visual C++ 2008 with Full SDK SFML 1.6.

By the way the window program works fine.

Pages: [1]
anything