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

The Saigo-built arm nexe crashes #3297

Closed
illwieckz opened this issue Jan 17, 2025 · 12 comments · Fixed by DaemonEngine/Daemon#1516
Closed

The Saigo-built arm nexe crashes #3297

illwieckz opened this issue Jan 17, 2025 · 12 comments · Fixed by DaemonEngine/Daemon#1516
Labels
A-Build When the code doesn't compile, or worse, compiles wrong T-Bug

Comments

@illwieckz
Copy link
Member

It prints some garbage then crashes:

InitGame: \g_maxGameClients\0\g_needpass\0\g_BPInitialBudget\80\g_unlagged\1\g_BPInitialBudgetAliens\-1\g_BPInitialBudgetHumans\-1\g_BPBudgetPerMiner\50\sv_hostname\Unvanquished 0.55.2 Server\mapname\plat23\version\Unvanquished 0.55.2 Linux arm64 Jan 17 2025\pakname\map-plat23\sv_maxclients\20\sv_maxRate\0\g_BPRecoveryRateHalfLife\10\sv_privateClients\0\protocol\86\sv_floodProtect\0\timelimit\45\version.daemon.abi\0.55\g_devolveMaxBaseDistance\1000\gamename\base\g_unlockableMinTime\30\g_momentumHalfLife\5\g_BPRecoveryInitialRate\16
RealTime: 2025-01-17 05:46:12 Z
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: config var w_abuild_blobSlowTime was not defined
Warn: config var w_abuild_blobSpeed was not defined
Warn: config var w_abuild_blobSpeedMod was not defined
Warn: config var w_abuild_clawDmg was not defined
Warn: config var w_abuild_clawRange was not defined
Warn: config var w_abuild_clawWidth was not defined
Warn: config var w_blaster_speed was not defined
Warn: config var w_chaingun_damage was not defined
Warn: config var w_chaingun_spread was not defined
Warn: config var w_flamer_igniteChance was not defined
Warn: config var w_flamer_igniteRadius was not defined
Warn: config var w_flamer_igniteSplChance was not defined
Warn: config var w_flamer_lag was not defined
Warn: config var w_flamer_size was not defined
Warn: config var w_flamer_speed was not defined
Warn: config var w_lcannon_chargeAmmo was not defined
Warn: config var w_lcannon_chargeTimeMax was not defined
Warn: config var w_lcannon_chargeTimeMin was not defined
Warn: config var w_lcannon_chargeTimeWarn was not defined
Warn: config var w_lcannon_damage was not defined
Warn: config var w_level1_clawDmg was not defined
Warn: config var w_level1_clawRange was not defined
Warn: config var w_level1_clawWidth was not defined
Warn: config var w_level2upg_clawRange was not defined
Warn: config var w_level2upg_zapChainFalloff was not defined
Warn: config var w_level2upg_zapChainRange was not defined
Warn: config var w_level2upg_zapDmg was not defined
Warn: config var w_level2upg_zapRange was not defined
Warn: config var w_level2upg_zapTime was not defined
Warn: config var w_level2upg_zapWidth was not defined
Warn: config var w_level2_clawDmg was not defined
Warn: config var w_level2_clawRange was not defined
Warn: config var w_level2_clawWidth was not defined
Warn: config var w_level2_maxWalljumpSpeed was not defined
Warn: config var w_level3upg_ballRegen was not defined
Warn: config var w_level3upg_ballRegenBooster was not defined
Warn: config var w_level3upg_ballRegenCreep was not defined
Warn: config var w_level3upg_ballSpeed was not defined
Warn: config var w_level3upg_clawRange was not defined
Warn: config var w_level3upg_pounceDuration was not defined
Warn: config var w_level3upg_pounceJumpMagnitude was not defined
Warn: config var w_level3upg_pounceRange was not defined
Warn: config var w_level3_clawDmg was not defined
Warn: config var w_level3_clawRange was not defined
Warn: config var w_level3_clawWidth was not defined
Warn: config var w_level3_pounceDmg was not defined
Warn: config var w_level3_pounceDuration was not defined
Warn: config var w_level3_pounceJumpMagnitude was not defined
Warn: config var w_level3_pounceRange was not defined
Warn: config var w_level3_pounceRepeat was not defined
Warn: config var w_level3_pounceSpeedMod was not defined
Warn: config var w_level3_pounceTimeMin was not defined
Warn: config var w_level3_pounceWidth was not defined
Warn: config var w_level4_clawDmg was not defined
Warn: config var w_level4_clawHeight was not defined
Warn: config var w_level4_clawRange was not defined
Warn: config var w_level4_clawWidth was not defined
Warn: config var w_level4_trampleChargeMax was not defined
Warn: config var w_level4_trampleChargeMin was not defined
Warn: config var w_level4_trampleChargeTrigger was not defined
Warn: config var w_level4_trampleDmg was not defined
Warn: config var w_level4_trampleDuration was not defined
Warn: config var w_level4_trampleRepeat was not defined
Warn: config var w_level4_trampleSpeed was not defined
Warn: config var w_level4_trampleStopPenalty was not defined
Warn: config var w_lgun_damage was not defined
Warn: config var w_mdriver_damage was not defined
Warn: config var w_prifle_speed was not defined
Warn: config var w_psaw_damage was not defined
Warn: config var w_psaw_height was not defined
Warn: config var w_psaw_range was not defined
Warn: config var w_psaw_width was not defined
Warn: config var w_rifle_damage was not defined
Warn: config var w_rifle_spread was not defined
Warn: config var w_shotgun_damage was not defined
Warn: config var w_shotgun_pellets was not defined
Warn: config var w_shotgun_range was not defined
Warn: config var w_shotgun_spread was not defined
Debug: Failed to open 'game/admin.dat' for reading: No such file or directory
Warn: readconfig: could not open admin config file admin.dat
Loading map configs for map: plat23 layout: builtin
0 groups with 0 entities
Debug: Failed to open 'game/configs/classes/builder.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/builderupg.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level0.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level1.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level2.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level2upg.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level3.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level3upg.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level4.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/human_naked.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/human_light.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/human_medium.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/human_bsuit.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/default/maprotation.cfg' for reading: No such file or directory
Debug: Failed to open 'game/maprotation.cfg' for reading: No such file or directory
Warn: file 'maprotation.cfg' not found
Warn: failed to load map rotation 'maprotation.cfg'
Warn: failed to load g_initialMapRotation: rotation1
-----------------------------------
Warn: IPC: Socket closed by remote end

