Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load game on Arch Linux #118

Closed
zapateo opened this issue May 16, 2015 · 14 comments
Closed

Can't load game on Arch Linux #118

zapateo opened this issue May 16, 2015 · 14 comments

Comments

@zapateo
Copy link

zapateo commented May 16, 2015

I compiled the game with the make command and everything works right. When I start the game I can see the intro screens and the main menu but when I try to start any of game mode the window closes and I get this error:

  chaoticrage: /build/assimp/src/assimp-3.1.1/code/Importer.cpp:738: const aiScene* Assimp::Importer::ApplyPostProcessing(unsigned int): Assertion `_ValidateFlags(pFlags)' failed.

and it creates a core dump.
I compiled using both assimp library from Pacman and the one I downloaded using the ./tools/linux/assimp.sh, getting the same result.

EDIT: Uninstalling the assimp library installed through Pacman and using the one provided with source code I get a malloc() error after starting the game

@esper
Copy link
Collaborator

esper commented May 16, 2015

Thank you for taking the time to report this issue!

I can re-produce the fault with assimp-3.1.1 with Ubuntu, created issue #119 for this.

I have no problem running the assimp version provided with the assimp.sh script with Ubuntu 15.04. If you have the time, could you please build with 'make DEBUG=1' and run with GDB (gdb ./chaoticrage) to provide the backtraces ('where' after crash)?

@zapateo
Copy link
Author

zapateo commented May 17, 2015

You're welcome, I hope this output will be useful:
Output of GDB when clicking on "Start single player game"

chaoticrage: /build/assimp/src/assimp-3.1.1/code/Importer.cpp:738: const aiScene* Assimp::Importer::ApplyPostProcessing(unsigned int): Assertion `_ValidateFlags(pFlags)' failed.
[New Thread 0x7fffe79e9700 (LWP 2336)]

Program received signal SIGABRT, Aborted.
0x00007ffff43094b7 in raise () from /usr/lib/libc.so.6

And this is the stack backtrace

#0  0x00007ffff43094b7 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff430a88a in abort () from /usr/lib/libc.so.6
#2  0x00007ffff430241d in __assert_fail_base () from /usr/lib/libc.so.6
#3  0x00007ffff43024d2 in __assert_fail () from /usr/lib/libc.so.6
#4  0x00007ffff5c4bb5d in Assimp::Importer::ApplyPostProcessing(unsigned int) ()
   from /usr/lib/libassimp.so.3
#5  0x00007ffff5c4d082 in Assimp::Importer::ReadFile(char const*, unsigned int) ()
   from /usr/lib/libassimp.so.3
#6  0x00007ffff5c4f04d in Assimp::Importer::ReadFileFromMemory(void const*, unsigned long, unsigned int, char const*) () from /usr/lib/libassimp.so.3
#7  0x00000000004607d2 in AssimpModel::load (this=this@entry=0x2e1eb50, render=0x787d70, 
    meshdata=meshdata@entry=true, loadtype=loadtype@entry=AssimpLoadMapMesh)
    at src/render_opengl/assimpmodel.cpp:98
#8  0x00000000004332ac in Map::load (this=this@entry=0xae44bf0, name="therlor_valley", 
    render=render@entry=0x787d70, insideof=insideof@entry=0x0) at src/map/map.cpp:385
#9  0x000000000041906d in GameManager::startGame (this=0xa82ea0, map=map@entry=0x79c86b0, 
    gametype="zombies", unittype="robot", viewmode=viewmode@entry=GameSettings::behindPlayer, 
    num_local=num_local@entry=1, host=false, gs=0xac48300) at src/game_manager.cpp:242
#10 0x0000000000462d44 in Menu::startGame (this=0xa832d0, map=0x79c86b0, gametype="zombies", 
    unittype="robot", viewmode=viewmode@entry=GameSettings::behindPlayer, num_local=num_local@entry=1, 
    host=false, gs=0xac48300) at src/render_opengl/menu.cpp:541
#11 0x000000000049f7b9 in DialogNewGame::action (this=0x8fb0fe0, actionEvent=...)
    at src/gui/newgame.cpp:164
#12 0x00000000004b5464 in gcn::Widget::distributeActionEvent (this=this@entry=0xa9fb520)
    at src/guichan/widget.cpp:713
#13 0x00000000004c645a in gcn::Button::mouseReleased (this=0xa9fb520, mouseEvent=...)
    at src/guichan/widgets/button.cpp:238
#14 0x00000000004b8a30 in gcn::Gui::distributeMouseEvent (this=this@entry=0x5101190, 
    source=source@entry=0xa9fb520, type=type@entry=2, button=<optimized out>, x=x@entry=420, 
    y=y@entry=415, force=false, toSourceOnly=false) at src/guichan/gui.cpp:746
#15 0x00000000004b7c17 in gcn::Gui::handleMouseReleased (this=0x5101190, mouseInput=...)
    at src/guichan/gui.cpp:600
#16 0x00000000004b816e in gcn::Gui::handleMouseInput (this=0x5101190) at src/guichan/gui.cpp:234
#17 0x00000000004b75ef in gcn::Gui::logic (this=0x5101190) at src/guichan/gui.cpp:146
#18 0x0000000000466131 in Menu::updateUI (this=0xa832d0) at src/render_opengl/menu.cpp:323
#19 0x0000000000463a3c in Menu::doit (this=this@entry=0xa832d0, ui=ui@entry=0x0)
    at src/render_opengl/menu.cpp:174
#20 0x000000000040cbb9 in main (argc=<optimized out>, argv=0x7fffffffe828) at src/client.cpp:138

Stack backtrace when clicking on "Start campaign game"

#0  0x00007ffff43094b7 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff430a88a in abort () from /usr/lib/libc.so.6
#2  0x00007ffff430241d in __assert_fail_base () from /usr/lib/libc.so.6
#3  0x00007ffff43024d2 in __assert_fail () from /usr/lib/libc.so.6
#4  0x00007ffff5c4bb5d in Assimp::Importer::ApplyPostProcessing(unsigned int) ()
   from /usr/lib/libassimp.so.3
#5  0x00007ffff5c4d082 in Assimp::Importer::ReadFile(char const*, unsigned int) ()
   from /usr/lib/libassimp.so.3
#6  0x00007ffff5c4f04d in Assimp::Importer::ReadFileFromMemory(void const*, unsigned long, unsigned int, char const*) () from /usr/lib/libassimp.so.3
#7  0x00000000004607d2 in AssimpModel::load (this=this@entry=0x37b9f50, render=0x787d70, 
    meshdata=meshdata@entry=true, loadtype=loadtype@entry=AssimpLoadMapMesh)
    at src/render_opengl/assimpmodel.cpp:98
#8  0x00000000004332ac in Map::load (this=this@entry=0xae546e0, name="therlor_valley", 
    render=render@entry=0x787d70, insideof=insideof@entry=0x0) at src/map/map.cpp:385
#9  0x000000000041906d in GameManager::startGame (this=this@entry=0xa82d40, map=map@entry=0x8ff8cf0, 
    gametype="zombies", unittype="robot", viewmode=viewmode@entry=GameSettings::behindPlayer, 
    num_local=num_local@entry=1, host=false, gs=0x8f2a7a0) at src/game_manager.cpp:242
#10 0x000000000041981f in GameManager::startCampaign (this=0xa82d40, c=c@entry=0x1268810, 
    unittype="robot", viewmode=viewmode@entry=GameSettings::behindPlayer, num_local=num_local@entry=1)
    at src/game_manager.cpp:141
#11 0x0000000000462c70 in Menu::startCampaign (this=0xa83170, c=0x1268810, unittype="robot", 
    viewmode=viewmode@entry=GameSettings::behindPlayer, num_local=num_local@entry=1)
    at src/render_opengl/menu.cpp:527
#12 0x00000000004a603e in DialogNewCampaign::action (this=0x8f3b140, actionEvent=...)
    at src/gui/newcampaign.cpp:123
#13 0x00000000004b5464 in gcn::Widget::distributeActionEvent (this=this@entry=0x8fcac10)
    at src/guichan/widget.cpp:713
#14 0x00000000004c645a in gcn::Button::mouseReleased (this=0x8fcac10, mouseEvent=...)
    at src/guichan/widgets/button.cpp:238
#15 0x00000000004b8a30 in gcn::Gui::distributeMouseEvent (this=this@entry=0x85c4120, 
    source=source@entry=0x8fcac10, type=type@entry=2, button=<optimized out>, x=x@entry=372, 
    y=y@entry=372, force=false, toSourceOnly=false) at src/guichan/gui.cpp:746
#16 0x00000000004b7c17 in gcn::Gui::handleMouseReleased (this=0x85c4120, mouseInput=...)
    at src/guichan/gui.cpp:600
#17 0x00000000004b816e in gcn::Gui::handleMouseInput (this=0x85c4120) at src/guichan/gui.cpp:234
#18 0x00000000004b75ef in gcn::Gui::logic (this=0x85c4120) at src/guichan/gui.cpp:146
#19 0x0000000000466131 in Menu::updateUI (this=0xa83170) at src/render_opengl/menu.cpp:323
#20 0x0000000000463a3c in Menu::doit (this=this@entry=0xa83170, ui=ui@entry=0x0)
    at src/render_opengl/menu.cpp:174
