pioneerspacesim / pioneer

A game of lonely space adventure
https://pioneerspacesim.net
1.64k stars 380 forks source link

Assimp 5.4 importer error: Unable to open file "models/buildings/vlastan/Dome1LQ.obj". #5895

Closed undrwater closed 2 months ago

undrwater commented 2 months ago

Cloned from git, installed with Linux Cmake instructions.

Observed behaviour

Info: ver 20240710 on: Linux
Info: System Name: Linux
Host Name: apollo
Release(Kernel) Version: 6.10.4-gentoo
Kernel Build Timestamp: #3 SMP PREEMPT_DYNAMIC Wed Aug 14 14:17:27 PDT 2024
Machine Arch: x86_64
Domain Name: (none)
Info: Loaded mods:
Info: --------------------
Info: SDL Version (build) 2.30.3
Info: SDL Version (dynamic) 2.30.3
Info: SDL Versions match
Info: SDL_image Version (build): 2.8.2
Info: SDL_image Version (dynamic): 2.8.2
Info: SDL_image Versions match
Info: Assimp Version: 5.4.0
Info: FreeType Version: 2.13.3
Info: GLEW dynamic version: 2.0.0
Info: --------------------
Info: 
Info: SDL video driver used: x11
Info: Initialized OpenGL 3.1, with extensions, renderer
Info: Created shader vtxColor (address=0x55aabf877c10)
Info: Initializing joystick subsystem.
Info: Loaded PiGui fonts from disk:
Info: font console:0
Info:   - Inpionata.ttf 1
Info:   - DejaVuSansMono.ttf 1.2
Info:   - wqy-microhei.ttc 1
Info:   - icons/icons.svg 16x19
Info: font icons:0
Info:   - PionilliumText22L-Medium.ttf 1
Info:   - icons/icons.svg 16x19
Info: font orbiteer:0
Info:   - Orbiteer-Bold.ttf 1
Info:   - DejaVuSans.ttf 1.2
Info:   - wqy-microhei.ttc 1
Info:   - icons/icons.svg 16x19
Info: font pionillium:0
Info:   - PionilliumText22L-Medium.ttf 1
Info:   - DejaVuSans.ttf 0.9285714
Info:   - wqy-microhei.ttc 1
Info:   - icons/icons.svg 16x19
Info: Created shader ui (address=0x55aabf8b6fc0)
Info: Created shader gen_gas_giant_colour (address=0x55aabf821a10)
Warning: Commodity rubbish has invalid producing economy ALL
Info: Loaded economy info: 3 economies, 31 commodities (10 consumable)
Info: started 15 worker threads in 0.28ms
Info: 

Engine startup took 301.87ms
Info: StartupScreen::Start()
Info: ShipType::Init()
Info: Lua::Init()
Info: Lua 5.2
Warning: No SVG data available to rasterize icon font icons/icons.svg
Info: Loading [00%]: Sound::Init started
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.12/work/alsa-lib-1.2.12/src/pcm/pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
Info: Could not open audio device: ALSA: Couldn't open audio device: No such file or directory
Info: Loading [00%]: Sound::Init took 6.57ms
Info: Loading [08%]: Lua::InitModules() started
Info: Ship Def found: kanara_civ
Info: Ship Def found: missile_guided
Info: Ship Def found: missile_naval
Info: Ship Def found: bluenose
Info: Ship Def found: skipjack
Info: Ship Def found: lodos
Info: Ship Def found: coronatrix
Info: Ship Def found: molaramsayi
Info: Ship Def found: varada
Info: Ship Def found: xylophis
Info: Ship Def found: natrix
Info: Ship Def found: dsminer
Info: Ship Def found: deneb
Info: Ship Def found: missile_unguided
Info: Ship Def found: wave
Info: Ship Def found: venturestar
Info: Ship Def found: pumpkinseed_police
Info: Ship Def found: lunarshuttle
Info: Ship Def found: vatakara
Info: Ship Def found: molamola
Info: Ship Def found: pumpkinseed
Info: Ship Def found: malabar
Info: Ship Def found: sinonatrix
Info: Ship Def found: sinonatrix_police
Info: Ship Def found: nerodia
Info: Ship Def found: coronatrix_police
Info: Ship Def found: storeria
Info: Ship Def found: ac33
Info: Ship Def found: kanara
Info: Ship Def found: missile_smart
Info: Ship Def found: bowfin
Info: 31
Info: Loading [08%]: Lua::InitModules() took 32.02ms
Info: Loading [17%]: GalaxyGenerator::Init() started
Info: Creating new galaxy generator 'legacy' version 1
Info: Warning: 'mass' is 0.000000 for body 'Themisto'
Info: Warning: 'averageTemp' is 0 for body 'Uluru'
Info: Warning: 'averageTemp' is 0 for body 'Francesca'
Info: Warning: 'averageTemp' is 0 for body 'Penny'
Info: Warning: 'averageTemp' is 0 for body 'Beth'
Info: Warning: 'averageTemp' is 0 for body 'Kata Tjuta'
Info: Warning: 'averageTemp' is 0 for body 'Sagittarius A*'
Info: Warning: 'averageTemp' is 0 for body 'Terminus'
Info: Warning: 'mass' is 0.000000 for body 'Lucksmall'
Info: Number of factions added: 103
Info: StarSystemCache: misses: 0, slave hits: 0, master hits: 0
Info: SectorCache: misses: 101, slave hits: 0, master hits: 2
Info: Loading [17%]: GalaxyGenerator::Init() took 7.22ms
Info: Loading [25%]: FaceParts::Init() started
Info: Face Generation source images loaded.
Info: Loading [25%]: FaceParts::Init() took 0.77ms
Info: Loading [33%]: new ModelCache started
Info: Loading [33%]: new ModelCache took 0.00ms
Info: Loading [42%]: Shields::Init started
Info: Created shader shield (address=0x55aac18db0a0)
Info: Loading [42%]: Shields::Init took 0.34ms
Info: Loading [50%]: BaseSphere::Init started
Info: GenerateIndices: triangles count = 648, mid indexes = 1728, hi edges = 54
Info: Loading [50%]: BaseSphere::Init took 24.65ms
Info: Loading [58%]: CityOnPlanet::Init started
Info: Loading city definition file 'configs/buildings/default.json'
Info: Created shader multi (address=0x55aac18698c0)
Info: models/buildings/vlastan/Dome1LQ.obj:
Assimp 5.4 importer error: Unable to open file "models/buildings/vlastan/Dome1LQ.obj".
Info: Could not find model: Dome1
Fatal: Could not find placeholder model

GUI starts, but a popup with "Could not find placeholder" error with an "OK" button shows twice. After clicking the error button twice, game quits.

Expected behaviour

Game starts.

Steps to reproduce

Compile git clone, run game.

My pioneer version (and OS): Pioneer from git on Gentoo 6.10.4 kernel

My output.txt (required) and game save (optional, but recommended)

Web-eWorks commented 2 months ago

From the working directory you are running the game from, can you confirm that the file ./data/models/buildings/vlastan/Dome1LQ.obj exists? It is present in Github, so I suspect the game is loading its data directory from a much older system-wide installation of Pioneer (which ships with precompiled .SGM files instead of .obj/.dae files.)

undrwater commented 2 months ago

Thanks for your reply. I had made a system wide installation on an older machine, but not this one. Searched for any *.sgm(SGM) files and found none.

Started from scratch from a git clone. I got a different but similar error (startup UI displays, but an "OK" popup shows "Error while loading space station data (check stdout/output.txt")"

Built target profiler
Built target lz4
Built target fmt
Built target nanosockets
Built target pioneer-core
Built target pioneer-lib
Built target lua
Built target pioneer-lua
Built target glew
Built target imgui
Built target jenkins
Built target picodds
Built target pioneer
Built target unittest
Built target modelcompiler
Built target savegamedump
Built target pioneer-editor
Built target editor
Info: ver 20240710 (4b2edb12f) on: Linux
Info: System Name: Linux
Host Name: apollo
Release(Kernel) Version: 6.10.6-gentoo
Kernel Build Timestamp: #1 SMP PREEMPT_DYNAMIC Thu Aug 22 14:54:00 PDT 2024
Machine Arch: x86_64
Domain Name: (none)
Info: Loaded mods:
Info: --------------------
Info: SDL Version (build) 2.30.3
Info: SDL Version (dynamic) 2.30.3
Info: SDL Versions match
Info: SDL_image Version (build): 2.8.2
Info: SDL_image Version (dynamic): 2.8.2
Info: SDL_image Versions match
Info: Assimp Version: 5.4.0
Info: FreeType Version: 2.13.3
Info: GLEW dynamic version: 2.0.0
Info: --------------------
Info: 
Info: SDL video driver used: x11
Info: Initialized OpenGL 3.1, with extensions, renderer
Info: Created shader vtxColor (address=0x55e9eec74860)
Info: Initializing joystick subsystem.
Info: Loaded PiGui fonts from disk:
Info: font console:0
Info:   - Inpionata.ttf 1
Info:   - DejaVuSansMono.ttf 1.2
Info:   - wqy-microhei.ttc 1
Info:   - icons/icons.svg 16x20
Info: font icons:0
Info:   - PionilliumText22L-Medium.ttf 1
Info:   - icons/icons.svg 16x20
Info: font orbiteer:0
Info:   - Orbiteer-Bold.ttf 1
Info:   - DejaVuSans.ttf 1.2
Info:   - wqy-microhei.ttc 1
Info:   - icons/icons.svg 16x20
Info: font pionillium:0
Info:   - PionilliumText22L-Medium.ttf 1
Info:   - DejaVuSans.ttf 0.9285714
Info:   - wqy-microhei.ttc 1
Info:   - icons/icons.svg 16x20
Info: Created shader ui (address=0x55e9eec5da70)
Info: Created shader gen_gas_giant_colour (address=0x55e9eebc3b30)
Warning: Commodity rubbish has invalid producing economy ALL
Info: Loaded economy info: 3 economies, 31 commodities (10 consumable)
Info: started 15 worker threads in 0.23ms
Info: 

Engine startup took 196.50ms
Info: StartupScreen::Start()
Info: ShipType::Init()
Info: Lua::Init()
Info: Lua 5.2
Warning: No SVG data available to rasterize icon font icons/icons.svg
Info: Loading [00%]: Sound::Init started
Info: Loading [00%]: Sound::Init took 6.80ms
Info: Loading [08%]: Lua::InitModules() started
Info: Ship Def found: wave
Info: Ship Def found: missile_smart
Info: Ship Def found: varada
Info: Ship Def found: missile_guided
Info: Ship Def found: xylophis
Info: Ship Def found: venturestar
Info: Ship Def found: deneb
Info: Ship Def found: lodos
Info: Ship Def found: vatakara
Info: Ship Def found: malabar
Info: Ship Def found: storeria
Info: Ship Def found: coronatrix
Info: Ship Def found: skipjack
Info: Ship Def found: dsminer
Info: Ship Def found: missile_unguided
Info: Ship Def found: ac33
Info: Ship Def found: sinonatrix_police
Info: Ship Def found: pumpkinseed_police
Info: Ship Def found: sinonatrix
Info: Ship Def found: pumpkinseed
Info: Ship Def found: natrix
Info: Ship Def found: nerodia
Info: Ship Def found: coronatrix_police
Info: Ship Def found: bowfin
Info: Ship Def found: bluenose
Info: Ship Def found: kanara_civ
Info: Ship Def found: kanara
Info: Ship Def found: molaramsayi
Info: Ship Def found: missile_naval
Info: Ship Def found: molamola
Info: Ship Def found: lunarshuttle
Info: 31
Info: Loading [08%]: Lua::InitModules() took 34.21ms
Info: Loading [17%]: GalaxyGenerator::Init() started
Info: Creating new galaxy generator 'legacy' version 1
Info: Warning: 'mass' is 0.000000 for body 'Themisto'
Info: Warning: 'averageTemp' is 0 for body 'Uluru'
Info: Warning: 'averageTemp' is 0 for body 'Francesca'
Info: Warning: 'averageTemp' is 0 for body 'Penny'
Info: Warning: 'averageTemp' is 0 for body 'Beth'
Info: Warning: 'averageTemp' is 0 for body 'Kata Tjuta'
Info: Warning: 'averageTemp' is 0 for body 'Sagittarius A*'
Info: Warning: 'averageTemp' is 0 for body 'Terminus'
Info: Warning: 'mass' is 0.000000 for body 'Lucksmall'
Info: Number of factions added: 103
Info: StarSystemCache: misses: 0, slave hits: 0, master hits: 0
Info: SectorCache: misses: 101, slave hits: 0, master hits: 2
Info: Loading [17%]: GalaxyGenerator::Init() took 7.51ms
Info: Loading [25%]: FaceParts::Init() started
Info: Face Generation source images loaded.
Info: Loading [25%]: FaceParts::Init() took 0.80ms
Info: Loading [33%]: new ModelCache started
Info: Loading [33%]: new ModelCache took 0.00ms
Info: Loading [42%]: Shields::Init started
Info: Created shader shield (address=0x55e9f0cebb10)
Info: Loading [42%]: Shields::Init took 0.29ms
Info: Loading [50%]: BaseSphere::Init started
Info: GenerateIndices: triangles count = 648, mid indexes = 1728, hi edges = 54
Info: Loading [50%]: BaseSphere::Init took 22.86ms
Info: Loading [58%]: CityOnPlanet::Init started
Info: Loading city definition file 'configs/buildings/default.json'
Info: Created shader multi (address=0x55e9f0d0de70)
Info: CreateCollisionMesh for : (Dome1)
Info: CreateCollisionMesh for : (Dome2)
Info: CreateCollisionMesh for : (Library)
Info: CreateCollisionMesh for : (Mall)
Info: CreateCollisionMesh for : (Tower1)
Info: CreateCollisionMesh for : (Tower2)
Info: CreateCollisionMesh for : (kbuilding01)
Info: CreateCollisionMesh for : (kbuilding02)
Info: CreateCollisionMesh for : (kbuilding03)
Info: CreateCollisionMesh for : (newbuilding1)
Info: CreateCollisionMesh for : (newbuilding10)
Info: CreateCollisionMesh for : (newbuilding11)
Info: CreateCollisionMesh for : (newbuilding2)
Info: CreateCollisionMesh for : (newbuilding3)
Info: CreateCollisionMesh for : (newbuilding4)
Info: CreateCollisionMesh for : (newbuilding5)
Info: CreateCollisionMesh for : (newbuilding6)
Info: CreateCollisionMesh for : (newbuilding7)
Info: CreateCollisionMesh for : (newbuilding8)
Info: CreateCollisionMesh for : (newbuilding9)
Info:   Created city definition flavour #1
Info: Loading [58%]: CityOnPlanet::Init took 113.07ms
Info: Loading [67%]: SpaceStation::Init started
Info: models/stations/ground_station/starport_lo.dae:
Assimp 5.4 importer error: No suitable reader found for the file format of file "models/stations/ground_station/starport_lo.dae".
Info: Could not find model: ground_station
Info: couldn't initialize station type 'stations/ground_station.json' because the corresponding model ('ground_station') could not be found.
Fatal: Error while loading Space Station data (check stdout/output.txt).

There is no stdout/output.txt. The file "models/stations/ground_station/starport_lo.dae" is in data/models/stations/ground_station/ I've installed in /usr/local/share, and put the directory in the "games" group, of which my user is a member.

Hope this is useful, and thank you so much!

Web-eWorks commented 2 months ago

Note that you do not need to install the game to play it - you can run it from the directory you cloned it into without needing to make a system-wide install.

However, in this case I'm seeing that you're now running into the same issue as #5832. You can see the build configuration file for Gentoo's Assimp 5.4 here - Gentoo still explicitly disables Collada support in libassimp.

I'm not a Gentoo user, but if you can rebuild libassimp with the Collada importer enabled or compile against pioneer-thirdparty you should be able to play the game. Alternately, the versions of Pioneer generated via Github Actions have precompiled models and libassimp is otherwise unneeded if running one of those builds.

undrwater commented 2 months ago

Thanks! Commenting the collada lines and rebuilding assimp allowed the game to run. I'll post on the gentoo bug tracker to see if there's a specific reason for disabling collada in assimp.

Appreciate the help!