Opened 18 years ago

Closed 18 years ago

#1684 closed defect (fixed)

Mythfreemheg should not be compiled with -fomit-frame-pointer

Reported by: dan.sheridan@… Owned by: danielk
Priority: minor Milestone: unknown
Component: dvb Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

When watching Channel 4 in the UK, after a few seconds MythTV exits and I see the following in my frontend log:

ASSERT: "false" in ParseNode?.cpp (48) terminate called after throwing an instance of 'char const*' Expected integer

Compiling with --compile-type=debug fixes this. After much recompiling, I traced it to the -fomit-frame-pointer flag which seems to break exception handling. Now I still see the "Expected integer" message, but the whole file plays perfectly.

FWIW, I am compiling with: gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu3). The exception is thrown as a result of Ingredients.cpp:266.

Attachments (2)

mhegpatch.txt (22.8 KB) - added by dm@… 18 years ago.
ingredientpatch.txt (2.3 KB) - added by dm@… 18 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 18 years ago by dm@…

The exception has been thrown as a result of what appears to be incorrect MHEG. The parser has detected an error and thrown an exception to bail out. I can't see this at the moment on Channel 4 so I can't be sure whether it really is wrong. Either way, I would have expected throwing an exception to work.

comment:2 Changed 18 years ago by dan.sheridan@…

During the Simpsons seems to be particularly bad here (North London).

The exception does get thrown as expected (by MHERROR in Logging.h). It should be caught, as far as I can tell. If libfreemheg is compiled with -fomit-frame-pointer, then instead of the exception being caught, the whole of mythfrontend bails out. It's GCC that's misbehaving, as far as i can tell. I think that there was a known issue along these lines in the 3.*.* GCCs, but it should have been fixed in 4.*. There's not much on Google, I'm afraid.

comment:3 Changed 18 years ago by dm@…

I haven't seen this problem on Channel 4 but I've had a closer look at the code and it appears that the MHEG engine could have detected an error, raised an exception and then not caught it. I've been working on the interface between Myth and the MHEG engine so I'm taking the opportunity to post my patches which include what I hope will be a fix for this.

These patches add an option to the TV Play settings to enable MHEG. The MHEG engine will only be started if that option is set. The TEXT key is now F7 rather than using the T key. On Daniel's advice, the code to tune to a new channel within MHEG now checks that the channel is on the current capture card.

Changed 18 years ago by dm@…

Attachment: mhegpatch.txt added

comment:4 Changed 18 years ago by danielk

(In [9728]) References #1684. Removes x86 assembler, catches a C++ exception, and cleans up non-fatal assert logic.

This is part of the patch from Dave Matthews attached to #1684.

comment:5 Changed 18 years ago by abostock@…

Have tried the lastest svn and also applying Dave Matthews full patch but neither fix the frontend crashing issue for me. Also, probably makes no difference but, its not just channel 4 which has the problem.

comment:6 Changed 18 years ago by dm@…

I spotted the "Expecting integer" message today (on Scottish TV not Ch 4) and managed to work out what was happening. It turned out to be a parser error rather than bad MHEG (apologies to Channel 4) although in mitigation I have to say that I've seen several bits of bad MHEG and there are a few workarounds for them in the code already.

I'm attaching a patch for this. The effect of this patch, though, will simply be to allow some interactive text to be viewed when it previously wasn't. It won't fix any remaining crashes if there are any. David

Changed 18 years ago by dm@…

Attachment: ingredientpatch.txt added

comment:7 Changed 18 years ago by danielk

(In [9752]) References #1684. Applies Dave Matthew's fix for "Expecting integer" parsing error. (ingredientpatch.txt)

comment:8 Changed 18 years ago by danielk

Resolution: fixed
Status: newclosed

(In [9759]) Closes #1684. Fixes MHEG channel changing code to work with multiple tuners, adds a "menu text" binding and adds an option to disable MHEG decoding.

Note: See TracTickets for help on using tickets.