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

[BUG] Engines are completely broken #400

Closed
dobriyprop opened this issue Apr 13, 2024 · 3 comments
Closed

[BUG] Engines are completely broken #400

dobriyprop opened this issue Apr 13, 2024 · 3 comments
Assignees
Labels
bug Something isn't working dev branch For issues and suggestions related to changes on the development branch serverside

Comments

@dobriyprop
Copy link

Short Description

Whenever you try to start an engine - ACF crashes with an error

Branch and Version

Git-dev-f8ee62a

Console Error Logs (Optional)

Starfall acfSetActive() crash

starfall] Warning! A net message (ACF_Sounds_AdjustableCreate) is already started! Discarding in favor of the new message! (starfall_error)
  1. SendError - addons/starfall/lua/starfall/transfer.lua:113
   2. Error - addons/starfall/lua/entities/starfall_processor/shared.lua:141
    3. runOnError - addons/starfall/lua/entities/starfall_processor/shared.lua:49
     4. Error - addons/starfall/lua/starfall/instance.lua:774
      5. runScriptHook - addons/starfall/lua/starfall/instance.lua:634
       6. v - addons/starfall/lua/starfall/sflib.lua:744
        7. unknown - lua/includes/modules/hook.lua:96

Hook 'tick' errored with: addons/acf-3-dev/lua/acf/core/utilities/sounds/sounds_sv.lua:38: bad argument #1 to 'WriteString' (string expected, got function)
stack traceback:
    [C]: in function 'WriteString'
    addons/acf-3-dev/lua/acf/core/utilities/sounds/sounds_sv.lua:38: in function 'CreateAdjustableSound'
    addons/acf-3-dev/lua/entities/acf_engine/init.lua:634: in function 'UpdateSound'
    addons/acf-3-dev/lua/entities/acf_engine/init.lua:200: in function 'SetActive'
    addons/acf-3-dev/lua/entities/acf_engine/init.lua:577: in function 'Action'
    addons/acf-3-dev/lua/entities/acf_base_simple/init.lua:133: in function 'TriggerInput'
    starfall/libs_sh/acffunctions.lua:930: in function 'acfSetActive'
    SF:libs/xinput_car_controller_lib.txt:249: in function <SF:libs/xinput_car_controller_lib.txt:247>

Wiremod inputs crash

[ACF - Info] Successfully linked Petrol Tank[ID: 1157] to 1.4L Flat 4 Petrol[ID: 1171].
Wire error (Entity [1171][acf_engine] by Player [1][dobriy]):
addons/acf-3-dev/lua/acf/core/utilities/sounds/sounds_sv.lua:38: bad argument #1 to 'WriteString' (string expected, got function)
stack traceback:
	[C]: in function 'WriteString'
	addons/acf-3-dev/lua/acf/core/utilities/sounds/sounds_sv.lua:38: in function 'CreateAdjustableSound'
	addons/acf-3-dev/lua/entities/acf_engine/init.lua:634: in function 'UpdateSound'
	addons/acf-3-dev/lua/entities/acf_engine/init.lua:200: in function 'SetActive'
	addons/acf-3-dev/lua/entities/acf_engine/init.lua:577: in function 'Action'
	addons/acf-3-dev/lua/entities/acf_base_simple/init.lua:133: in function <addons/acf-3-dev/lua/entities/acf_base_simple/init.lua:124>
	[C]: in function 'xpcall'
	addons/wire/lua/wire/server/wirelib.lua:82: in function 'TriggerInput'
	addons/wire/lua/wire/server/wirelib.lua:662: in function 'Wire_TriggerOutput'
	addons/wire/lua/entities/gmod_wire_button.lua:172: in function 'Switch'
	addons/wire/lua/entities/gmod_wire_button.lua:98: in function <addons/wire/lua/entities/gmod_wire_button.lua:83>

[wire] Warning! A net message (ACF_Sounds_AdjustableCreate) is already started! Discarding in favor of the new message! (wire_clienterror)
  1. ClientError - addons/wire/lua/wire/wireshared.lua:303
   2. TriggerInput - addons/wire/lua/wire/server/wirelib.lua:88
    3. Wire_TriggerOutput - addons/wire/lua/wire/server/wirelib.lua:662
     4. Switch - addons/wire/lua/entities/gmod_wire_button.lua:172
      5. unknown - addons/wire/lua/entities/gmod_wire_button.lua:98

sv: Wire error (Entity [1171][acf_engine] by Player [1][dobriy]):
addons/acf-3-dev/lua/acf/core/utilities/sounds/sounds_sv.lua:38: bad argument #1 to 'WriteString' (string expected, got function)
stack traceback:
	[C]: in function 'WriteString'
	addons/acf-3-dev/lua/acf/core/utilities/sounds/sounds_sv.lua:38: in function 'CreateAdjustableSound'
	addons/acf-3-dev/lua/entities/acf_engine/init.lua:634: in function 'UpdateSound'
	addons/acf-3-dev/lua/entities/acf_engine/init.lua:200: in function 'SetActive'
	addons/acf-3-dev/lua/entities/acf_engine/init.lua:577: in function 'Action'
	addons/acf-3-dev/lua/entities/acf_base_simple/init.lua:133: in function <addons/acf-3-dev/lua/entities/acf_base_simple/init.lua:124>
	[C]: in function 'xpcall'
	addons/wire/lua/wire/server/wirelib.lua:82: in function 'TriggerInput'
	addons/wire/lua/wire/server/wirelib.lua:662: in function 'Wire_TriggerOutput'
	addons/wire/lua/entities/gmod_wire_button.lua:172: in function 'Switch'
	addons/wire/lua/entities/gmod_wire_button.lua:98: in function <addons/wire/lua/entities/gmod_wire_button.lua:83>

How to Reproduce (Optional)

  1. Spawn an engine
    1.1) [Optionaly] Link and activate fueltank
  2. Spawn a button. Attach engine's Active wire input to buttons wire output
  3. Press the button
  4. Engine crashes

Screenshots (Optional)

Starfall acfSetActive() crash

acf-starfall-crash.webm

Wiremod inputs crash

acf-wiremod-crash.webm

Additional Information (Optional)

Might be related to the latest attempt to fix engine sounds not playing after you do startup-shutdown sequence once and start engine again.

@dobriyprop dobriyprop added the bug Something isn't working label Apr 13, 2024
@TwistedTail TwistedTail self-assigned this Apr 13, 2024
@TwistedTail TwistedTail added dev branch For issues and suggestions related to changes on the development branch serverside labels Apr 13, 2024
TwistedTail added a commit that referenced this issue Apr 13, 2024
- Added a missile line of code that references the current sound path on an engine when its sounds get updated, fixes #400
- Edited a comment that was messing with the syntax highlighing on Github.
@TwistedTail
Copy link
Member

Should be fixed now, could you give it a look if everything works fine on your end aswell?

@dobriyprop
Copy link
Author

Seems like the fix is working. And the issue with engine sounds stop working after 1 startup-shutdown cycle is no longer present. I've tested both in single player and on dedicated server.

2024-04-13_11-54.webm

Minor thing - for some reason on dedicated server ACF misreports Client version
изображение

@thecraftianman
Copy link
Member

Oops sorry lol, this was because of this typo I made while fixing the other issue

Minor thing - for some reason on dedicated server ACF misreports Client version

Afaik this has been a thing forever. Imo @TwistedTail we should just remove the Client Status section entirely since only the server version actually matters. Might be more productive to replace it with the ability to add tabs for any repositories so that the Missiles, etc. versions can be viewed from the menu as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dev branch For issues and suggestions related to changes on the development branch serverside
Projects
Development

No branches or pull requests

3 participants