dvdvideo1234 / TrackAssemblyTool

A Garry's mod tool for assembing a prop-segmented track
GNU Affero General Public License v3.0
21 stars 2 forks source link

[BUG] #39

Closed dvdvideo1234 closed 2 years ago

dvdvideo1234 commented 2 years ago

User receives library error when installing custom database Reporter: https://steamcommunity.com/profiles/76561199170637525

Description: Importing DSV raises Lua error as last line does not contain stuff and reader is expected to return a string and EOF flag. When trimming request is issued the library tries to auto-trim a nil value for GetStringFile(fS, nil) calls:

Error: https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/lua/trackassembly/trackasmlib.lua#L576

[Track Assembly Tool] lua/trackassembly/trackasmlib.lua:576: attempt to index local 'sLine' (a nil value)
1. GetStringFile - lua/trackassembly/trackasmlib.lua:576
2. ImportDSV - lua/trackassembly/trackasmlib.lua:3485
3. ProcessDSV - lua/trackassembly/trackasmlib.lua:3754
4. unknown - lua/weapons/gmod_tool/stools/trackassembly.lua:99
5. include - [C]:-1
6. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua:142
7. include - [C]:-1
8. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:353
9. include - [C]:-1
10. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/init.lua:10
dvdvideo1234 commented 2 years ago

Closed in https://github.com/dvdvideo1234/TrackAssemblyTool/commit/a673b69fa027eaeecdc97e4e153f9ab21c08817d and update workshop