#21 0x000000000040cbb9 in main (argc=<optimized out>, argv=0x7fffffffe828) at src/client.cpp:138

@TheJosh
Copy link
Owner

TheJosh commented May 17, 2015

This stacktrace looks a lot like #119 so when we fix that, this will probably work for you.

It looks like it only affects custom map meshes, which have different load flags than the 3D models.

Can you try the lakeside map? It doesn't have any custom meshes.

@zapateo
Copy link
Author

zapateo commented May 17, 2015

Thanks a lot for the hint, it works perfectly with Lakeside map.
I will wait patiently for the fix update!

@esper
Copy link
Collaborator

esper commented May 17, 2015

@zapateo thanks for the logs! Could you also provide the stacktraces for the malloc() error with assimp 3.0?

esper added a commit that referenced this issue May 17, 2015
…ces flag.

'aiProcess_OptimizeGraph' and 'aiProcess_PreTransformVertices' cannot be used at the
same time.

This might not be the best solution, but fixes the assimp 3.1.1 assertion
for custom map meshes.

TODO: Zombies are not visible when using assimp 3.1.1.
@TheJosh
Copy link
Owner

TheJosh commented May 18, 2015

Hi @zapateo, I've found and fixed the bug which was breaking Assimp 3.1.1. Can you confirm that the game is now operational for you?

@zapateo
Copy link
Author

zapateo commented May 18, 2015

@esper I'm sorry (and at the same time happy), I'm not getting the malloc() error anymore
Anyway, the games runs perfectly now! @TheJosh
In order to compile and run it on 64 bit Arch Linux, I had to:

  1. Uninstall assimp (v. 3.1.1-1) installed via Pacman with
 # pacman -R assimp
  1. Install the assimp library with the tool provided with the source code

    ./tools/linux/assimp.sh

  2. Export the PKG_CONFIG_PATH variable

    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

  3. Compile the game

    make

  4. Export the LD_LIBRARY_PATH

    export LD_LIBRARY_PATH=/usr/local/lib/

I'm not an experienced programmer, so maybe there is a better way to do this; anyway, I'm glad to help you with further informations or tests if you need them. Thanks a lot for the fix!

@TheJosh
Copy link
Owner

TheJosh commented May 18, 2015

That is odd. You shouldn't need all those steps, in fact the installation
of assimp using pacman should now work, as that is installing the same
version of assimp as the assimp.sh script.

I might set up an Arch test VM and have a fiddle.
On 18/05/2015 5:00 PM, "zapateo" notifications@github.com wrote:

@esper https://github.com/esper I'm sorry (and at the same time happy),
I'm not getting the malloc() error anymore
Anyway, the games runs perfectly now! @TheJosh
https://github.com/TheJosh
In order to compile and run it on 64 bit Arch Linux, I had to:

  1. Uninstall assimp (v. 3.1.1-1) installed via Pacman with

pacman -R assimp

Install the assimp library with the tool provided with the source code

./tools/linux/assimp.sh
2.

Export the PKG_CONFIG_PATH variable

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
3.

Compile the game

make
4.

Export the LD_LIBRARY_PATH

export LD_LIBRARY_PATH=/usr/local/lib/

I'm not an experienced programmer, so maybe there is a better way to do
this; anyway, I'm glad to help you with further informations or tests if
you need them. Thanks a lot for the fix!

Reply to this email directly or view it on GitHub
#118 (comment)
.

@zapateo
Copy link
Author

zapateo commented May 18, 2015

I'm going to make another test, I'll tell you the results very soon

@zapateo
Copy link
Author

zapateo commented May 18, 2015

Ok, I can confirm that now it works even with Assimp installed with Pacman;
I'm so sorry, clearly I have done something wrong "playing" with libraries installation: I've tried with a clean enviroment and everything worked fine!

@TheJosh
Copy link
Owner

TheJosh commented May 18, 2015

Fantastic.

@TheJosh TheJosh closed this as completed May 18, 2015
@zapateo
Copy link
Author

zapateo commented May 18, 2015

Thanks a lot guys!

@TheJosh
Copy link
Owner

TheJosh commented May 18, 2015

Thank you for all of your bug report and stack traces. It's been a huge help!

@zapateo
Copy link
Author

zapateo commented May 18, 2015

You're welcome, keep on developing with love this awesome game!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants