2025-07-16 12:25 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002368Spring engineGeneralpublic2012-05-13 11:51
Reporterabma 
Assigned Toabma 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version0.82.7+git 
Target Version83.0Fixed in Version 
Summary0002368: (master) sound stuttering/choppy in current spring master
Descriptionin current spring master i get big spikes in draw-world. with the same settings i don't get this in the stable branch with the same compile settings.

in master, CPU usage in draw-world is ~ 70% in stable at ~ 7%.

this seems to also cause stuttering sounds.

afaik a short time ago this problem didn't exist.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • txt file icon infolog.txt (16,883 bytes) 2011-02-26 18:30 -
    LogOutput initialized.
    Spring 0.82+.4.0 (Debug)
    Build date/time: Feb 23 2011 23:55:12
    Available log subsystems: CollisionVolume, unit, ArchiveScanner, VFS-detail, VFS, Sound
    Enabled log subsystems: Sound
    Enable or disable log subsystems using the LogSubsystems configuration key
      or the SPRING_LOG_SUBSYSTEMS environment variable (both comma separated).
      Use "none" to disable the default log subsystems.
    using default configuration source "/home/abma/.springrc"
    [CMyMath::Init] CPU SSE mask: 888, flags:
    	SSE 1.0:  1,  SSE 2.0:  1
    	SSE 3.0:  1, SSSE 3.0:  0
    	SSE 4.1:  0,  SSE 4.2:  0
    	SSE 4.0A: 1,  SSE 5.0A: 0
    	using streflop SSE FP-math mode, CPU supports SSE instructions
    OS: Linux
    OS: 64bit native mode
    Adding /home/abma/.spring/ to directories
    Skipping already added directory /home/abma/.spring/
    Adding /home/abma/local/spring/master/share/games/spring/ to directories
    Using read-write data directory: /home/abma/.spring/
    Using read-only data directory: /home/abma/local/spring/master/share/games/spring/
    Scanning: /home/abma/local/spring/master/share/games/spring/base
    Scanning: /home/abma/.spring/maps
    Scanning: /home/abma/.spring/games
    Scanning: /home/abma/.spring/mods
    Scanning: /home/abma/.spring/packages
    Supported Video modes: 1680x1050, 1600x1200, 1440x900, 1400x1050, 1366x768, 1360x768, 1280x1024, 1280x960, 1280x800, 1280x768, 1280x720, 1152x864, 1152x648, 1024x768, 800x600, 720x480, 640x480
    Video mode set to 1680x1050/32bit (windowed)
    [f=0000000] SDL:  1.2.14
    [f=0000000] GL:   3.2.9756 Compatibility Profile Context
    [f=0000000] GL:   ATI Technologies Inc.
    [f=0000000] GL:   ATI Radeon HD 4200
    [f=0000000] GLSL: 1.50
    [f=0000000] GLEW: 1.5.2
    [f=0000000] ATI hacks enabled
    [f=0000000] Joysticks found: 0
    [f=0000000] Joystick 0 not found
    [f=0000000] [Watchdog] Installed (timeout: 10sec)
    [f=0000000] Video mode set to 1680x1000/32bit (windowed)
    [f=0000000] [Sound] OpenAL info:
    [f=0000000] [Sound]   Available Devices:
    [f=0000000] [Sound]               PulseAudio Software
    [f=0000000] [Sound]   Device:     PulseAudio Software
    [f=0000000] [Sound]   Vendor:     OpenAL Community
    [f=0000000] [Sound]   Version:    1.1 ALSOFT 1.12.854
    [f=0000000] [Sound]   Renderer:   OpenAL Soft
    [f=0000000] [Sound]   AL Extensions:  AL_EXTX_buffer_sub_data AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXTX_sample_buffer_object AL_EXT_source_distance_model AL_LOKI_quadriphonic
    [f=0000000] [Sound]   ALC Extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context
    [f=0000000] [Sound]   EFX Enabled: yes
    [f=0000000] Connecting to local server
    [f=0000000] Starting GameServer: 45 ms
    [f=0000000] Starting demo recording
    [f=0000000] Using map: Terra
    [f=0000000] Using mod: Balanced Annihilation V7.20
    [f=0000000] Using mod archive: 058e6e64c6782b7ba75418c4bf5965e5.sdp
    [f=0000000] recording demo: demos/20110226_182832_Terra_0.82+.4.sdf
    [f=0000000] Loading client data: 76 ms
    [f=0000000] User number 0 (team 0, allyteam 0)
    [f=0000000] Loading Radar Icons
    [f=0000000] Loading GameData Definitions
    [f=0000000] Loading all definitions:  6.153000
    [f=0000000] Loading GameData Definitions: 6193 ms
    [f=0000000] Loading Sound Definitions
    [f=0000000] [Sound]  parsed 25 sounds from gamedata/sounds.lua
    [f=0000000] Loading Sound Definitions: 13 ms
    [f=0000000] Parsing Map Information
    [f=0000000] Loading SMF
    [f=0000000] Loading Map
    [f=0000000] Creating Smooth Height Mesh
    [f=0000000] Creating Smooth Mesh: 2818 ms
    [f=0000000] Creating QuadField & CEGs
    [f=0000000] Number of damage types: 40
    [f=0000000] Creating Unit Textures
    [f=0000000] Loading Weapon Definitions
    [f=0000000] Loading Unit Definitions
    [f=0000000] Loading Feature Definitions
    [f=0000000] Initializing Map Features
    [f=0000000] Unknown map feature type greyrock1
    [f=0000000] Unknown map feature type greyrock2
    [f=0000000] Unknown map feature type greyrock3
    [f=0000000] Unknown map feature type greyrock4
    [f=0000000] Unknown map feature type greyrock5
    [f=0000000] Unknown map feature type greyrock6
    [f=0000000] Reading Estimate PathCosts [8]
    [f=0000000] Reading Estimate PathCosts [32]
    [f=0000000] [CPathManager] pathing data checksum: 82ef2c33
    [f=0000000] shadows disabled or required OpenGL extension missing
    [f=0000000] Creating GroundDrawer
    [f=0000000] Loading Tile Files
    [f=0000000] Loading Tile Map
    [f=0000000] generating MipMaps: 15 ms
    [f=0000000] Creating TreeDrawer
    [f=0000000] Creating Projectile Textures
    [f=0000000] Creating Sky & Water
    [f=0000000] Camera and mouse: 325 ms
    [f=0000000] Loading console: 2 ms
    [f=0000000] Loading LuaRules
    [f=0000000] Loaded gadget:  No Self-D           <unit_prevent_share_selfd.lua>
    [f=0000000] Loaded gadget:  Air Release         <unit_air_release_manager.lua>
    [f=0000000] Loaded gadget:  AirPlantParents     <unit_air_plants.lua>
    [f=0000000] Loaded gadget:  Commando Watch      <unit_commando_watch.lua>
    [f=0000000] Loaded gadget:  DirectControl       <unit_direct_control.lua>
    [f=0000000] Loaded gadget:  DragonsDisguise     <unit_set_neutral.lua>
    [f=0000000] Loaded gadget:  DroppedStartPos     <unit_fix_dropped_startpos.lua>
    [f=0000000] Loaded gadget:  Dynamic collision volume & Hitsphere Scaledown  <unit_dynamic_collision_volume.lua>
    [f=0000000] Loaded gadget:  FinishedBuilding    <unit_finished_building.lua>
    [f=0000000] Loaded gadget:  Los_Only_Sounds     <unit_los_only_sounds.lua>
    [f=0000000] Loaded gadget:  MissileControl      <unit_missile_delay.lua>
    [f=0000000] Loaded gadget:  Napalm              <lups_napalm.lua>
    [f=0000000] Loaded gadget:  No Land Damage      <unit_no_land_damage.lua>
    [f=0000000] Loaded gadget:  No Self Pwn         <unit_noselfpwn.lua>
    [f=0000000] Loaded gadget:  NoCost              <cmd_nocost.lua>
    [f=0000000] Loaded gadget:  PassiveBuilders     <unit_passive_builders.lua>
    [f=0000000] Loaded gadget:  Prevent Lab Hax     <unit_prevent_lab_hax.lua>
    [f=0000000] Loaded gadget:  Prevent Load Hax    <unit_prevent_load_hax.lua>
    [f=0000000] Loaded gadget:  Prevent Range Hax   <unit_prevent_range_hax.lua>
    [f=0000000] Loaded gadget:  Prevent Strange Orders  <unit_prevent_strange_orders.lua>
    [f=0000000] Loaded gadget:  Reclaim Fix         <unit_reclaim_fix.lua>
    [f=0000000] Loaded gadget:  ShieldDrain         <unit_shield_watch.lua>
    [f=0000000] Loaded gadget:  Shockwaves          <lups_shockwaves.lua>
    [f=0000000] Loaded gadget:  Spawn               <init_game_spawn.lua>
    [f=0000000] Loaded gadget:  Start Point Remover Gadget  <init_start_point_remover_gadget.lua>
    [f=0000000] Loaded gadget:  fx_reclaim_shards   <fx_reclaim_shards.lua>
    [f=0000000] Loaded gadget:  lups_wrapper.lua    <lups_wrapper.lua>
    [f=0000000] Loaded gadget:  prevent_flying_com_wrecks  <unit_prevent_flying_com_wrecks.lua>
    [f=0000000] Loaded gadget:  Area Attack         <areaattack.lua>
    [f=0000000] Loaded gadget:  C Is For Control    <comiscontrol.lua>
    [f=0000000] Loaded gadget:  Team Com Ends       <teamcomends.lua>
    [f=0000000] Loaded gadget:  LupsSyncedManager   <lups_manager.lua>
    [f=0000000] Loaded gadget:  Mex Upgrader Gadget  <unit_mex_upgrader.lua>
    [f=0000000] Loaded gadget:  Air Release         <unit_air_release_manager.lua>
    [f=0000000] Loaded gadget:  AirPlantParents     <unit_air_plants.lua>
    [f=0000000] Loaded gadget:  DragonsDisguise     <unit_set_neutral.lua>
    [f=0000000] Loaded gadget:  DroppedStartPos     <unit_fix_dropped_startpos.lua>
    [f=0000000] Loaded gadget:  Dynamic collision volume & Hitsphere Scaledown  <unit_dynamic_collision_volume.lua>
    [f=0000000] Loaded gadget:  FinishedBuilding    <unit_finished_building.lua>
    [f=0000000] Loaded gadget:  Los_Only_Sounds     <unit_los_only_sounds.lua>
    [f=0000000] Loaded gadget:  MissileControl      <unit_missile_delay.lua>
    [f=0000000] Loaded gadget:  Napalm              <lups_napalm.lua>
    [f=0000000] Loaded gadget:  NoCost              <cmd_nocost.lua>
    [f=0000000] Loaded gadget:  PassiveBuilders     <unit_passive_builders.lua>
    [f=0000000] Loaded gadget:  Reclaim Fix         <unit_reclaim_fix.lua>
    [f=0000000] Loaded gadget:  ShieldDrain         <unit_shield_watch.lua>
    [f=0000000] Loaded gadget:  Shockwaves          <lups_shockwaves.lua>
    [f=0000000] Loaded gadget:  Start Point Remover Gadget  <init_start_point_remover_gadget.lua>
    [f=0000000] Loaded gadget:  fx_reclaim_shards   <fx_reclaim_shards.lua>
    [f=0000000] Loaded gadget:  mo_enemywrecks      <mo_enemywrecks.lua>
    [f=0000000] Loaded gadget:  mo_greenfields      <mo_greenfields.lua>
    [f=0000000] Loaded gadget:  mo_noowner          <mo_noowner.lua>
    [f=0000000] Loaded gadget:  mo_noshare          <mo_noshare.lua>
    [f=0000000] Loaded gadget:  mo_nowrecks         <mo_nowrecks.lua>
    [f=0000000] Loaded gadget:  prevent_flying_com_wrecks  <unit_prevent_flying_com_wrecks.lua>
    [f=0000000] Loaded gadget:  Area Attack         <areaattack.lua>
    [f=0000000] Loaded gadget:  C Is For Control    <comiscontrol.lua>
    [f=0000000] Loaded gadget:  LupsSyncedManager   <lups_manager.lua>
    [f=0000000] Loaded gadget:  Mex Upgrader Gadget  <unit_mex_upgrader.lua>
    [f=0000000] Loaded gadget:  Lups                <lups_wrapper.lua>
    [f=0000000] Loading LuaGaia
    [f=0000000] Loading LuaUI
    [f=0000000] Using LUAUI_DIRNAME = LuaUI/
    [f=0000000] Reloaded ctrlpanel with: LuaUI/ctrlpanel.txt
    [f=0000000] LuaUI: bound F11 to the widget selector
    [f=0000000] LuaUI: bound CTRL+F11 to tweak mode
    [f=0000000] Hardware is incompatible with Xray shader requirements
    [f=0000000] Hardware is incompatible with Xray shader requirements
    [f=0000000] Failed to load: unit_waypoint_dragger_2.lua  (duplicate name)
    [f=0000000] Loading widget from mod:   Red_UI_Framework    <red_ui_framework.lua> ...
    [f=0000000] Loading widget from mod:   BlurApi             <api_gfx_blur.lua> ...
    [f=0000000] blur api: your hardware does not support shaders
    [f=0000000] Loading widget from mod:   MexUpg Helper       <helper.lua> ...
    [f=0000000] Loading widget from mod:   Red Tooltip         <gui_red_tooltip.lua> ...
    [f=0000000] Loading widget from mod:   HealthBars          <unit_healthbars.lua> ...
    [f=0000000] Loading widget from mod:   Commander Name Tags   <unit_comm_nametags.lua> ...
    [f=0000000] Loading widget from mod:   Ally Resource Bars  <gui_ally_res.lua> ...
    [f=0000000] Loading widget from mod:   AdvPlayersList      <gui_advplayerslist.lua> ...
    [f=0000000] Loading widget from user:  CommanderEnds       <gui_comm_ends.lua> ...
    [f=0000000] Loading widget from mod:   BuildETA            <gui_build_eta.lua> ...
    [f=0000000] Loading widget from user:  Initial Queue XTA FIX  <initial_queue.lua> ...
    [f=0000000] false
    [f=0000000] Error in Initialize(): [string "LuaUI/Widgets/initial_queue.lua"]:150: attempt to index field '?' (a nil value)
    [f=0000000] Removed widget: Initial Queue XTA FIX
    [f=0000000] Loading widget from mod:   Auto First Build Facing  <autofirstbuildfacing.lua> ...
    [f=0000000] Loading widget from mod:   ReclaimInfo         <gui_reclaiminfo.lua> ...
    [f=0000000] Loading widget from mod:   Transporting        <gui_transporting.lua> ...
    [f=0000000] Loading widget from user:  ImmobileBuilder     <unit_immobile_buider.lua> ...
    [f=0000000] Loading widget from user:  Specific Unit Reclaimer  <unit_specific_unit_reclaimer.lua> ...
    [f=0000000] Loading widget from mod:   Autoquit            <autoquit.lua> ...
    [f=0000000] Loading widget from user:  MetalMakers         <unit_metal_maker.lua> ...
    [f=0000000] Loading widget from mod:   Display DPS         <gui_display_dps.lua> ...
    [f=0000000] Loading widget from mod:   MohoExploiter       <unit_moho_exploiter.lua> ...
    [f=0000000] Loading widget from mod:   Pause Screen        <gui_pausescreen.lua> ...
    [f=0000000] Loading widget from mod:   Red_Drawing         <red_ui_framework_drawing.lua> ...
    [f=0000000] Loading widget from mod:   Red Console         <gui_red_console.lua> ...
    [f=0000000] Loading widget from mod:   Red Resource Bars   <gui_red_resourcebars.lua> ...
    [f=0000000] Loading widget from mod:   MoreSounds          <unit_more_sounds.lua> ...
    [f=0000000] Loading widget from mod:   BuildBar            <gui_buildbar.lua> ...
    [f=0000000] BuildBar Warning: you deactivated the "blurApi" widget, please reactivate it.
    [f=0000000] Loading widget from mod:   Point Tracker       <gui_point_tracker.lua> ...
    [f=0000000] Loading widget from mod:   Share Tracker       <unit_share_tracker.lua> ...
    [f=0000000] Loading widget from mod:   Loop Select         <unit_loop_select.lua> ...
    [f=0000000] Loading widget from mod:   Red Build/Order Menu  <gui_red_buildordermenu.lua> ...
    [f=0000000] Loading widget from mod:   CustomIcons         <unit_customicons.lua> ...
    [f=0000000] Loading widget from mod:   State Reverse Toggle  <cmd_state_reverse_toggle.lua> ...
    [f=0000000] Loading widget from user:  Comblast Range 1.0  <gui_comblast_range.lua> ...
    [f=0000000] Loading widget from mod:   Build Split         <cmd_buildsplit.lua> ...
    [f=0000000] Loading widget from mod:   Defense Range       <gui_defenserange.lua> ...
    [f=0000000] Loading widget from mod:   NoDuplicateOrders   <cmd_no_duplicate_orders.lua> ...
    [f=0000000] Loading widget from user:  Easy Facing         <gui_easyFacing.lua> ...
    [f=0000000] Loading widget from mod:   Unit Marker         <unit_marker.lua> ...
    [f=0000000] Loading widget from mod:   Ghost Site          <unit_ghostsite.lua> ...
    [f=0000000] Loading widget from mod:   Improved MetalMakers  <unit_improved_metal_maker.lua> ...
    [f=0000000] Loading widget from mod:   Take Reminder       <gui_take_remind.lua> ...
    [f=0000000] Loading widget from user:  Spring.PlaySoundStream test  <gui_music_test.lua> ...
    [f=0000000] Loading widget from mod:   GameTypeInfo        <gui_game_type_info.lua> ...
    [f=0000000] Loading widget from mod:   Attack AoE          <gui_attack_aoe.lua> ...
    [f=0000000] Loading widget from user:  Bomber control      <unit_bomber_control.lua> ...
    [f=0000000] Loading widget from user:  BA Waypoint Dragger  <unit_waypoint_dragger.lua> ...
    [f=0000000] Loading widget from mod:   Select n Center!    <gui_center_n_select.lua> ...
    [f=0000000] Loading widget from mod:   LupsManager         <gfx_lups_manager.lua> ...
    [f=0000000] Loading widget from mod:   BA_AllyCursors      <gui_ba_ally_cursors.lua> ...
    [f=0000000] Loading widget from mod:   Lups                <lups_wrapper.lua> ...
    [f=0000000] Loading widget from mod:   CustomFormations2   <unit_customformations2.lua> ...
    [f=0000000] LuaUI v0.3
    [f=0000000] Finalizing
    [f=0000000] Connection attempt from abma
    [f=0000000]  -> Version: 0.82+.4.0 (Debug)
    [f=0000000]  -> Connection established (given id 0)
    [f=0000000] Player abma finished loading and is now ingame
    [f=0000000] GameID: 5938694dce37b388cb1cda221cdf4421
    [f=0000000] abma added point: Start 0
    [f=0000000] LuaRules::RunCallIn: error = 2, GameStart, [string "LuaRules/Gadgets/init_game_spawn.lua"]:73: attempt to call field 'SetUnitLineage' (a nil value)
    stack traceback:
    	[string "LuaRules/Gadgets/init_game_spawn.lua"]:73: in function 'SpawnStartUnit'
    	[string "LuaRules/Gadgets/init_game_spawn.lua"]:130: in function 'GameStart'
    	[string "LuaRules/gadgets.lua"]:917: in function <[string "LuaRules/gadgets.lua"]:915>
    	(tail call): ?
    [f=0000061] Spring.PlaySoundStream()
    [f=0000144] /quit
    [f=0000144] User exited
    [f=0000145] Red_UI_Framework>> last processed widget was "Red Tooltip"
    [f=0000145] Red_Drawing>> last processed widget was "Red Tooltip"
    [f=0000145] Aborted (SIGABRT) in spring 0.82+.4.0 (Debug)
    [f=0000145] Stacktrace:
    [f=0000145] <0> /lib/libc.so.6(+0x33af0) [0x7f0a6198daf0]
    [f=0000145] <1> /lib/libc.so.6(gsignal+0x35) [0x7f0a6198da75]
    [f=0000145] <2> /lib/libc.so.6(abort+0x180) [0x7f0a619915c0]
    [f=0000145] <3> /lib/libc.so.6(__assert_fail+0xf1) [0x7f0a61986941]
    [f=0000145] <4> /home/abma/local/spring/master/bin/spring() [0x817625]
    [f=0000145] <5> /home/abma/local/spring/master/bin/spring() [0x8180e4]
    [f=0000145] <6> /home/abma/local/spring/master/bin/spring() [0x817be1]
    [f=0000145] <7> /home/abma/local/spring/master/bin/spring() [0xec0364]
    [f=0000145] <8> /home/abma/local/spring/master/bin/spring() [0xeb0233]
    [f=0000145] <9> /home/abma/local/spring/master/bin/spring() [0x92737a]
    [f=0000145] Translated Stacktrace:
    [f=0000145] (1) /lib/libc.so.6:??
    [f=0000145] (2) /lib/libc.so.6:??
    [f=0000145] (3) /lib/libc.so.6:??
    [f=0000145] (4) /lib/libc.so.6:??
    [f=0000145] (5) /usr/include/boost/thread/pthread/mutex.hpp:51
    [f=0000145] (6) /usr/include/boost/thread/locks.hpp:339
    [f=0000145] (7) /usr/include/boost/thread/locks.hpp:225
    [f=0000145] (8) /home/abma/dev/spring/master/rts/System/Sound/SoundSource.cpp:257
    [f=0000145] (9) /home/abma/dev/spring/master/rts/System/Sound/MusicChannel.cpp:59
    [f=0000145] (10) /home/abma/dev/spring/master/rts/Lua/LuaUnsyncedCtrl.cpp:691
    [f=0000145] Path cache hits 0 0%
    [f=0000145] Path cache hits 0 0%
    [f=0000145] Statistics for local connection:
    Received: 1021 bytes
    Sent: 1640 bytes
    
    txt file icon infolog.txt (16,883 bytes) 2011-02-26 18:30 +

-Relationships
duplicate of 0002928resolvedabma sound effect make spring unplayable 
related to 0002184closed Audio stutters in 82.6.1 when affinity is set in singlethreated spring 
+Relationships

-Notes

~0006434

jK (developer)

https://github.com/spring/spring/commit/7b22a0edf78d41dd3558defa5aa3b1796b8cc53f#comments ?

~0006439

zerver (reporter)

Could you try with /dynamicsun

~0006440

abma (administrator)

Last edited: 2011-02-26 18:45

sorry, this was bit to unspecific.

with /dynamicsun 0 drawworld is again at 7percent but the stuttering is still there. in mt i get no sound-stutters.

if debugmode (alt-b) is on or off makes no difference, i alwayws get sound-stutters in singlethread-spring.

tested with 0.82.3-1446-g4adf86d

i tried also with EFX=1 & EFX=0

maybe the inflog.txt helps?

(real) cpu is at 100percent, but i have to play with VSync=0 (ATI-Bug)
cpu in springs debug mode shown is at average ~5percent or so...

even in pause mode sound stutters...



i'll bisect

~0006441

abma (administrator)

Last edited: 2011-02-26 19:01

66de8f60e863befa61e5addaea539877dd78d064 is the last working version (the others don't compile)
so, it looks like the efx-commits creates the problem :-/

$ git bisect log
git bisect start
# bad: [4adf86d0e239a3d6196a8f4bc69fc35b93e5df11] fix inverted logic for track-deletion
git bisect bad 4adf86d0e239a3d6196a8f4bc69fc35b93e5df11
# good: [a8709bf8e7032f0a67cfeb68f1014f5fb968380e] Merge branch 'master' of git@github.com:spring/spring
git bisect good a8709bf8e7032f0a67cfeb68f1014f5fb968380e
# good: [8c869ab098ed0fb54304d4902230200a4946d8c7] fix (rare) teleportation of aircraft built on raised platforms
git bisect good 8c869ab098ed0fb54304d4902230200a4946d8c7
# bad: [39d0eb4a68824cb35052d797e9d679c2105abf85] 3rd try
git bisect bad 39d0eb4a68824cb35052d797e9d679c2105abf85
# good: [66de8f60e863befa61e5addaea539877dd78d064] modularized Watchdog & added Linux implementation * it can now handle any number of threads * it gives threads names - currently "main" (:= render-thread in spring-mt) & "sim" (only in spring-mt) * syntax of the Lua function changed too: Spring.ClearWatchDogTimer() --clears current thread's timer Spring.ClearWatchDogTimer("sim") --clears the timer of the "sim" thread
git bisect good 66de8f60e863befa61e5addaea539877dd78d064

~0006482

abma (administrator)

hm, maybe sounds are only played twice with a tiny time difference?

~0006483

zerver (reporter)

could be, that has happened in the past too

~0006563

abma (administrator)

@jk:

output of pulseaudio -v -v:

http://pastebin.com/FiLThj1q

the stuttering seems to come from buffer-underruns:
D: protocol-native.c: Underrun on 'Playback Stream', 0 bytes in queue.
D: protocol-native.c: Requesting rewind due to end of underrun.

~0006564

abma (administrator)

when changing
/etc/openal/alsoft.conf:
drivers = pulse (ubuntu default)
to
drivers = alsa,pulse

stuttering seems to be gone

~0006565

jK (developer)

Last edited: 2011-04-24 04:16

don't use pulseaudio, use alsa directly?

EDIT: this explains why I didn't encountered this issue.

~0006566

hoijui (reporter)

hmm.. ok... should we consider this a sufficient fix?
it would be nice if not 95% of our linux playerbase would have to do that on next release. can we prevent the buffer-under-runs from within spring? i would guess yes, as it does not happen in release version... so the question is, should we try to do it:
* how much time would that require and is the time worth it?
* would the "fix" likely be ok, or rather an ugly hack?

~0006567

abma (administrator)

Last edited: 2011-04-25 13:34

when adding this line to /etc/openal/alsoft.conf (with drivers = pulse)

excludefx = eaxreverb

stuttering is also gone + log spam of [Sound] CSound::UpdateListener: Invalid Name

in my .springrc is a "UseEFX=0"

~0006633

hoijui (reporter)

as discussed in meeting of 9. May 2011:

problem:
when EFX is enabled, pulseaudio is too slow in passing on packets to ALSA, and thus creates sound-lag

solution:
when pulseaudio is detected (linux only :D ), print a FAT warning like for low tech GFX cards, and disable EFX; do so only for runtime, not in the config, so it gets auto-enabled for the user when he un-uses pulseaudio.

~0006642

hoijui (reporter)

i can not see anything about pulseaudio in my infolog, only ALSA, and i think it never was there... so the detection mechanism will be more complicated to implement.
..then again.. i have UseEFX=0, and i still get the stuttering. :/
in other words.. this solution is none :/

~0006643

abma (administrator)

is LogSubsystems=Sound enabled?

you should see something like this:
[f=0000000] [Sound] Device: ALSA Software
[f=0000000] [Sound] Available Devices:
[f=0000000] [Sound] ALSA Software
[f=0000000] [Sound] PulseAudio Software

~0006644

abma (administrator)

Last edited: 2011-05-11 11:20

imo UseEFX=0 doesn't work... or why does "excludefx = eaxreverb" change behaviour with UseEFX=0?

~0006650

hoijui (reporter)

Last edited: 2011-06-10 16:21

yes i see that, and this subsystem is enabled by default (Aus made it so when he reworked sound, and that never got changed).
yeah.. sorry, read you wrong there.
we'll have to investigate more here...

~0007594

abma (administrator)

some more people have the stuttering problems:
http://springrts.com/phpbb/viewtopic.php?uid=8601&f=11&t=27079

~0007595

spliff (reporter)

Had a discussion with an OpenAL dev on openal@freenode. Got some information that may be useful but no conclusions except disabling either eaxreverb or pulseaudio. Chat log is here: http://echelog.matzon.dk/logs/browse/openal/1321225200

~0008687

abma (administrator)

seems to be fixed in spring 88 / newer linux distributions...
+Notes

-Issue History
Date Modified Username Field Change
2011-02-25 21:13 abma New Issue
2011-02-25 22:22 jK Note Added: 0006434
2011-02-26 18:03 zerver Note Added: 0006439
2011-02-26 18:29 abma Note Added: 0006440
2011-02-26 18:30 abma Summary (master) big spikes in drawworld (debug-mode/alt-b) => (master) sound stuttering in current spring master
2011-02-26 18:30 abma File Added: infolog.txt
2011-02-26 18:32 abma Note Edited: 0006440
2011-02-26 18:32 abma Note Edited: 0006440
2011-02-26 18:38 abma Note Edited: 0006440
2011-02-26 18:41 abma Note Edited: 0006440
2011-02-26 18:45 abma Note Edited: 0006440
2011-02-26 18:57 abma Note Added: 0006441
2011-02-26 19:00 abma Note Edited: 0006441
2011-02-26 19:00 abma Note Edited: 0006441
2011-02-26 19:01 abma Note Edited: 0006441
2011-02-26 19:02 abma Summary (master) sound stuttering in current spring master => (master) sound stuttering in current spring master (singlethread only)
2011-02-26 20:06 abma Relationship added related to 0002184
2011-03-10 21:20 abma Note Added: 0006482
2011-03-11 18:30 zerver Note Added: 0006483
2011-04-24 04:10 abma Note Added: 0006563
2011-04-24 04:15 abma Note Added: 0006564
2011-04-24 04:15 jK Note Added: 0006565
2011-04-24 04:16 jK Note Edited: 0006565
2011-04-24 18:32 hoijui Note Added: 0006566
2011-04-25 13:16 abma Note Added: 0006567
2011-04-25 13:17 abma Note Edited: 0006567
2011-04-25 13:19 abma Note Edited: 0006567
2011-04-25 13:19 abma Note Edited: 0006567
2011-04-25 13:34 abma Note Edited: 0006567
2011-05-09 23:22 hoijui Note Added: 0006633
2011-05-11 10:16 hoijui Note Added: 0006642
2011-05-11 11:04 abma Note Added: 0006643
2011-05-11 11:19 abma Note Added: 0006644
2011-05-11 11:20 abma Note Edited: 0006644
2011-05-12 00:03 hoijui Note Added: 0006650
2011-05-12 04:04 abma Summary (master) sound stuttering in current spring master (singlethread only) => (master) sound stuttering in current spring master
2011-05-12 04:04 abma Summary (master) sound stuttering in current spring master => (master) sound stuttering/choppy in current spring master
2011-06-10 16:21 hoijui Note Edited: 0006650
2011-06-10 16:21 hoijui Target Version => 0.83.0
2011-06-10 16:21 hoijui Description Updated
2011-11-13 14:56 abma Note Added: 0007594
2011-11-14 08:47 spliff Note Added: 0007595
2011-11-23 10:45 hoijui Product Version => 0.82.7+git
2011-11-23 10:45 hoijui Build => 0.82.3-1440-g97d08b9
2011-11-23 10:45 hoijui Additional Information Updated
2012-05-13 11:49 abma Relationship added duplicate of 0002928
2012-05-13 11:51 abma Note Added: 0008687
2012-05-13 11:51 abma Status new => resolved
2012-05-13 11:51 abma Resolution open => fixed
2012-05-13 11:51 abma Assigned To => abma
+Issue History