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

[Linux] custom bot scripts resulting in crash #1176

Closed
b3nn0 opened this issue Feb 12, 2017 · 13 comments
Closed

[Linux] custom bot scripts resulting in crash #1176

b3nn0 opened this issue Feb 12, 2017 · 13 comments
Assignees
Labels

Comments

@b3nn0
Copy link

b3nn0 commented Feb 12, 2017

Almost all bot scripts I downloaded from the workshop cause the game to crash on Linux.
The reason can easily be seen in the resulting crash dump - there seems to be some incorrect file path building in the code.

Console History (reversed)

399(39.251245):  Failed to run script '/home/ben/hdd2/Spiele/Steam/steamapps/workshop/content/570/836628163\mode_laning_furion.lua'!
398(39.251237):  Script Runtime Error: ...ps/workshop/content/570/836628163/mode_laning_furion.lua:7: module '/home/ben/hdd2/Spiele/Steam/steamapps/workshop/content/570/836628163/mode_laning_generic' not found:
        no field package.preload['/home/ben/hdd2/Spiele/Steam/steamapps/workshop/content/570/836628163/mode_laning_generic']Failed to find scripts/vscripts//home/ben/hdd2/Spiele/Steam/steamapps/workshop/content/570/836628163/mode_laning_generic.lua
stack traceback:
        [C]: in function 'require'
        ...ps/workshop/content/570/836628163/mode_laning_furion.lua:7: in main chunk
397(39.250916):  Failed to run script '/home/ben/hdd2/Spiele/Steam/steamapps/workshop/content/570/836628163\item_purchase_furion.lua'!
396(39.250903):  Script Runtime Error: .../workshop/content/570/836628163/item_purchase_furion.lua:6: module '/home/ben/hdd2/Spiele/Steam/steamapps/workshop/content/570/836628163/Utility' not found:
        no field package.preload['/home/ben/hdd2/Spiele/Steam/steamapps/workshop/content/570/836628163/Utility']Failed to find scripts/vscripts//home/ben/hdd2/Spiele/Steam/steamapps/workshop/content/570/836628163/Utility.lua
stack traceback:
        [C]: in function 'require'
        .../workshop/content/570/836628163/item_purchase_furion.lua:6: in main chunk
395(39.166068):  Error loading resource file "materials/particle/ground/crack_growth_01_noadd.vmat_c" (Error: ERROR_FILEOPEN)

To reproduce: download a bot script from the workshop and try to start a game with these bots.
Might be related to using a custom game directory. I didn't try the default directory as it's on a small SSD and doesn't have enough space.

System info:
Note that below it says I'm running Ubuntu 17.04. That is NOT true. I'm running 16.10, but I have KUbuntu backports repository enabled for the latest Plasma version, as well as the ubuntu-toolchain-r PPA for latest compilers. I guess that overrode my lsb_release file.

Computer Information:
    Manufacturer:  Unknown
    Model:  Unknown
    Form Factor: Desktop
    No Touch Input Detected
    
Processor Information:
    CPU Vendor:  GenuineIntel
    CPU Brand:  Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
    CPU Family:  0x6
    CPU Model:  0x3c
    CPU Stepping:  0x3
    CPU Type:  0x0
    Speed:  4500 Mhz
    8 logical processors
    4 physical processors
    HyperThreading:  Supported
    FCMOV:  Supported
    SSE2:  Supported
    SSE3:  Supported
    SSSE3:  Supported
    SSE4a:  Unsupported
    SSE41:  Supported
    SSE42:  Supported
    AES:  Supported
    AVX:  Supported
    CMPXCHG16B:  Supported
    LAHF/SAHF:  Supported
    PrefetchW:  Unsupported
    
Network Information:
    Network Speed:  
    
Operating System Version:
    Ubuntu Zesty Zapus (development branch) (64 bit)
    Kernel Name:  Linux
    Kernel Version:  4.8.0-37-generic
    X Server Vendor:  The X.Org Foundation
    X Server Release:  11804000
    X Window Manager:  KWin
    Steam Runtime Version:  steam-runtime-beta-release_2016-12-05
    
