You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upload a file with percent signs in the filename (followed by anything other than 2 hex digits) - e.g. 20x_110%_110%_20mm_Ikea_Samla_Clip_45-65L_by_Wookbert_Rev._E3_0.6n_0.2mm_PETG_MK3S_6h23m.gcode
In OctoScreen, tap Print
Tap the uploaded file
Confirm by tapping Yes
Expected result: The file starts printing.
Actual result: OctoScreen crashes and restarts. (Also the file thumbnail is missing in the file list. I assume it’s a related issue.)
Then in client.go, the invalid URI is passed to url.Parse() which likely fails, but because the error is ignored, the application crashes 2 lines later with a nil pointer dereference.
Log:
Feb 28 00:14:29 prusheen xinit[3285]: time="2022-02-28T00:14:29+01:00" level=info msg=" Loading list of files from: local" file=logger.go func=logger.Infof line=150
Feb 28 00:14:34 prusheen xinit[3285]: time="2022-02-28T00:14:34+01:00" level=info msg=" Setting panel to \"FilesPanel\"" file=logger.go func=logger.Infof line=150
Feb 28 00:14:34 prusheen xinit[3285]: time="2022-02-28T00:14:34+01:00" level=info msg=" Background task closed" file=logger.go func=logger.Info line=146
Feb 28 00:14:39 prusheen xinit[3285]: time="2022-02-28T00:14:39+01:00" level=info msg=" Loading file \"20x_110%_110%_20mm_Ikea_Samla_Clip_45-65L_by_Wookbert_Rev._E3_0.6n_0.2mm_PETG_MK3S_6h23m.gcode\"" file=logger.go func=logger.Infof line=150
Feb 28 00:14:39 prusheen xinit[3285]: 2022/02/28 00:14:39 main's defer() was called, now calling recover()
Feb 28 00:14:39 prusheen xinit[3285]: 2022/02/28 00:14:39 main's defer() - recover: runtime error: invalid memory address or nil pointer dereference
Feb 28 00:14:39 prusheen xinit[3285]: 2022/02/28 00:14:39 main's defer() - [1] /usr/local/go/src/runtime/asm_arm.s, line 432
Feb 28 00:14:39 prusheen xinit[3285]: 2022/02/28 00:14:39 main's defer() - [2] /usr/local/go/src/runtime/panic.go, line 491
Feb 28 00:14:39 prusheen xinit[3285]: 2022/02/28 00:14:39 main's defer() - [3] /usr/local/go/src/runtime/panic.go, line 63
Feb 28 00:14:39 prusheen xinit[3285]: 2022/02/28 00:14:39 main's defer() - [4] /usr/local/go/src/runtime/signal_unix.go, line 367
Feb 28 00:14:39 prusheen xinit[3285]: 2022/02/28 00:14:39 main's defer() - [5] /usr/local/go/src/net/url/url.go, line 942
Feb 28 00:14:39 prusheen xinit[3285]: 2022/02/28 00:14:39 main's defer() - [6] /go/src/github.com/Z-Bolt/OctoScreen/obj-arm-linux-gnueabihf/src/github.com/Z-Bolt/OctoScreen/octoprintApis/client.go, line 224
Feb 28 00:14:39 prusheen xinit[3285]: 2022/02/28 00:14:39 main's defer() - [7] /go/src/github.com/Z-Bolt/OctoScreen/obj-arm-linux-gnueabihf/src/github.com/Z-Bolt/OctoScreen/octoprintApis/client.go, line 90
Feb 28 00:14:39 prusheen xinit[3285]: 2022/02/28 00:14:39 main's defer() - [8] /go/src/github.com/Z-Bolt/OctoScreen/obj-arm-linux-gnueabihf/src/github.com/Z-Bolt/OctoScreen/octoprintApis/client.go, line 59
Feb 28 00:14:39 prusheen xinit[3285]: 2022/02/28 00:14:39 main's defer() - [9] /go/src/github.com/Z-Bolt/OctoScreen/obj-arm-linux-gnueabihf/src/github.com/Z-Bolt/OctoScreen/octoprintApis/SelectFileRequest.go, line 38
Feb 28 00:14:39 prusheen xinit[3285]: 2022/02/28 00:14:39 main's defer() was called, now exiting func()
Feb 28 00:14:39 prusheen xinit[3285]: /usr/bin/xinit: connection to X server lost
Feb 28 00:14:39 prusheen xinit[3285]: [1B blob data]
Feb 28 00:14:39 prusheen xinit[3285]: waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.
The text was updated successfully, but these errors were encountered:
Repro steps:
20x_110%_110%_20mm_Ikea_Samla_Clip_45-65L_by_Wookbert_Rev._E3_0.6n_0.2mm_PETG_MK3S_6h23m.gcode
Expected result: The file starts printing.
Actual result: OctoScreen crashes and restarts. (Also the file thumbnail is missing in the file list. I assume it’s a related issue.)
Likely cause:
SelectFileRequest.go
, the file name is joined into URI without escaping special characters resulting in an invalid URI.client.go
, the invalid URI is passed tourl.Parse()
which likely fails, but because the error is ignored, the application crashes 2 lines later with a nil pointer dereference.Log:
The text was updated successfully, but these errors were encountered: