I just installed the master branch via the mythbuntu ppa (MythTV Version : v32.0~master.202107051824.4d21b95e4f~ubuntu20.04.1) and I can no longer reproduce my issue.
I might try to see what fixed it.
[Solved] mythtv-setup freezes upon launching
Moderator: Forum Moderators
-
- Junior
- Posts: 41
- Joined: Sat Jun 05, 2021 12:50 am
Re: mythtv-setup freezes upon launching
There is a large amount of change between v31 and master in the video playback code so this might be challenging.
-
- Junior
- Posts: 41
- Joined: Sat Jun 05, 2021 12:50 am
Re: mythtv-setup freezes upon launching
The Pentium G3258 with only two cores isn’t very fast, so bisecting took a little while.
[8b5297e4f8c58ea0f532a42400a0a2b9b52bb77b] is the first new commit (i.e. mythtv-setup no longer freezes)
commit 8b5297e4f8c58ea0f532a42400a0a2b9b52bb77b
Author: Mark Kendall <mark.kendall@gmail.com>
Date: Mon Dec 7 10:56:00 2020 +0000
libmythui: Don't use MythSignallingTimer in MythMainWindow
- it hasn't been needed for some time-
- use a regular timer instead. Further changes to come to adjust the
timer rate based on the display rate.
I'll look at the details of the commit tomorrow.
Recompiling after changing the commit with git bisect sometimes fails. It seems the .d files in /mythtv/external/ are not regenerated if the file they reference has changed, so a git clean is necessary.
Compiling an older code base on top of a existing compilation with a newer code base, has issues when new files are added (i.e. the object files from the existing compilation point to or reference files that are missing in the older code base), e.g:
[8b5297e4f8c58ea0f532a42400a0a2b9b52bb77b] is the first new commit (i.e. mythtv-setup no longer freezes)
commit 8b5297e4f8c58ea0f532a42400a0a2b9b52bb77b
Author: Mark Kendall <mark.kendall@gmail.com>
Date: Mon Dec 7 10:56:00 2020 +0000
libmythui: Don't use MythSignallingTimer in MythMainWindow
- it hasn't been needed for some time-
- use a regular timer instead. Further changes to come to adjust the
timer rate based on the display rate.
Code: Select all
mythtv/libs/libmythui/mythmainwindow.cpp | 35 +++++++--------------------
mythtv/libs/libmythui/mythmainwindow.h | 2 +-
mythtv/libs/libmythui/mythmainwindowprivate.h | 4 ---
3 files changed, 10 insertions(+), 31 deletions(-)
Recompiling after changing the commit with git bisect sometimes fails. It seems the .d files in /mythtv/external/ are not regenerated if the file they reference has changed, so a git clean is necessary.
Compiling an older code base on top of a existing compilation with a newer code base, has issues when new files are added (i.e. the object files from the existing compilation point to or reference files that are missing in the older code base), e.g:
Code: Select all
make[2]: Entering directory '/home/htpc/build/mythtv/mythtv/programs/mythavtest'
make[2]: *** No rule to make target '../../libs/libmythtv/mythvideoprofile.h', needed by 'obj/main.o'. Stop.
make[2]: Leaving directory '/home/htpc/build/mythtv/mythtv/programs/mythavtest'
make[1]: *** [Makefile:67: sub-mythavtest-make_first] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: Entering directory '/home/htpc/build/mythtv/mythtv/programs/mythfrontend'
make[2]: *** No rule to make target '../../libs/libmythtv/mythvideoprofile.h', needed by 'obj/main.o'. Stop.
make[2]: Leaving directory '/home/htpc/build/mythtv/mythtv/programs/mythfrontend'
make[1]: *** [Makefile:92: sub-mythfrontend-make_first] Error 2
make[2]: Entering directory '/home/htpc/build/mythtv/mythtv/programs/mythcommflag'
ccache g++ -c -pipe -D_FILE_OFFSET_BITS=64 -DPIC -std=c++17 -faligned-new -DNDEBUG -fomit-frame-pointer -fPIC -DQT_DISABLE_DEPRECATED_BEFORE=0x050900 -msse -pthread -g -Wall -Wextra -Wpointer-arith -fvisibility-inlines-hidden -Wdouble-promotion -Wduplicated-cond -Wlogical-op -Wmissing-declarations -Wnull-dereference -Woverloaded-virtual -Wshadow -funit-at-a-time -Wzero-as-null-pointer-constant -Wsuggest-override -isystem ../../external/libmythdvdnav/dvdnav -isystem ../../external/libmythdvdnav/dvdread -std=gnu++1z -D_REENTRANT -fPIC -DMMX -Dusing_libcec -D_GNU_SOURCE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/libxml2 -isystem /usr/include/X11 -I../.. -I../../libs -I../../libs/libmyth -I../../libs/libmyth/audio -I../../libs/libmythtv -I../.. -I../../external/FFmpeg -I../../libs/libmythupnp -I../../libs/libmythui -I../../libs/libmythmetadata -I../../libs/libmythlivemedia -I../../libs/libmythbase -I../../external/libmythsoundtouch -I../../external/libudfread -I../../libs/libmythtv/mpeg -I../../libs/libmythtv/vbitext -I../../libs/libmythservicecontracts -I../../libs/libmythprotoserver -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Imoc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o obj/CommDetectorFactory.o CommDetectorFactory.cpp
make[2]: *** No rule to make target '../../libs/libmythtv/mythvideoprofile.h', needed by 'obj/ClassicLogoDetector.o'. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/htpc/build/mythtv/mythtv/programs/mythcommflag'
make[1]: *** [Makefile:117: sub-mythcommflag-make_first] Error 2
make[1]: Leaving directory '/home/htpc/build/mythtv/mythtv/programs'
make: *** [Makefile:66: programs] Error 2
-
- Junior
- Posts: 41
- Joined: Sat Jun 05, 2021 12:50 am
Re: mythtv-setup freezes upon launching
The relevant code change is the removal of line 741 which originated here: https://github.com/MythTV/mythtv/commit ... 6505ebR757
I'm not sure why that line ever existed. (Perhaps, to prevent the screen from updating while MythMainWindow::Init() is executing, but I don't see why that would be necessary.) I'm also not sure why the reinitDone() function was created. It should be merged with init, based on its current usage (i.e. call init then immediately reinitDone. I'll probably make a pull request merging the two functions once I figure out how to use git.
I'm not sure why that line ever existed. (Perhaps, to prevent the screen from updating while MythMainWindow::Init() is executing, but I don't see why that would be necessary.) I'm also not sure why the reinitDone() function was created. It should be merged with init, based on its current usage (i.e. call init then immediately reinitDone. I'll probably make a pull request merging the two functions once I figure out how to use git.
-
- Junior
- Posts: 41
- Joined: Sat Jun 05, 2021 12:50 am
Re: mythtv-setup freezes upon launching
Regarding the removal of line 741: was Init called without a following ReinitDone? Admittedly, a bit of a moot point now, since I have merged them.
I have my changes compiling successfully. I'll figure out git and github tomorrow.
I have my changes compiling successfully. I'll figure out git and github tomorrow.
-
- Junior
- Posts: 41
- Joined: Sat Jun 05, 2021 12:50 am
-
- Junior
- Posts: 41
- Joined: Sat Jun 05, 2021 12:50 am
Re: mythtv-setup freezes upon launching
Root cause identified: Init called without ReinitDone as I suspected
mythtv-setup/main.cpp#L379 create a MythContext
then MythContext::Init to
MythContextPrivate::Init to
MythContextPrivate::FindDatabase to
MythContextPrivate::TestDBconnection where ShowGuiStartup is called if msStartupScreenDelay==0ms
ShowGuiStartup then calls TempMainWindow, which creates a MythMainWindow before
mythtv-setup/main.cpp#L544 Init without ReinitDone as I suspected
mythtv-setup/main.cpp#L379 create a MythContext
then MythContext::Init to
MythContextPrivate::Init to
MythContextPrivate::FindDatabase to
MythContextPrivate::TestDBconnection where ShowGuiStartup is called if msStartupScreenDelay==0ms
ShowGuiStartup then calls TempMainWindow, which creates a MythMainWindow before
mythtv-setup/main.cpp#L544 Init without ReinitDone as I suspected