Fortunately when enabling the minidump:

it dumps something (attached):

InitGame: \g_maxGameClients\0\g_needpass\0\g_BPInitialBudget\80\g_unlagged\1\g_BPInitialBudgetAliens\-1\g_BPInitialBudgetHumans\-1\g_BPBudgetPerMiner\50\sv_hostname\Unvanquished 0.55.2 Server\mapname\plat23\version\Unvanquished 0.55.2 Linux arm64 Jan 17 2025\pakname\map-plat23\sv_maxclients\20\sv_maxRate\0\g_BPRecoveryRateHalfLife\10\sv_privateClients\0\protocol\86\sv_floodProtect\0\timelimit\45\version.daemon.abi\0.55\g_devolveMaxBaseDistance\1000\gamename\base\g_unlockableMinTime\30\g_momentumHalfLife\5\g_BPRecoveryInitialRate\16
RealTime: 2025-01-17 05:45:51 Z
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: config var w_abuild_blobSlowTime was not defined
Warn: config var w_abuild_blobSpeed was not defined
Warn: config var w_abuild_blobSpeedMod was not defined
Warn: config var w_abuild_clawDmg was not defined
Warn: config var w_abuild_clawRange was not defined
Warn: config var w_abuild_clawWidth was not defined
Warn: config var w_blaster_speed was not defined
Warn: config var w_chaingun_damage was not defined
Warn: config var w_chaingun_spread was not defined
Warn: config var w_flamer_igniteChance was not defined
Warn: config var w_flamer_igniteRadius was not defined
Warn: config var w_flamer_igniteSplChance was not defined
Warn: config var w_flamer_lag was not defined
Warn: config var w_flamer_size was not defined
Warn: config var w_flamer_speed was not defined
Warn: config var w_lcannon_chargeAmmo was not defined
Warn: config var w_lcannon_chargeTimeMax was not defined
Warn: config var w_lcannon_chargeTimeMin was not defined
Warn: config var w_lcannon_chargeTimeWarn was not defined
Warn: config var w_lcannon_damage was not defined
Warn: config var w_level1_clawDmg was not defined
Warn: config var w_level1_clawRange was not defined
Warn: config var w_level1_clawWidth was not defined
Warn: config var w_level2upg_clawRange was not defined
Warn: config var w_level2upg_zapChainFalloff was not defined
Warn: config var w_level2upg_zapChainRange was not defined
Warn: config var w_level2upg_zapDmg was not defined
Warn: config var w_level2upg_zapRange was not defined
Warn: config var w_level2upg_zapTime was not defined
Warn: config var w_level2upg_zapWidth was not defined
Warn: config var w_level2_clawDmg was not defined
Warn: config var w_level2_clawRange was not defined
Warn: config var w_level2_clawWidth was not defined
Warn: config var w_level2_maxWalljumpSpeed was not defined
Warn: config var w_level3upg_ballRegen was not defined
Warn: config var w_level3upg_ballRegenBooster was not defined
Warn: config var w_level3upg_ballRegenCreep was not defined
Warn: config var w_level3upg_ballSpeed was not defined
Warn: config var w_level3upg_clawRange was not defined
Warn: config var w_level3upg_pounceDuration was not defined
Warn: config var w_level3upg_pounceJumpMagnitude was not defined
Warn: config var w_level3upg_pounceRange was not defined
Warn: config var w_level3_clawDmg was not defined
Warn: config var w_level3_clawRange was not defined
Warn: config var w_level3_clawWidth was not defined
Warn: config var w_level3_pounceDmg was not defined
Warn: config var w_level3_pounceDuration was not defined
Warn: config var w_level3_pounceJumpMagnitude was not defined
Warn: config var w_level3_pounceRange was not defined
Warn: config var w_level3_pounceRepeat was not defined
Warn: config var w_level3_pounceSpeedMod was not defined
Warn: config var w_level3_pounceTimeMin was not defined
Warn: config var w_level3_pounceWidth was not defined
Warn: config var w_level4_clawDmg was not defined
Warn: config var w_level4_clawHeight was not defined
Warn: config var w_level4_clawRange was not defined
Warn: config var w_level4_clawWidth was not defined
Warn: config var w_level4_trampleChargeMax was not defined
Warn: config var w_level4_trampleChargeMin was not defined
Warn: config var w_level4_trampleChargeTrigger was not defined
Warn: config var w_level4_trampleDmg was not defined
Warn: config var w_level4_trampleDuration was not defined
Warn: config var w_level4_trampleRepeat was not defined
Warn: config var w_level4_trampleSpeed was not defined
Warn: config var w_level4_trampleStopPenalty was not defined
Warn: config var w_lgun_damage was not defined
Warn: config var w_mdriver_damage was not defined
Warn: config var w_prifle_speed was not defined
Warn: config var w_psaw_damage was not defined
Warn: config var w_psaw_height was not defined
Warn: config var w_psaw_range was not defined
Warn: config var w_psaw_width was not defined
Warn: config var w_rifle_damage was not defined
Warn: config var w_rifle_spread was not defined
Warn: config var w_shotgun_damage was not defined
Warn: config var w_shotgun_pellets was not defined
Warn: config var w_shotgun_range was not defined
Warn: config var w_shotgun_spread was not defined
Debug: Failed to open 'game/admin.dat' for reading: No such file or directory
Warn: readconfig: could not open admin config file admin.dat
Loading map configs for map: plat23 layout: builtin
0 groups with 0 entities
Debug: Failed to open 'game/configs/classes/builder.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/builderupg.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level0.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level1.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level2.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level2upg.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level3.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level3upg.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/level4.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/human_naked.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/human_light.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/human_medium.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/configs/classes/human_bsuit.locdamage.cfg' for reading: No such file or directory
Debug: Failed to open 'game/default/maprotation.cfg' for reading: No such file or directory
Debug: Failed to open 'game/maprotation.cfg' for reading: No such file or directory
Warn: file 'maprotation.cfg' not found
Warn: failed to load map rotation 'maprotation.cfg'
Warn: failed to load g_initialMapRotation: rotation1
-----------------------------------
Wrote crash dump to /home/illwieckz/.local/share/unvanquished/crashdump/crash-nacl-SGame-1737092751967.dmp
Warn: SGame VM: Crashed with NaCl exception
@slipher slipher added A-Build When the code doesn't compile, or worse, compiles wrong T-Bug labels Jan 19, 2025
@illwieckz
Copy link
Member Author

We may also try a newer nacl loader, the one we use is very old.

@cu-kai
Copy link
Contributor

cu-kai commented Jan 22, 2025

I currently host Saigo-built cgames on Bunker should anybody wish to test this in an "authentic" environment. All three supported architectures are available.

@illwieckz
Copy link
Member Author

If I write this:

static void BG_InitWeaponAttributes()
{
	const weaponData_t *wd;
	weaponAttributes_t *wa;

	for ( unsigned i = 0; i < bg_numWeapons; i++ )
	{
		wd = &bg_weaponsData[i];
		wa = &bg_weapons[i];

		*wa = {};

		wa->number = wd->number;
		wa->name   = wd->name;
		Log::Warn("===========%s====", wd->name);
		Log::Warn("===========%s====", wa->name);
		Log::Warn("===========%s====", va("%s", wa->name));

		// set default values for optional fields
		wa->knockbackScale = 1.0f;

		BG_ParseWeaponAttributeFile( va( "configs/weapon/%s.attr.cfg", wa->name ), wa );
	}
}

I get this being printed:

Warn: ===========level0==== 
Warn: ===========level0==== 
Warn: ===========level0==== 
Warn: ===========level1==== 
Warn: ===========level1==== 
Warn: ===========level1==== 
Warn: ===========level2==== 
Warn: ===========level2==== 
Warn: ===========level2==== 
Warn: ===========level2upg==== 
Warn: ===========level2upg==== 
Warn: ===========level2upg==== 
Warn: ===========level3==== 
Warn: ===========level3==== 
Warn: ===========level3==== 
Warn: ===========level3upg==== 
Warn: ===========level3upg==== 
Warn: ===========level3upg==== 
Warn: ===========level4==== 
Warn: ===========level4==== 
Warn: ===========level4==== 
Warn: ===========blaster==== 
Warn: ===========blaster==== 
Warn: ===========blaster==== 
Warn: ===========rifle==== 
Warn: ===========rifle==== 
Warn: ===========rifle==== 
Warn: ===========psaw==== 
Warn: ===========psaw==== 
Warn: ===========psaw==== 
Warn: ===========shotgun==== 
Warn: ===========shotgun==== 
Warn: ===========shotgun==== 
Warn: ===========lgun==== 
Warn: ===========lgun==== 
Warn: ===========lgun==== 
Warn: ===========mdriver==== 
Warn: ===========mdriver==== 
Warn: ===========mdriver==== 
Warn: ===========chaingun==== 
Warn: ===========chaingun==== 
Warn: ===========chaingun==== 
Warn: ===========flamer==== 
Warn: ===========flamer==== 
Warn: ===========flamer==== 
Warn: ===========prifle==== 
Warn: ===========prifle==== 
Warn: ===========prifle==== 
Warn: ===========lcannon==== 
Warn: ===========lcannon==== 
Warn: ===========lcannon==== 
Warn: ===========rocketpod==== 
Warn: ===========rocketpod==== 
Warn: ===========rocketpod==== 
Warn: ===========mgturret==== 
Warn: ===========mgturret==== 
Warn: ===========mgturret==== 
Warn: ===========abuild==== 
Warn: ===========abuild==== 
Warn: ===========abuild==== 
Warn: ===========abuildupg==== 
Warn: ===========abuildupg==== 
Warn: ===========abuildupg==== 
Warn: ===========ckit==== 
Warn: ===========ckit==== 
Warn: ===========ckit==== 

And the errors like that disappear (but it still crashes later):

Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: config var w_abuild_blobSlowTime was not defined
Warn: config var w_abuild_blobSpeed was not defined

But if I do that:

static void BG_InitWeaponAttributes()
{
	const weaponData_t *wd;
	weaponAttributes_t *wa;

	for ( unsigned i = 0; i < bg_numWeapons; i++ )
	{
		wd = &bg_weaponsData[i];
		wa = &bg_weapons[i];

		*wa = {};

		wa->number = wd->number;
		wa->name   = wd->name;
//		Log::Warn("===========%s====", wd->name);
//		Log::Warn("===========%s====", wa->name);
		Log::Warn("===========%s====", va("%s", wa->name));

		// set default values for optional fields
		wa->knockbackScale = 1.0f;

		BG_ParseWeaponAttributeFile( va( "configs/weapon/%s.attr.cfg", wa->name ), wa );
	}
}

I get that:

Warn: ===========level0==== 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: ===========(null)==== 
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file 
Warn: config var w_abuild_blobSlowTime was not defined 
Warn: config var w_abuild_blobSpeed was not defined 
Warn: config var w_abuild_blobSpeedMod was not defined 
Warn: config var w_abuild_clawDmg was not defined 
Warn: config var w_abuild_clawRange was not defined 
Warn: config var w_abuild_clawWidth was not defined 
Warn: config var w_blaster_speed was not defined 
Warn: config var w_chaingun_damage was not defined 
Warn: config var w_chaingun_spread was not defined 
Warn: config var w_flamer_igniteChance was not defined 
Warn: config var w_flamer_igniteRadius was not defined 
Warn: config var w_flamer_igniteSplChance was not defined 
Warn: config var w_flamer_lag was not defined 
Warn: config var w_flamer_size was not defined 
Warn: config var w_flamer_speed was not defined 
Warn: config var w_lcannon_chargeAmmo was not defined 
Warn: config var w_lcannon_chargeTimeMax was not defined 
Warn: config var w_lcannon_chargeTimeMin was not defined 
Warn: config var w_lcannon_chargeTimeWarn was not defined 
Warn: config var w_lcannon_damage was not defined 
Warn: config var w_level1_clawDmg was not defined 
Warn: config var w_level1_clawRange was not defined 
Warn: config var w_level1_clawWidth was not defined 
Warn: config var w_level2upg_clawRange was not defined 
Warn: config var w_level2upg_zapChainFalloff was not defined 
Warn: config var w_level2upg_zapChainRange was not defined 
Warn: config var w_level2upg_zapDmg was not defined 
Warn: config var w_level2upg_zapRange was not defined 
Warn: config var w_level2upg_zapTime was not defined 
Warn: config var w_level2upg_zapWidth was not defined 
Warn: config var w_level2_clawDmg was not defined 
Warn: config var w_level2_clawRange was not defined 
Warn: config var w_level2_clawWidth was not defined 
Warn: config var w_level2_maxWalljumpSpeed was not defined 
Warn: config var w_level3upg_ballRegen was not defined 
Warn: config var w_level3upg_ballRegenBooster was not defined 
Warn: config var w_level3upg_ballRegenCreep was not defined 
Warn: config var w_level3upg_ballSpeed was not defined 
Warn: config var w_level3upg_clawRange was not defined 
Warn: config var w_level3upg_pounceDuration was not defined 
Warn: config var w_level3upg_pounceJumpMagnitude was not defined 
Warn: config var w_level3upg_pounceRange was not defined 
Warn: config var w_level3_clawDmg was not defined 
Warn: config var w_level3_clawRange was not defined 
Warn: config var w_level3_clawWidth was not defined 
Warn: config var w_level3_pounceDmg was not defined 
Warn: config var w_level3_pounceDuration was not defined 
Warn: config var w_level3_pounceJumpMagnitude was not defined 
Warn: config var w_level3_pounceRange was not defined 
Warn: config var w_level3_pounceRepeat was not defined 
Warn: config var w_level3_pounceSpeedMod was not defined 
Warn: config var w_level3_pounceTimeMin was not defined 
Warn: config var w_level3_pounceWidth was not defined 
Warn: config var w_level4_clawDmg was not defined 
Warn: config var w_level4_clawHeight was not defined 
Warn: config var w_level4_clawRange was not defined 
Warn: config var w_level4_clawWidth was not defined 
Warn: config var w_level4_trampleChargeMax was not defined 
Warn: config var w_level4_trampleChargeMin was not defined 
Warn: config var w_level4_trampleChargeTrigger was not defined 
Warn: config var w_level4_trampleDmg was not defined 
Warn: config var w_level4_trampleDuration was not defined 
Warn: config var w_level4_trampleRepeat was not defined 
Warn: config var w_level4_trampleSpeed was not defined 
Warn: config var w_level4_trampleStopPenalty was not defined 
Warn: config var w_lgun_damage was not defined 
Warn: config var w_mdriver_damage was not defined 
Warn: config var w_prifle_speed was not defined 
Warn: config var w_psaw_damage was not defined 
Warn: config var w_psaw_height was not defined 
Warn: config var w_psaw_range was not defined 
Warn: config var w_psaw_width was not defined 
Warn: config var w_rifle_damage was not defined 
Warn: config var w_rifle_spread was not defined 
Warn: config var w_shotgun_damage was not defined 
Warn: config var w_shotgun_pellets was not defined 
Warn: config var w_shotgun_range was not defined 
Warn: config var w_shotgun_spread was not defined 

