Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6926 closed defect (fixed)

mythfrontend crashes on startup for nvidia if any modeline has name like FOO-1080

Reported by: gavin@… Owned by: JYA
Priority: minor Milestone: 0.22
Component: MythTV - Video Playback Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


If you have modelines of the form FOO-1080, then you'll segfault in the strstr() call in modeline_is_interlaced.

It's apparently caused by a bug in parse_mode_string, which finds the wrong modestring in this case, causing find_modeline to error out, causing pain. See the for loop in parse_mode_string and the checks with isdigit.

I was having segfaults on every startup; I can reproduce this (and hopefully almost anyone else can) if you want more information.

Change History (8)

comment:1 Changed 11 years ago by anonymous

(err, some context: all above function names are in util-nvctrl.cpp).

comment:2 Changed 11 years ago by paulh

Component: MythTV - User Interface LibraryMythTV - Video Playback
Milestone: unknown0.22
Owner: changed from stuartm to JYA
Status: newassigned

comment:3 Changed 11 years ago by JYA

Status: assignedaccepted

comment:4 Changed 11 years ago by JYA

backtrace please ?

comment:5 Changed 11 years ago by gavin@…

I'll get you one this evening. I'm surprised you're having trouble reproducing this!

comment:6 Changed 11 years ago by gregorio.gervasio@…

Can't provide a backtrace myself right now but the segfault is because find_modeline() returns NULL if it doesn't find a match and modeline_is_interlaced() cannot handle a NULL argument.

comment:7 Changed 11 years ago by JYA

Resolution: fixed
Status: acceptedclosed

(In [21579]) Handle additional modeline entries. Handle wierd modlines that could include several ' @' in the name. Should handle all modelines now , added a safeguard if it doesn't.

Fix #6926

comment:8 Changed 11 years ago by JYA

Unfortunately, I couldn't find any references on what the name of a modeline entry can contain.

The structures returned by NV-CTRL doesn't contain any delimiters around the name. It's in the form: DFP-1: 1280x720 @1280x720 +0 +0

so I now assume that the name is contained between the first space and the last ' @'. The fix now handles modeline like: DFP-1: 1280x720@ 50 @blah @1280x720 +0 +0

Added safeguard in case the name isn't retrieved properly, and the modeline will simply be ignored.

Fixed in [21579]

Note: See TracTickets for help on using tickets.