#15 megaglest 3.6.0.2 crashes before the menu screen appears

closed-fixed
Mark Vejvoda
None
7
2012-01-22
2011-12-23
worldcitizen
No

I've build glest for openSUSE 12.1. When I run it i get an segfault.
It looks like it's caused by ftgl (2.1.3~rc5 ) I've also tried your precompiled version, that one showed the same result.
The rpm's can be found in http://download.opensuse.org/repositories/home:/worldcitizen:/test/openSUSE_12.1/ as for games glew is broken I've build against version 1.6.0 as this one is not broken.

Program received signal SIGSEGV, Segmentation fault.
0x000000000057a93d in Glest::Game::Renderer::getCentered3DPos (text=..., font=0xf6c620, pos=..., w=150, h=22, centeredW=true, centeredH=true, this=<optimized out>) at /usr/src/debug/megaglest-3.6.0.2/source/glest_game/graphics/renderer.cpp:2332
2332 float lineWidth = (font->getTextHandler()->Advance(text.c_str()) * Font::scaleFontValue);

megaglest-3.6.0.2/source/glest_game/graphics/renderer.cpp

2329
2330 Vec2f Renderer::getCentered3DPos(const string &text, Font3D *font, Vec2f &pos, int w, int h,bool centeredW, bool centeredH) {
2331 if(centeredW == true) {
2332 float lineWidth = (font->getTextHandler()->Advance(text.c_str()) * Font::scaleFontValue);
2333 if(lineWidth < w) {
2334 pos.x += ((w / 2.f) - (lineWidth / 2.f));
2335 }
2336 }
2337

I've attached a gdb file. I hope it's helpful.

If I need to test or try something please let me know.

Discussion

1 2 3 > >> (Page 1 of 3)
  • worldcitizen
    worldcitizen
    2011-12-23

    gdb file

     
    Attachments
  • worldcitizen
    worldcitizen
    2011-12-23

    • priority: 5 --> 7
     
  • Mark Vejvoda
    Mark Vejvoda
    2012-01-02

    Please run in verbose mode and pipe console output to a log file and attach its contents:

    ./megaglest --verbose >info.log

    Thanks

     
  • worldcitizen
    worldcitizen
    2012-01-05

    output of /usr/bin/megaglest --verbose >info.log

     
    Attachments
  • worldcitizen
    worldcitizen
    2012-01-05

    The error.log file assosiated with /usr/bin/megaglest --verbose >info.log

     
    Attachments
  • worldcitizen
    worldcitizen
    2012-01-05

    I've attached the info.log and the .megaglest/error.log file

     
  • Mark Vejvoda
    Mark Vejvoda
    2012-01-05

    Try editing english.lng and add the line:

    MEGAGLEST_FONT=$APPLICATIONDATAPATH/data/core/fonts/LinBiolinum_RB.ttf

    (or edit it to point to a path with the font file mentioned). There are numerous ways to handle this situation but I first want to confirm that the problem is that its not finding the proper font. Thanks. Also where does that font normally live. The game looks for this font be default then falls back to:

    tryFont = getenv("MEGAGLEST_FONT");

    CHECK_FONT_PATH("/usr/share/fonts/truetype/linux-libertine/LinLibertine_Re.ttf")
    CHECK_FONT_PATH("/usr/share/fonts/truetype/freefont/FreeSerif.ttf")
    CHECK_FONT_PATH("/usr/share/fonts/truetype/freefont/FreeSans.ttf")
    CHECK_FONT_PATH("/usr/share/fonts/truetype/freefont/FreeMono.ttf")

     
  • worldcitizen
    worldcitizen
    2012-01-05

    The problem is solved. I hadn't installed data/core/fonts of megaglest-source-embedded-3.6.0.2.tar.xz .

    I like the idea that removed packages like libircclient and libminiupnpc, the standard libs need to be used.

    I need to find out how to handle the fonts without usage of the megaglest-source-embedded tarball.

    openSUSE has for example font /usr/share/fonts/truetype/LinBiolinum_RB.otf (not ttf) in LinuxLibertine-5.1.3-2.1.1.noarch .

     
  • worldcitizen
    worldcitizen
    2012-01-05

    Thank you very much for your help. It's great megaglest is now fixed for openSUSE.

    Extra information the freefonts are found in freefont-0.20110523-4.1.3.noarch

    /usr/share/fonts/truetype/FreeMono.ttf
    /usr/share/fonts/truetype/FreeSans.ttf
    /usr/share/fonts/truetype/FreeSerif.ttf

    Might there way that megaglest can use the standard "Xorg" truetype fonts?

     
  • worldcitizen
    worldcitizen
    2012-01-05

    Patch I used so megaglest-source-embedded-3.6.0.2.tar.xz . doesn't need to be used

     
1 2 3 > >> (Page 1 of 3)