MythFillDatabase segmentation fault

For discussion of topics specific to MythTV on OSX
duaneoca
Newcomer
Posts: 11
Joined: Tue Mar 18, 2014 7:03 am
United States of America

MythFillDatabase segmentation fault

Post by duaneoca »

Folks,

I'm new to Myth, so please forgive me if the answer to my question is obvious. I did a fair amount of searching and didn't find an answer.

I am able to run the MythTV-Setup, MythBackend, and MythFrontend without issue.

My execution of MythFillDatabase is failing with a segmentation fault. Here is the stack trace that appears relevant:

Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff93e8e82a __kill + 10
1 mythbase 0x0000000102a5ea8d SignalHandler::signalHandler(int, __siginfo*, void*) + 541
2 libsystem_c.dylib 0x00007fff90569cfa _sigtramp + 26
3 org.osx-bundler.MythFillDatabase 0x0000000100018f9f QString::isEmpty() const + 15
4 org.osx-bundler.MythFillDatabase 0x000000010001f109 ChannelData::insert_chan(unsigned int) + 73
5 org.osx-bundler.MythFillDatabase 0x000000010000bcd4 FillData::DataDirectStationUpdate(Source) + 100
6 org.osx-bundler.MythFillDatabase 0x000000010000e1a7 FillData::GrabDDData(Source, int, QDate, int) + 6823
7 org.osx-bundler.MythFillDatabase 0x000000010000f59e FillData::GrabData(Source, int, QDate*) + 190
8 org.osx-bundler.MythFillDatabase 0x000000010001735d FillData::Run(std::vector<Source, std::allocator<Source> >&) + 24653
9 org.osx-bundler.MythFillDatabase 0x0000000100037ecd main + 24669
10 org.osx-bundler.MythFillDatabase 0x000000010000b644 start + 52

In the console application I can see the following messages:
3/17/14 11:52:08.186 PM [0x0-0x50050].org.osx-bundler.MythFillDatabase: 2014-03-17 23:52:08.114547 I Grab complete. Actual data from 2014-03-18T00:00:00Z to 2014-03-19T00:00:00Z (UTC)
3/17/14 11:52:08.186 PM [0x0-0x50050].org.osx-bundler.MythFillDatabase: 2014-03-17 23:52:08.115391 I Main temp tables populated.
3/17/14 11:52:08.186 PM [0x0-0x50050].org.osx-bundler.MythFillDatabase: 2014-03-17 23:52:08.115406 I Updating MythTV channels.
3/17/14 11:52:09.342 PM [0x0-0x50050].org.osx-bundler.MythFillDatabase: Handling Segmentation fault: 11

MacOS 10.7.5
MythTV 0.27
Mysql 5.1.73
HDHomerun
I can use the tuner with eyetv without issue.
The MythFrontend app says my tuners are busy, which shouldn't be the case (eyetv not running.)
I can give more information on request.

Can anyone suggest to me where the problem may lie?

Thanks,
Duane
duaneoca
Newcomer
Posts: 11
Joined: Tue Mar 18, 2014 7:03 am
United States of America

Re: MythFillDatabase segmentation fault

Post by duaneoca »

Doing a little manual reading (aka the source) it looks like the seg fault is happening because the m_cardType string isn't being initialized. Is that ringing any bells?

I've tried using the command line arguments to set the cardtype, but it doesn't seem to be making a difference.

-Duane
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: MythFillDatabase segmentation fault

Post by pvr4me »

Have you completed all the steps in MythTV-Setup?

http://www.mythtv.org/wiki/Hdhomerun
or
http://www.mythtv.org/wiki/Silicondust_HDHomeRun_Prime

Which HDHomeRun do you have?

Craig
Formerly the MacPorts guy.
User avatar
stuarta
Developer
Posts: 220
Joined: Wed Feb 05, 2014 5:13 pm
Great Britain

Re: MythFillDatabase segmentation fault

Post by stuarta »

Can you run mythfilldatabase under the debugger?
Instructions are here http://www.mythtv.org/wiki/Debugging
duaneoca
Newcomer
Posts: 11
Joined: Tue Mar 18, 2014 7:03 am
United States of America

Re: MythFillDatabase segmentation fault

Post by duaneoca »

Folks,

Thanks for the responses!

I was thinking that perhaps something in the DB had been corrupted during my many attempts to successfully scan for channels (which is working well, thank you) so I dropped the DB and added it again.

Here is my run of mythfilldatabase with debugging on:

./mythfilldatabase --dd-grab-all --loglevel debug
2014-03-19 22:45:38.864717 C mythfilldatabase version: fixes/0.27 [v0.27-186-g480589a] www.mythtv.org
2014-03-19 22:45:38.864906 C Qt version: compile: 4.8.5, runtime: 4.8.5
2014-03-19 22:45:38.864920 N Enabled verbose msgs: general
2014-03-19 22:45:38.864943 N Setting Log Level to LOG_DEBUG
2014-03-19 22:45:38.876433 I Added logging to the console
2014-03-19 22:45:38.877624 I Setup Interrupt: 2 handler
2014-03-19 22:45:38.877648 I Setup Terminated: 15 handler
2014-03-19 22:45:38.877656 I Setup Segmentation fault: 11 handler
2014-03-19 22:45:38.877668 I Setup Abort trap: 6 handler
2014-03-19 22:45:38.877675 I Setup Bus error: 10 handler
2014-03-19 22:45:38.877686 I Setup Floating point exception: 8 handler
2014-03-19 22:45:38.877699 I Setup Illegal instruction: 4 handler
2014-03-19 22:45:38.877905 D Relative PREFIX! (../Resources), appDir=/Applications/MythBackend/MythBackend.app/Contents/MacOS
2014-03-19 22:45:38.877989 N Using runtime prefix = /Applications/MythBackend/MythBackend.app/Contents/Resources
2014-03-19 22:45:38.878012 N Using configuration directory = /Users/duaneo/.mythtv
2014-03-19 22:45:38.878348 I Assumed character encoding: en_US.UTF-8
2014-03-19 22:45:38.879867 N Empty LocalHostName.
2014-03-19 22:45:38.879943 I Using localhost value of pro
2014-03-19 22:45:38.902611 D FindDatabase() - Success!
2014-03-19 22:45:38.906148 N Setting QT default locale to en_US
2014-03-19 22:45:38.906172 I Current locale en_US
2014-03-19 22:45:38.906318 E No locale defaults file for en_US, skipping
2014-03-19 22:45:38.909627 E Error Loading en_us translation for module mythfrontend
2014-03-19 22:45:38.911491 I Current MythTV Schema Version (DBSchemaVer): 1317
2014-03-19 22:45:38.914166 I MythCoreContext: Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2014-03-19 22:45:38.917036 E MythSocket(109217b20:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2014-03-19 22:45:38.917299 E Connection to master server timed out.
Either the server is down or the master server settings
in mythtv-settings does not contain the proper IP address

2014-03-19 22:45:38.917330 W Failed to connect to master backend. MythFillDatabase will continue running but will be unable to prevent backend from shutting down, or triggering a reschedule when complete.
2014-03-19 22:45:38.919461 I Updating source #1 (Antenna) with grabber schedulesdirect1
2014-03-19 22:45:38.919745 I No channels are configured to use grabber.
2014-03-19 22:45:38.921496 I Retrieving datadirect data.
2014-03-19 22:45:38.921505 I Grabbing ALL available data.
2014-03-19 22:45:38.921574 I DataDirect: Grabbing listing data
2014-03-19 22:45:38.921935 I Downloading DataDirect feed
2014-03-19 22:45:38.986067 I New Client: (#1)
2014-03-19 22:46:35.250055 I Downloaded 1376556 bytes
2014-03-19 22:46:35.250066 I Uncompressing DataDirect feed
2014-03-19 22:46:35.322816 I Uncompressed to 18171259 bytes
2014-03-19 22:46:35.639459 I New static DB connectionDataDirectCon
2014-03-19 22:46:35.735893 W DataDirect: WARNING: Your subscription expires on Sun Mar 23 2014 9:36 PM
2014-03-19 22:46:35.796739 I DataDirect: sourceid 1 has lineup type: LocalBroadcast
2014-03-19 22:47:26.181931 I Grab complete. Actual data from 2014-03-19T00:00:00Z to 2014-04-04T23:59:59Z (UTC)
2014-03-19 22:47:26.182788 I Main temp tables populated.
2014-03-19 22:47:26.182797 I Updating MythTV channels.
Handling Segmentation fault: 11
Segmentation fault: 11

Here is the stack trace output:
Thread 0:: Dispatch queue: com.apple.main-thread
0 mythfilldatabase 0x0000000100018f9f QString::isEmpty() const + 15
1 mythfilldatabase 0x000000010001f109 ChannelData::insert_chan(unsigned int) + 73
2 mythfilldatabase 0x000000010000bcd4 FillData::DataDirectStationUpdate(Source) + 100
3 mythfilldatabase 0x000000010000e1a7 FillData::GrabDDData(Source, int, QDate, int) + 6823
4 mythfilldatabase 0x000000010000f59e FillData::GrabData(Source, int, QDate*) + 190
5 mythfilldatabase 0x0000000100013d9e FillData::Run(std::vector<Source, std::allocator<Source> >&) + 10894
6 mythfilldatabase 0x0000000100037ecd main + 24669
7 mythfilldatabase 0x000000010000b644 start + 52


I can provide the entire dump if requested. :)

Thoughts folks?

Cheers,
Duane
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: MythFillDatabase segmentation fault

Post by pvr4me »

I could be entirely wrong but I think the problem is likely in "Input Connections" in MythTV-Setup as your log says "No channels are configured to use grabber." An excerpt of my log at the same point says:

Code: Select all

2014-03-19 15:32:34.828499 I [523/4871] CoreContext filldata.cpp:569 (Run) - Updating source #1 (Antenna) with grabber schedulesdirect1
2014-03-19 15:32:34.829054 I [523/4871] CoreContext filldata.cpp:583 (Run) - Found 18 channels for source 1 which use grabber
I think you may have failed to connect the source (Schedules Direct-Local Broadcast) to the input (Antenna).

Craig
Formerly the MacPorts guy.
duaneoca
Newcomer
Posts: 11
Joined: Tue Mar 18, 2014 7:03 am
United States of America

Re: MythFillDatabase segmentation fault

Post by duaneoca »

I see what you're saying. Where in the setup tool do I indicate that the channel should use grabber. I do have the HDHomerun device connected to antenna in the input connections. When I click on fetch channels from listing source, it calls mythfilldatabase, which crashes with this error:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 QtCore 0x0000000104c415ce QString::operator=(QString const&) + 30
1 mythfilldatabase 0x0000000100033c68 main + 7672
2 mythfilldatabase 0x000000010000b644 start + 52

Thoughts?

Thanks again for your help.

Cheers,
Duand
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: MythFillDatabase segmentation fault

Post by pvr4me »

In the application MythTV-setup.app, go into "Input Connections". For each of the two HDHomerun tuners, you tell Myth which "Video Source" has the listings information for the channels that device can receive.

For example, my completed Input Connections (two HDHomerun devices) looks like this:
Mythtv-setup_InputConnections.jpg
Mythtv-setup_InputConnections.jpg (59.68 KiB) Viewed 4566 times

Craig
Formerly the MacPorts guy.
duaneoca
Newcomer
Posts: 11
Joined: Tue Mar 18, 2014 7:03 am
United States of America

Re: MythFillDatabase segmentation fault

Post by duaneoca »

Gotcha. Yeah, here is what I have:
Screen Shot 2014-03-20 at 9.16.02 PM.png
Screen Shot 2014-03-20 at 9.16.02 PM.png (50.21 KiB) Viewed 4561 times
SIgh, my free listing week is running out soon. This setup is challenging! :)

