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 GridItem crash #1871

Merged
merged 1 commit into from
Aug 3, 2024
Merged

Fix GridItem crash #1871

merged 1 commit into from
Aug 3, 2024

Conversation

cewert
Copy link
Member

@cewert cewert commented Jul 28, 2024

This appears to be another one of those weird roku bugs since m.global.session.user.settings should always be valid after the user logs in. Instead of accessing and validating m.global and m.global.session etc for every single item in the grid, I'm accessing the user setting from global once and saving it to a field on ItemGrid. Even with roku weirdness I believe we will always have access to the parent node and hopefully this way we can avoid adding a bunch of validation for every single item in the grid.

Comes from roku.com crash log:

m                roAssociativeArray refcnt=2 count:13 
'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in pkg:/components/ItemGrid/GridItem.brs(24) 
Backtrace: 
#0  Function init() As Voi$1 file/line: pkg:/components/ItemGrid/GridItem.brs(24) 
Local Variables: 
global           Interface:ifGlobal

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

m.gridTitles = m.global.session.user.settings["itemgrid.gridTitles"]

Issues

Ref #1164

@cewert cewert added the bug-fix This fixes a bug. label Jul 28, 2024
@cewert cewert requested a review from a team as a code owner July 28, 2024 01:47
Copy link
Contributor

@jimdogx jimdogx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will probably have some conflicts when merging to Master since this file was just updated recently. Hopefully not too bad though.

@cewert cewert merged commit 99ba525 into jellyfin:2.1.z Aug 3, 2024
13 checks passed
@cewert cewert deleted the fix-griditem-crash branch August 3, 2024 15:51
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