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

Fix search page crash #1884

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Fix search page crash #1884

merged 1 commit into from
Jul 31, 2024

Conversation

cewert
Copy link
Member

@cewert cewert commented Jul 31, 2024

Prevent crash by validating we were given data from the API. Comes from roku.com crash log:

tmp              <uninitialized> 
item             <uninitialized> 
results          roArray refcnt=1 count:0 
data             Invali$1 m                roAssociativeArray refcnt=3 count:2 
global           Interface:ifGloba$1 query            roString (2.1 was String) refcnt=1 val:"m" 
Local Variables: 
   file/line: pkg:/components/search/SearchTask.brs(13) 
#0  Function search() As Voi$1 file/line: pkg:/source/api/Items.brs(57) 
#1  Function searchmedia(query As String) As Dynami$1 Backtrace: 
'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in pkg:/source/api/Items.brs(57)

which points to this line after running build-prod on 2.1.2:

for each item in data.Items

Issues

Ref #1164

@cewert cewert added the bug-fix This fixes a bug. label Jul 31, 2024
@cewert cewert requested a review from a team as a code owner July 31, 2024 12:03
@cewert cewert merged commit a4c9800 into jellyfin:2.1.z Jul 31, 2024
13 checks passed
@cewert cewert deleted the fix-search-crash branch July 31, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix This fixes a bug.
Projects
Development

Successfully merging this pull request may close these issues.

2 participants