@illwieckz
Copy link
Member Author

If I modify va() this way:

char     *PRINTF_LIKE(1) va( const char *format, ... )
{
	va_list     argptr;
	const int MAX_VA_STRING = 32000;
	static char temp_buffer[ MAX_VA_STRING + 1 ];
	static char string[ MAX_VA_STRING ]; // in case va is called by nested functions
	static int  index = 0;
	char        *buf;
	int         len;

	va_start( argptr, format );
	Q_vsnprintf( temp_buffer, sizeof( temp_buffer ), format, argptr );
	temp_buffer[ MAX_VA_STRING ] = 0;
	Log::Warn( "---%s---", temp_buffer );
//
}

I get this:

Warn: ---configs/buildables/eggpod.attr.cfg---
Warn: ---configs/buildables/overmind.attr.cfg---
Warn: ---configs/buildables/barricade.attr.cfg---
Warn: ---configs/buildables/acid_tube.attr.cfg---
Warn: ---configs/buildables/trapper.attr.cfg---
Warn: ---configs/buildables/booster.attr.cfg---
Warn: ---configs/buildables/hive.attr.cfg---
Warn: ---configs/buildables/leech.attr.cfg---
Warn: ---configs/buildables/spiker.attr.cfg---
Warn: ---configs/buildables/telenode.attr.cfg---
Warn: ---configs/buildables/mgturret.attr.cfg---
Warn: ---configs/buildables/rocketpod.attr.cfg---
Warn: ---configs/buildables/arm.attr.cfg---
Warn: ---configs/buildables/medistat.attr.cfg---
Warn: ---configs/buildables/drill.attr.cfg---
Warn: ---configs/buildables/reactor.attr.cfg---
Warn: ---configs/buildables/eggpod.model.cfg---
Warn: ---configs/buildables/overmind.model.cfg---
Warn: ---configs/buildables/barricade.model.cfg---
Warn: ---configs/buildables/acid_tube.model.cfg---
Warn: ---configs/buildables/trapper.model.cfg---
Warn: ---configs/buildables/booster.model.cfg---
Warn: ---configs/buildables/hive.model.cfg---
Warn: ---configs/buildables/leech.model.cfg---
Warn: ---configs/buildables/spiker.model.cfg---
Warn: ---configs/buildables/telenode.model.cfg---
Warn: ---configs/buildables/mgturret.model.cfg---
Warn: ---configs/buildables/rocketpod.model.cfg---
Warn: ---configs/buildables/arm.model.cfg---
Warn: ---configs/buildables/medistat.model.cfg---
Warn: ---configs/buildables/drill.model.cfg---
Warn: ---configs/buildables/reactor.model.cfg---
Warn: ---configs/classes/spectator.attr.cfg---
Warn: ---configs/classes/builder.attr.cfg---
Warn: ---c_builder_mass---
Warn: ---configs/classes/builderupg.attr.cfg---
Warn: ---c_builderupg_mass---
Warn: ---configs/classes/level0.attr.cfg---
Warn: ---c_level0_mass---
Warn: ---configs/classes/level1.attr.cfg---
Warn: ---c_level1_mass---
Warn: ---configs/classes/level2.attr.cfg---
Warn: ---c_level2_mass---
Warn: ---configs/classes/level2upg.attr.cfg---
Warn: ---c_level2upg_mass---
Warn: ---configs/classes/level3.attr.cfg---
Warn: ---c_level3_mass---
Warn: ---configs/classes/level3upg.attr.cfg---
Warn: ---c_level3upg_mass---
Warn: ---configs/classes/level4.attr.cfg---
Warn: ---c_level4_mass---
Warn: ---configs/classes/human_naked.attr.cfg---
Warn: ---c_human_naked_mass---
Warn: ---c_human_naked_staminaJumpCost---
Warn: ---c_human_naked_staminaSprintCost---
Warn: ---c_human_naked_staminaJogRestore---
Warn: ---c_human_naked_staminaWalkRestore---
Warn: ---c_human_naked_staminaStopRestore---
Warn: ---configs/classes/human_light.attr.cfg---
Warn: ---c_human_light_mass---
Warn: ---c_human_light_staminaJumpCost---
Warn: ---c_human_light_staminaSprintCost---
Warn: ---c_human_light_staminaJogRestore---
Warn: ---c_human_light_staminaWalkRestore---
Warn: ---c_human_light_staminaStopRestore---
Warn: ---configs/classes/human_medium.attr.cfg---
Warn: ---c_human_medium_mass---
Warn: ---c_human_medium_staminaJumpCost---
Warn: ---c_human_medium_staminaSprintCost---
Warn: ---c_human_medium_staminaJogRestore---
Warn: ---c_human_medium_staminaWalkRestore---
Warn: ---c_human_medium_staminaStopRestore---
Warn: ---configs/classes/human_bsuit.attr.cfg---
Warn: ---c_human_bsuit_mass---
Warn: ---c_human_bsuit_staminaJumpCost---
Warn: ---c_human_bsuit_staminaSprintCost---
Warn: ---c_human_bsuit_staminaJogRestore---
Warn: ---c_human_bsuit_staminaWalkRestore---
Warn: ---c_human_bsuit_staminaStopRestore---
Warn: ---configs/classes/spectator.model.cfg---
Warn: ---configs/classes/builder.model.cfg---
Warn: ---configs/classes/builderupg.model.cfg---
Warn: ---configs/classes/level0.model.cfg---
Warn: ---configs/classes/level1.model.cfg---
Warn: ---configs/classes/level2.model.cfg---
Warn: ---configs/classes/level2upg.model.cfg---
Warn: ---configs/classes/level3.model.cfg---
Warn: ---configs/classes/level3upg.model.cfg---
Warn: ---configs/classes/level4.model.cfg---
Warn: ---configs/classes/human_naked.model.cfg---
Warn: ---configs/classes/human_light.model.cfg---
Warn: ---configs/classes/human_medium.model.cfg---
Warn: ---configs/classes/human_bsuit.model.cfg---
Warn: ---level0---
Warn: ===========level0====
Warn: ---configs/weapon/level0.attr.cfg---
Warn: ---w_level0_biteDmg---
Warn: ---w_level0_biteRange---
Warn: ---w_level0_biteWidth---
Warn: ---w_level0_biteRepeat---
Warn: ---(null)---
Warn: ===========(null)====
Warn: ---configs/weapon/(null).attr.cfg---
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: ---(null)---
Warn: ===========(null)====
Warn: ---configs/weapon/(null).attr.cfg---
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: ---(null)---
Warn: ===========(null)====
Warn: ---configs/weapon/(null).attr.cfg---
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: ---(null)---
Warn: ===========(null)====
Warn: ---configs/weapon/(null).attr.cfg---
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: ---(null)---
Warn: ===========(null)====
Warn: ---configs/weapon/(null).attr.cfg---
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: ---(null)---
Warn: ===========(null)====
Warn: ---configs/weapon/(null).attr.cfg---
Warn: couldn't read file 'configs/weapon/(null).attr.cfg': No such file
Warn: ---(null)---

@illwieckz
Copy link
Member Author

illwieckz commented Jan 22, 2025

Using a newer loader and a newer irt doesn't avoid the crash.

@illwieckz
Copy link
Member Author

illwieckz commented Jan 22, 2025

To log more extensively what's happening and experiment with the NaCl implementation of vsnprintf(), I wanted to write a wrapper around vsnsprintf(), so instead of #define Q_vsnprintf vsnprintf I wrote this:

int PRINTF_LIKE(3) Q_vsnprintf( char *str, size_t size, const char *format, ... )
{
	va_list argptr;
	va_start( argptr, format );
	int len = vsnprintf( str, size, format, argptr );
	va_end( argptr );
	return len;
}

But this produces garbage and even crashes the amd64 nexe.

I wanted to first do that to intercept all the calls then add some logging around… but even that doesn't work. What is my mistake?

@illwieckz
Copy link
Member Author

Well, I'm probably losing my time, the bug is likely in va().

@illwieckz
Copy link
Member Author

…or in BG_InitWeaponAttributes()

@illwieckz
Copy link
Member Author

With a Debug build it works, so that's likely a compiler optimization bug.

@illwieckz
Copy link
Member Author

illwieckz commented Jan 22, 2025

It crashes with -O1, -O2 and -Os, but not with -O0.

@illwieckz
Copy link
Member Author

So, even if it's kinda annoying to require a non-optimized build on arm, having the ability to make it run means we're not prevented to migrate to Saigo.

@illwieckz
Copy link
Member Author

For now this does the job:

diff --git a/cmake/DaemonFlags.cmake b/cmake/DaemonFlags.cmake
index e8da09c00..052d86646 100644
--- a/cmake/DaemonFlags.cmake
+++ b/cmake/DaemonFlags.cmake
@@ -231,6 +231,12 @@ else()
                endif()
        endif()
 
+       if (NACL AND USE_NACL_SAIGO AND SAIGO_ARCH STREQUAL "arm")
+               set_c_cxx_flag("-O0" RELEASE)
+               set_c_cxx_flag("-O0" RELWITHDEBINFO)
+               set_c_cxx_flag("-O0" MINSIZEREL)
+       endif()
+
        # Extra debug flags.
        set_c_cxx_flag("-g3" RELWITHDEBINFO)
        set_c_cxx_flag("-g3" DEBUG)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build When the code doesn't compile, or worse, compiles wrong T-Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants