Opened 12 years ago

Closed 11 years ago

#7437 closed defect (fixed)

Abort when no GUI and no backend

Reported by: Nigel Owned by: Isaac Richards
Priority: major Milestone: 0.22
Component: MythTV - General Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


nigel@viking:~$ mythbackend --version   
Please include all output in bug reports.
MythTV Version   : 22600M
MythTV Branch    : trunk
Network Protocol : 50
Library API      : 0.22.20091022-1
QT Version       : 4.4.1
Options compiled in:
 linux debug using_oss using_alsa using_arts using_jack using_backend using_directfb using_dvb using_firewire using_frontend using_hdhomerun using_hdpvr using_iptv using_ivtv using_joystick_menu using_lirc using_mheg using_opengl_video using_opengl_vsync using_qtwebkit using_v4l using_x11 using_xrandr using_xv using_xvmc using_xvmc_vld using_xvmcw using_bindings_perl using_bindings_python using_opengl using_ffmpeg_threads using_libavc_5_3 using_live using_mheg

nigel@viking:~$ mythbackend --printsched -v most     
2009-10-27 11:02:15.011 mythbackend version: trunk [22600M]
2009-10-27 11:02:15.013 (old)Settings::ReadSettings(settings.txt) - No such file
2009-10-27 11:02:15.014 Using runtime prefix = /usr
2009-10-27 11:02:15.014 Using configuration directory = /home/nigel/.mythtv
2009-10-27 11:02:15.014 (old)Settings::ReadSettings(/usr/share/mythtv/mysql.txt) - No such file
2009-10-27 11:02:15.015 (old)Settings::ReadSettings(/usr/etc/mythtv/mysql.txt) - No such file
2009-10-27 11:02:15.015 (old)Settings::ReadSettings(/home/nigel/.mythtv/mysql.txt) - No such file
2009-10-27 11:02:15.015 (old)Settings::ReadSettings(./mysql.txt) - No such file
2009-10-27 11:02:15.015 Unable to read configuration file mysql.txt
2009-10-27 11:02:15.015 Empty LocalHostName.
2009-10-27 11:02:15.016 Using localhost value of viking
2009-10-27 11:02:15.018 MCP::DefaultUPnP() - No default UPnP backend
2009-10-27 11:02:15.021 New DB connection, total: 1
2009-10-27 11:02:15.026 Connected to database 'mythconverg' at host: localhost
2009-10-27 11:02:15.027 Closing DB connection named 'DBManager0'
2009-10-27 11:02:15.028 Connected to database 'mythconverg' at host: localhost
2009-10-27 11:02:15.036 Current MythTV Schema Version (DBSchemaVer): 1244
2009-10-27 11:02:15.038 New DB DataDirect connection
2009-10-27 11:02:15.039 Connected to database 'mythconverg' at host: localhost
2009-10-27 11:02:15.046 MythContext: Connecting to backend server: (try 1 of 1)
2009-10-27 11:02:15.047 MythSocket(81f8868:8): new socket
2009-10-27 11:02:15.048 MythSocket(81f8868:8): attempting connect() to (
2009-10-27 11:02:15.048 MythSocket(81f8868:8): connect() failed (ConnectionRefused)
2009-10-27 11:02:15.048 MythSocket(81f8868:8): DownRef: -1
2009-10-27 11:02:15.049 MythSocket(81f8868:-1): delete socket
QWidget: Cannot create a QWidget when no GUI is being used

Same deal for the other programs. Slightly related to #6816. I think MythContext::ConnectCommandSocket?() is being called with GUI being set when it shouldn't

Change History (4)

comment:1 Changed 12 years ago by Nigel

This seems to fix it:

Index: mythcontext.cpp
--- mythcontext.cpp     (revision 22600)
+++ mythcontext.cpp     (working copy)
@@ -1524,7 +1524,7 @@
             .arg(blockingClient ? "Playback" : "Monitor")
         d->serverSock = ConnectCommandSocket(
-            server, port, ann, &proto_mismatch);
+            server, port, ann, &proto_mismatch, d->m_gui);
     if (!d->serverSock)

but I should check if there are any other erroneous invocations of ConnectCommandSocket?()

comment:2 Changed 11 years ago by Stuart Auchterlonie

Status: newinfoneeded_new

Does this still occur? I can't reproduce it here against head


comment:3 Changed 11 years ago by Nigel

Status: infoneeded_newnew

Indeed, quick test reveals I cannot either. I'm not sure what has changed though, so will do some more testing, and probably commit the change to fixes.

comment:4 Changed 11 years ago by Nigel

Resolution: fixed
Status: newclosed

(In [23229]) Work around crash when slave backend tries to connect to broken master backend, caused by it trying to create a GUI popup. Not a fault in trunk. May also be a fault in preview generation, but I wasn't able to test. Closes #7437

Note: See TracTickets for help on using tickets.