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

core: Fix version detection with Flatpak VKCapture #159

Merged
merged 1 commit into from
May 30, 2024

Conversation

mihawk90
Copy link
Contributor

@mihawk90 mihawk90 commented May 23, 2024

Description

getOBSVersionLine() was finding:
<timestamp>: - com.obsproject.Studio.Plugin.OBSVkCapture for users with this extension, therefore getOBSVersionString() ran into an IndexError on splitting the (invalid) versionString.

Therefore filtering out any lines that contain the Flatpak identifier.

Motivation and Context

Noticed Discord Bot noping out on some logs, fixed it.

How Has This Been Tested?

Before:

$ ./loganalyzer.py -u https://obsproject.com/logs/PgEsS0ZxLEhOqgfO
Traceback (most recent call last):
  File "/home/tarulia/Development/obs-loganalyser/./loganalyzer.py", line 221, in <module>
    main()
  File "/home/tarulia/Development/obs-loganalyser/./loganalyzer.py", line 215, in main
    msgs = doAnalysis(url=flags.url, filename=flags.file)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tarulia/Development/obs-loganalyser/./loganalyzer.py", line 131, in doAnalysis
    checkObsVersion(logLines),
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tarulia/Development/obs-loganalyser/checks/core.py", line 83, in checkObsVersion
    versionString = getOBSVersionString(lines)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tarulia/Development/obs-loganalyser/checks/core.py", line 64, in getOBSVersionString
    return versionString.split()[1]
           ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

After:

$ ./loganalyzer.py -u https://obsproject.com/logs/PgEsS0ZxLEhOqgfO
Critical: 37.5% Rendering Lag
Warning:  
Info:     Third-Party Plugins (7)

--------------------------------------
 
Details

Critical:
37.5% Rendering Lag
    Your GPU is maxed out and OBS can't render scenes fast enough. Running a
    game without vertical sync or a frame rate limiter will frequently cause
    performance issues with OBS because your GPU will be maxed out. OBS requires
    a little GPU to render your scene. <br><br>Enable Vsync or set a reasonable
    frame rate limit that your GPU can handle without hitting 100% usage.
    <br><br>If that's not enough you may also need to turn down some of the
    video quality options in the game. If you are experiencing issues in general
    while using OBS, your GPU may be overloaded for the settings you are trying
    to use.<br><br>Please check our guide for ideas why this may be happening,
    and steps you can take to correct it: <a
    href="https://obsproject.com/kb/encoding-performance-troubleshooting">GPU
    Overload Issues</a>. 

Warning: 

Info:
Third-Party Plugins (7)
    You have the following third-party plugins installed:<br><ul><li>droidcam-
    obs<br><li>vertical-canvas<br><li>linux-vkcapture<br><li>input-
    overlay<br><li>RewardsTheater<br><li>obs-
    backgroundremoval<br><li>waveform</ul>

Also threw in a Windows and Mac log from Discord to check that it doesn't break on those.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

`getOBSVersionLine()` was finding:
`<timestamp>:  - com.obsproject.Studio.Plugin.OBSVkCapture`
for users with this extension, therefore `getOBSVersionString()` ran
into an IndexError on splitting the (invalid) `versionString`.

Therefore filtering out any lines that contain the Flatpak identifier.
@mihawk90 mihawk90 changed the title Fix IndexError for Flatpak VKCapture extension core: Fix version detection with Flatpak VKCapture May 23, 2024
@RytoEX RytoEX merged commit 6d659cc into obsproject:master May 30, 2024
2 checks passed
@mihawk90 mihawk90 deleted the vkcapture-fixup branch May 30, 2024 20:49
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