Duane
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: MythFillDatabase segmentation fault

Post by pvr4me »

And did you also click the "Scan for channels" button" while setting up the Input Connection? Did Myth find the channels you expected? Insert them to the database?

As you're using OTA, you also needed to go into the Channel Editor screen and fill in the XMLTV id for each channel. Done?

You may be able to get your free listings period extended. Try their forum:

http://forums.schedulesdirect.org/

Craig
PS All the above is described on the HDHomerun wiki page that I linked to earlier. Have you worked through that page?
Formerly the MacPorts guy.
duaneoca
Newcomer
Posts: 11
Joined: Tue Mar 18, 2014 7:03 am
United States of America

Re: MythFillDatabase segmentation fault

Post by duaneoca »

We're making progress here. Yes I did scan for channels, and found the channels I was expecting. They exist in the database.

Today, I went in an populated the XMLTVID for each channel, and unchecked the listings checkbox for the handful that weren't in the listing. When I ran mythfilldatabase, it shows 68 channels for source 1, but it still segmentation faults.

2014-03-21 12:08:00.854180 I Updating source #1 (Antenna) with grabber schedulesdirect1
2014-03-21 12:08:00.854564 I Found 68 channels for source 1 which use grabber
2014-03-21 12:08:00.856844 I Retrieving datadirect data.
2014-03-21 12:08:00.856850 I Grabbing ALL available data.
2014-03-21 12:08:00.857341 I DataDirect: Grabbing listing data
2014-03-21 12:08:00.857766 I Downloading DataDirect feed
2014-03-21 12:08:00.880970 I New Client: (#1)
2014-03-21 12:08:52.173219 I Downloaded 1372891 bytes
2014-03-21 12:08:52.173232 I Uncompressing DataDirect feed
2014-03-21 12:08:52.252182 I Uncompressed to 18076096 bytes
2014-03-21 12:08:52.581998 I New static DB connectionDataDirectCon
2014-03-21 12:08:52.698628 W DataDirect: WARNING: Your subscription expires on Sun Mar 23 2014 9:36 PM
2014-03-21 12:08:52.803738 I DataDirect: sourceid 1 has lineup type: LocalBroadcast
2014-03-21 12:09:58.669498 I Grab complete. Actual data from 2014-03-20T00:00:00Z to 2014-04-05T23:59:59Z (UTC)
2014-03-21 12:09:58.670745 I Main temp tables populated.
2014-03-21 12:09:58.670759 I Updating MythTV channels.
Handling Segmentation fault: 11
Segmentation fault: 11

I did work through the wiki pages, except for the parts related to compiling and using the hdhomerun utility. Is it possible that not using that tool is causing the issue? I have used the mac tool, and I'm able to see channels, and I am able to watch TV through the hdhomerun with eyetv.

Thanks for your help!

Cheers,
Duane
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: MythFillDatabase segmentation fault

Post by pvr4me »

No, the HDHomerun utility won't be the problem.

What exactly do you mean by "unchecked the listings checkbox"? You need to uncheck the "Use on air guide" box for each channel since your're using listings data from SchedulesDirect.

BTW, 68 channels is enormous for OTA. Are you in the Greater Toronto Area or someplace else?

If this doesn't work, I'm pretty much at the end of my troubleshooting ability. You'll have to provide a full crash dump (not just the excerpts you've posted before) for others to check.

Craig
Formerly the MacPorts guy.
User avatar
rwagner
Developer
Posts: 217
Joined: Thu Feb 06, 2014 11:37 pm
United States of America

Re: MythFillDatabase segmentation fault

Post by rwagner »

duaneoca wrote: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 QtCore 0x0000000104c415ce QString::operator=(QString const&) + 30
1 mythfilldatabase 0x0000000100033c68 main + 7672
2 mythfilldatabase 0x000000010000b644 start + 52
Any chance you could find or compile a version with the debugging symbols left in?
duaneoca
Newcomer
Posts: 11
Joined: Tue Mar 18, 2014 7:03 am
United States of America

Re: MythFillDatabase segmentation fault

Post by duaneoca »

Craig,

I'm in the SF bay area. The majority of those channels aren't in English. (Not that I mind, as long as I'm getting the channels I want. :)

It looks like my next step is building the package, but that won't happen until maybe wednesday. :) My C++ skills are a little rusty, but I may end up addressing the issue myself, once I fully understand what is going on. :)

Cheers,
Duane
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: MythFillDatabase segmentation fault

Post by pvr4me »

Where did you download your build from? I'm pretty sure jya always prepares debug builds.

Craig
Formerly the MacPorts guy.
Post Reply