Opened 17 years ago
Closed 17 years ago
Last modified 17 years ago
#6926 closed defect (fixed)
mythfrontend crashes on startup for nvidia if any modeline has name like FOO-1080
| Reported by: | Owned by: | JYA | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.22 |
| Component: | MythTV - Video Playback | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
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 by , 17 years ago
comment:2 by , 17 years ago
| Component: | MythTV - User Interface Library → MythTV - Video Playback |
|---|---|
| Milestone: | unknown → 0.22 |
| Owner: | changed from to |
| Status: | new → assigned |
comment:3 by , 17 years ago
| Status: | assigned → accepted |
|---|
comment:5 by , 17 years ago
I'll get you one this evening. I'm surprised you're having trouble reproducing this!
comment:6 by , 17 years ago
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 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
comment:8 by , 17 years ago
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]

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