Skip to content

Fix logging (Crash on % user-agents) [Piers]#326

Merged
phunkyfish merged 2 commits intoxbmc:Piersfrom
matthuisman:fix_logging
Jun 19, 2025
Merged

Fix logging (Crash on % user-agents) [Piers]#326
phunkyfish merged 2 commits intoxbmc:Piersfrom
matthuisman:fix_logging

Conversation

@matthuisman
Copy link
Copy Markdown
Contributor

@matthuisman matthuisman commented Jun 18, 2025

Fixes:
#229
#323

Have run time tested on Piers with below test strm

#EXTINF:-1, Video item
#KODIPROP:inputstream=inputstream.ffmpegdirect
#KODIPROP:inputstream.ffmpegdirect.is_realtime_stream=true
https://d32ubfwfcm754e.cloudfront.net/master_1.m3u8|User-Agent=otg%2F1.5.1%20%28AppleTv%20Apple%20TV%204%3B%20tvOS16.0%3B%20appletv.client%29%20libcurl%2F7.58.0%20OpenSSL%2F1.0.2o%20zlib%2F1.2.11%20clib%2F1.8.56

I assume when we had % in our buffer, kodi:log was trying to use them as the format (its 2nd argument)
image
image

This broke between Matrix and Nexus
Looking at Matrix, it used
https://github.com/xbmc/inputstream.ffmpegdirect/blob/Matrix/src/StreamManager.cpp
::kodi::addon::CAddonBase::m_interface->toKodi->addon_log_msg(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, addonLevel, buffer);

Nexus then used
kodi::Log(addonLevel, buffer);

Assume just in the swap it was missed that the arguments changed for the new method :)
The new method can do the formatting as well so expects a "format"

@phunkyfish
Copy link
Copy Markdown
Collaborator

Nice fix, will merge and release tomorrow!

@matthuisman matthuisman changed the title Fix logging (Crash on % user-agents) Fix logging (Crash on % user-agents) [Piers] Jun 18, 2025
@matthuisman
Copy link
Copy Markdown
Contributor Author

backport done #327

@matthuisman
Copy link
Copy Markdown
Contributor Author

@phunkyfish should i also PR in version bumps / changelog for both PRs? or are you ok to do that?

@phunkyfish
Copy link
Copy Markdown
Collaborator

@phunkyfish should i also PR in version bumps / changelog for both PRs? or are you ok to do that?

Yes, please add the changelog/version bumps for both PRs. Then I'll approve and merge both. We need to bump the micro version for a fix so in this PRs case it would be 22.1.1 to 22.1.2.

Thanks

@matthuisman
Copy link
Copy Markdown
Contributor Author

@phunkyfish this PR ready now with bump of version and changelog :)

@phunkyfish
Copy link
Copy Markdown
Collaborator

Perfect, once it's passes Jenkins I'll merge.

@matthuisman
Copy link
Copy Markdown
Contributor Author

Great - im excited to start looking into what integrations I can do with this addon :)

@phunkyfish
Copy link
Copy Markdown
Collaborator

v22.1.2

  • Fix crashing when % in headers caused by missing kodi::Log format arg
  • Fix building of openssl on windows caused by missing strawberryperl in path

@phunkyfish phunkyfish merged commit 9d85392 into xbmc:Piers Jun 19, 2025
1 of 8 checks passed
@phunkyfish
Copy link
Copy Markdown
Collaborator

Great - im excited to start looking into what integrations I can do with this addon :)

Excellent

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 this pull request may close these issues.

2 participants