Video Card:
    Driver:  NVIDIA Corporation GeForce GTX 770/PCIe/SSE2

    Driver Version:  4.5.0 NVIDIA 370.28
    OpenGL Version: 4.5
    Desktop Color Depth: 24 bits per pixel
    Monitor Refresh Rate: 60 Hz
    VendorID:  0x10de
    DeviceID:  0x1184
    Revision Not Detected
    Number of Monitors:  2
    Number of Logical Video Cards:  1
    Primary Display Resolution:  1920 x 1080
    Desktop Resolution: 3840 x 1080
    Primary Display Size: 18,78" x 10,55"  (21,54" diag)
                                            47,7cm x 26,8cm  (54,7cm diag)
    Primary Bus: PCI Express 16x
    Primary VRAM: 2048 MB
    Supported MSAA Modes:  2x 4x 8x 16x 
    
Sound card:
    Audio device: Realtek ALC892
    
Memory:
    RAM:  32132 Mb
    
Miscellaneous:
    UI Language:  English
    LANG:  de_DE.UTF-8
    Microphone:  Not set
    Steam Controller Cable and Base:  Not set
    Total Hard Disk Space Available:  240237 Mb
    Largest Free Hard Disk Block:  98926 Mb
    VR Headset: None detected
    
Recent Failure Reports:
    Sun Feb 12 10:28:03 2017 GMT: file ''/tmp/dumps/assert_20170212112801_25.dmp'', upload yes: ''CrashID=bp-c74e8083-c3d0-4170-a382-538e22170212''
    Sun Feb 12 11:18:44 2017 GMT: file ''/tmp/dumps/crash_20170212121430_1.dmp'', upload yes: ''Discarded=1''
    Sun Feb 12 11:19:19 2017 GMT: file ''/tmp/dumps/crash_20170212121849_1.dmp'', upload yes: ''Discarded=1''
    Sun Feb 12 11:19:52 2017 GMT: file ''/tmp/dumps/crash_20170212121923_1.dmp'', upload yes: ''Discarded=1''
    Sun Feb 12 11:21:18 2017 GMT: file ''/tmp/dumps/crash_20170212121953_1.dmp'', upload yes: ''CrashID=bp-11241fd9-a887-485c-b1fb-754152170212''
    Sun Feb 12 11:25:28 2017 GMT: file ''/tmp/dumps/crash_20170212122417_1.dmp'', upload yes: ''CrashID=bp-bdea92c0-1b03-4b55-9016-79a402170212''
    Sun Feb 12 11:27:59 2017 GMT: file ''/tmp/dumps/crash_20170212122531_1.dmp'', upload yes: ''Discarded=1''
    Sun Feb 12 11:33:32 2017 GMT: file ''/tmp/dumps/crash_20170212123159_1.dmp'', upload yes: ''Discarded=1''
    Sun Feb 12 11:39:07 2017 GMT: file ''/tmp/dumps/assert_20170212123906_19.dmp'', upload yes: ''CrashID=bp-240c41b5-1373-4a5b-af68-c03952170212''
    Sun Feb 12 11:41:46 2017 GMT: file ''/tmp/dumps/assert_20170212124145_18.dmp'', upload yes: ''CrashID=bp-6eea651a-b1f8-421e-8754-1ca5f2170212''
    Sun Feb 12 11:42:32 2017 GMT: file ''/tmp/dumps/crash_20170212124151_1.dmp'', upload yes: ''Discarded=1''
@gdrewb-valve gdrewb-valve self-assigned this Feb 12, 2017
@gdrewb-valve
Copy link
Contributor

I passed this on to the larger team and they said the Feb. 13 update has some path slash fixes, do things work any better? It's possible for non-Valve code to have issues also but first we'll see if the Dota update helped.

@b3nn0
Copy link
Author

b3nn0 commented Feb 14, 2017

The log has changed, but Dota still crashes:

4384(35.357126):  LuaDbg - Debugging stopped
4383(35.149583):  Failed to run script '/home/ben/hdd2/Spiele/Steam/steamapps/workshop/content/570/837040016/item_purchase_generic.lua'!
4382(35.149567):  Script Runtime Error: ...workshop/content/570/837040016/item_purchase_generic.lua:8: module '/home/ben/hdd2/Spiele/Steam/steamapps/workshop/content/570/837040016/util' not found:
        no field package.preload['/home/ben/hdd2/Spiele/Steam/steamapps/workshop/content/570/837040016/util']Failed to find scripts/vscripts//home/ben/hdd2/Spiele/Steam/steamapps/workshop/content/570/837040016/util.lua
stack traceback:
        [C]: in function 'require'
        ...workshop/content/570/837040016/item_purchase_generic.lua:8: in main chunk

Note the "scripts/vscripts//home/ben/hdd2/....."
It somehow tries to find the util.lua module with a recursive path, then simply slaps the absolute path behind it. I guess GetScriptDirectory() returns wrong paths when using a custom steam library directory.
What the script does is simply a
local utils = require(GetScriptDirectory() .. "/util")

@shaddow2k
Copy link

I have the same issue. Two things I want to add:

  • Custom bots are working now, as long as "Local Host" is not selected in the lobby. The crashes happen only with Local Host selected for me. I am quite sure that wasn't the case before the last update.
  • The issue is also present on MAC systems, see the comments here for example.

@b3nn0
Copy link
Author

b3nn0 commented Feb 14, 2017

Well, yes, you are right. It only crashes when using Local Host.
However, when choosing a server, bots from the workshop just don't seem to work at all. The default bots are used instead (at least I'm pretty sure. They behave exactly like the default bots and the picks are also always picks that the default bots can do. Never seen a pick that would be supported by the bot script, but not by the default bots).

@gdrewb-valve
Copy link
Contributor

Is the error with Local Host still happening after the latest updates?

@b3nn0
Copy link
Author

b3nn0 commented Feb 21, 2017

Nope, seems to work now :)

@shaddow2k
Copy link

It is still crashing for me. I tried it with the custom bots "Pub Simulator" and "Bot Experiment Credit: Furiouspuppy"

2923(49.830207):  Failed to run script '/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/837040016/ability_item_usage_lich.lua'!
2922(49.830198):  Script Runtime Error: Failed to find scripts/vscripts//home/daniel//local/share/Steam/SteamApps/workshop/content/570/837040016/ability_item_usage_generic.lua
stack traceback:
	[C]: in function 'dofile'
	...rkshop/content/570/837040016/ability_item_usage_lich.lua:1: in main chunk
2921(49.830092):  Failed to run script '/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/837040016/item_purchase_generic.lua'!
2920(49.830074):  Script Runtime Error: ...workshop/content/570/837040016/item_purchase_generic.lua:4: module '/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/837040016/builds/item_build_lich' not found:
	no field package.preload['/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/837040016/builds/item_build_lich']Failed to find scripts/vscripts//home/daniel//local/share/Steam/SteamApps/workshop/content/570/837040016/builds/item_build_lich.lua
stack traceback:
	[C]: in function 'require'
  1. In line 2920 the script complains that "/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/837040016/builds/item_build_lich" can't be found. The correct path to the file is "/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/837040016/builds/item_build_lich.lua"
  2. In line 2922 the script can't find "scripts/vscripts//home/daniel//local/share/Steam/SteamApps/workshop/content/570/837040016/ability_item_usage_generic.lua" The file resides at "/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/837040016/ability_item_usage_generic.lua"

@gdrewb-valve
Copy link
Contributor

The main team has made more fixes in today's (Feb. 22) update.

@shaddow2k
Copy link

Yes and while I very much welcome the new features, it still crashes for local lobby bots here. Basically it is still the same error as above: The file path is still incorrect (pay attention to the messed up ".local" part and the missing file extensions of the file paths (the right side being correct)

  1. //local/ vs. /.local/
  2. mode_laning_generic vs. mode_laning_generic.lua
395(47.130783):  Failed to run script '/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/836628163/mode_laning_furion.lua'!
394(47.130770):  Script Runtime Error: ...ps/workshop/content/570/836628163/mode_laning_furion.lua:7: module '/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/836628163/mode_laning_generic' not found:
	no field package.preload['/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/836628163/mode_laning_generic']Failed to find /home/daniel//local/share/Steam/SteamApps/workshop/content/570/836628163/mode_laning_generic.lua
stack traceback:
	[C]: in function 'require'
	...ps/workshop/content/570/836628163/mode_laning_furion.lua:7: in main chunk
393(47.129873):  Failed to run script '/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/836628163/item_purchase_furion.lua'!
392(47.129855):  Script Runtime Error: .../workshop/content/570/836628163/item_purchase_furion.lua:6: module '/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/836628163/Utility' not found:
	no field package.preload['/home/daniel/.local/share/Steam/SteamApps/workshop/content/570/836628163/Utility']Failed to find /home/daniel//local/share/Steam/SteamApps/workshop/content/570/836628163/Utility.lua

I am pretty certain Point 1 is the problem here, as @b3nn0 doesn't encounter the problem anymore as he moved his game library to a different folder without a "." in the directory path.

@gdrewb-valve
Copy link
Contributor

I'll pass that back.

@shaddow2k
Copy link

The latest update fixed it! Thank you @gdrewb-valve and the rest of the team :)

@gdrewb-valve
Copy link
Contributor

OK, both @b3nn0 and @shaddow2k are reporting success. If nobody else chimes in with a new problem I'll close this out.

@gdrewb-valve
Copy link
Contributor

Seems good, closing.

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

No branches or pull requests

4 participants