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

Nexus: %20N header crashes Kodi #229

Open
matthuisman opened this issue Mar 5, 2023 · 21 comments
Open

Nexus: %20N header crashes Kodi #229

matthuisman opened this issue Mar 5, 2023 · 21 comments

Comments

@phunkyfish
Copy link
Collaborator

Note that this crash occurs on Nexus only. It works ok on Matrix.

@matthuisman do you know if this is kodi issue or an add-on issue?

@basilgello FYI

@matthuisman
Copy link
Author

i use the same pipe headers fine with IA and built-in ffmpeg. Just crashes with ffmpeg direct only

@basilgello
Copy link
Contributor

Interesting. But where's the stacktrace?

@phunkyfish
Copy link
Collaborator

@basilgello do the URLS cause a crash for you on non-windows?

@matthuisman
Copy link
Author

@basilgello how can i get stacktrace without a debug build?

@phunkyfish
Copy link
Collaborator

phunkyfish commented Mar 6, 2023

You will need a debug build.

@matthuisman
Copy link
Author

i dont really want to setup the build environment on this pc so might just leave it for now.

Most of the time stacktrace isn't required for bug issues I hope?
Most end-users wouldn't know where to start with that

@phunkyfish
Copy link
Collaborator

We should be able to build you a debug build in Jenkins.

@phunkyfish
Copy link
Collaborator

phunkyfish commented Mar 7, 2023

Here is a debug build and a PDB. The add-on should be included in the build. I don’t know if the add-on is also built with debug. I guess we’ll find out.

https://mirrors.kodi.tv/test-builds/windows/win64/KodiSetup-20230306-038f4e73-Nexus-x64.exe

https://mirrors.kodi.tv/test-builds/windows/win64/KodiSetup-20230306-038f4e73-Nexus-x64.pdb

If add-on is not debug I’ll find someone in the team to build it for us. I assume you would only need the PDB for the add-on.

@matthuisman
Copy link
Author

couldnt get any crash log out of kodi. maybe I need visual studio?

Anyway - here is test strm that can be used to reproduce that should work any where in the world
Windows x64. crashes on Kodi 20 and 21 (v.20.5.0) Fine on 19 (v19.0.3)
test.strm.txt

below works on all (no %20N in user-agent)
test2.strm.txt

@basilgello
Copy link
Contributor

I can not reproduce the crash on Debian. However, this closely reminds me the parsing error in urldecode.

@phunkyfish
Copy link
Collaborator

Yes, likely here:

std::string CURL::Decode(const std::string& strURLData)

But that same code is in Kodi:

https://github.com/xbmc/xbmc/blob/eac2e81c62aec2099404d2eb66ccb64a67e9bcfd/xbmc/URL.cpp#L647

@phunkyfish
Copy link
Collaborator

couldnt get any crash log out of kodi. maybe I need visual studio?

Anyway - here is test strm that can be used to reproduce that should work any where in the world Windows x64. crashes on Kodi 20 and 21 (v.20.5.0) Fine on 19 (v19.0.3) test.strm.txt

below works on all (no %20N in user-agent) test2.strm.txt

Yes, you would need VS and load the PDB file while running the binary. VS Code should also be able to do this.

@basilgello
Copy link
Contributor

Why whole VS? WinDbg / cdb no??? I can try setting VM to reproduce the issue

@phunkyfish
Copy link
Collaborator

I’m not familiar with Windows debug tools at all. If you can do that @basilgello then great.

@matthuisman
Copy link
Author

any updates on this? really wanting to try using ffmpeg direct for timeshift :)

@matthuisman
Copy link
Author

googled %20n crash and found
https://www.reddit.com/r/networking/comments/28o8xi/comment/cicwz2m/?utm_source=share&utm_medium=web2x&context=3

Looks like a printf / sprintf issue

@phunkyfish
Copy link
Collaborator

Bonus points if you can tell me which is the offending statement!

@matthuisman
Copy link
Author

purely because the last line in log is ffmpegdirect::FFmpegStream::Open - av_find_stream_info finished

@matthuisman
Copy link
Author

matthuisman commented Aug 18, 2023

changed the N to a M i get

2023-08-18 22:27:39.045 T:8796    debug <general>: AddOnLog: inputstream.ffmpegdirect: ffmpegdirect::FFmpegStream::Open - avformat_find_stream_info starting
2023-08-18 22:27:39.228 T:8796    debug <general>: AddOnLog: inputstream.ffmpegdirect: ffmpegdirect::FFmpegStream::Open - av_find_stream_info finished
2023-08-18 22:27:39.228 T:8796     info <general>: AddOnLog: inputstream.ffmpegdirect: ffmpeg[7A9FCB93]: Input #0, hls, from 'https://i.mjh.nz/tvnz-1.m3u8|user-agent=TESTM':

When its N, it doesnt get that last line.
Also interesting TEST%20M comes out as TESTM (should be TEST M (with a space))

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

Successfully merging a pull request may close this issue.

3 participants