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

Prevent app crash when refreshing movie detail screen #1833

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

cewert
Copy link
Member

@cewert cewert commented Jul 18, 2024

Ensure data is valid before using to prevent app crash. This comes from the roku crash log and is by far the worst offender right now.

roku-208-crashlog

Crashlog:


'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in pkg:/source/Main.brs(226) 
Backtrace: 
#0  Function main(args As Dynamic) As Voi$1 file/line: pkg:/source/Main.brs(226) 
Local Variables: 
args             roAssociativeArray refcnt=2 count:4 
global           Interface:ifGloba$1 m                roAssociativeArray refcnt=2 count:6 
playstatetask    roSGNode:PlaystateTask refcnt=1 
scenemanager     roSGNode:SceneManager refcnt=1 
group            roSGNode:MovieDetails refcnt=1 
configencoding   roAssociativeArray refcnt=1 count:43 
re               <uninitialized> 
filename         <uninitialized> 
userslastrunversion roString refcnt=1 val:"2.0.8" 
dialog           <uninitialized> 
input            roInput refcnt=1 
device           roDeviceInfo refcnt=1 
deeplinkvideo    <uninitialized> 
msg              roSGNodeEvent refcnt=1 
timespan         <uninitialized> 
reportingnode    <uninitialized> 
itemnode         <uninitialized> 
reportingnodetype <uninitialized> 
itemtype         <uninitialized> 
elapsed          <uninitialized> 
currentepisode   <uninitialized> 
currentscene     roSGNode:MovieLibraryView refcnt=1 
i                <uninitialized> 
seasonmetadata   <uninitialized> 
moviemetadata    <uninitialized> 
selecteditem     roSGNode:MovieData refcnt=1 
selecteditemtype roString refcnt=1 val:"Movie" 
audio_stream_idx roInt refcnt=1 val:5 (&h5) 
showplaybackoptiondialog <uninitialized> 
photoalbumdata   <uninitialized> 
photoplayer      <uninitialized> 
node             <uninitialized> 
ptr              <uninitialized> 
series           <uninitialized> 
albums           <uninitialized> 
selectedindex    <uninitialized> 
screencontent    <uninitialized> 
viewhandled      <uninitialized> 
query            <uninitialized> 
options          <uninitialized> 
results          <uninitialized> 
btn              roSGNode:Button refcnt=1 
buttons          <uninitialized> 
trailerdata      <uninitialized> 
movie            <uninitialized> 
button           <uninitialized> 
panel            <uninitialized> 
trackselected    <uninitialized> 
info             <uninitialized> 
video            <uninitialized> 
retryvideo       <uninitialized> 
event            roAssociativeArray refcnt=1 count:2 
tmpglobaldevice  <uninitialized> 
posttask         <uninitialized> 
inputeventvideo  <uninitialized> 
popupnode        <uninitialized> 
startingpoint    <uninitialized>

Which points to this line after running build-prod on 2.0.8:

currentScene.itemContent.json = api_users_GetItem(m.global.session.user.id, currentScene.itemContent.id)

Issues

Introduced in #1771

@cewert cewert added the bug-fix This fixes a bug. label Jul 18, 2024
@cewert cewert requested a review from a team as a code owner July 18, 2024 12:30
@cewert cewert merged commit e4f5c19 into jellyfin:2.1.z Jul 18, 2024
13 checks passed
@cewert cewert deleted the fix-movie-refresh-crash branch July 18, 2024 13:40
@cewert
Copy link
Member Author

cewert commented Jul 18, 2024

Didn't mean to merge this I will resubmit

edit: #1834

@cewert cewert restored the fix-movie-refresh-crash branch July 18, 2024 13:50
@cewert cewert removed the bug-fix This fixes a bug. label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant