Jief_Machak Posted March 24, 2021 Share Posted March 24, 2021 Hum, surprising. I thought I didn't touch TextOnly boolean settings... Any config.plist and debug.log ? Link to comment Share on other sites More sharing options...
Slice Posted March 24, 2021 Share Posted March 24, 2021 Yes, Press F1 Standard config.plist debug.log is attached 2021-3-24_16-34_CLOVERX64.EFI.log 1 Link to comment Share on other sites More sharing options...
kushwavez Posted March 24, 2021 Share Posted March 24, 2021 (edited) oh yes I did see the same too, but thought it is normal for testing purposes so I didn't mention it. (that mouse scaling tho @Slice.. ) Edited March 24, 2021 by kushwavez Link to comment Share on other sites More sharing options...
Slice Posted March 24, 2021 Share Posted March 24, 2021 It is not normal. We have graphical menu for Help, About and Options. They should not be text mode. Link to comment Share on other sites More sharing options...
kushwavez Posted March 24, 2021 Share Posted March 24, 2021 yes now I know. I should've reported this as soon as I saw Link to comment Share on other sites More sharing options...
Slice Posted March 24, 2021 Share Posted March 24, 2021 Those menus are intended to be drawn by GraphicsMenuStyle. And where is it? if (AllowGraphicsMode) { // Style = &REFIT_MENU_SCREEN::GraphicsMenuStyle; if (ThemeX.VerticalLayout) { m_MainStyle = &REFIT_MAINMENU_SCREEN::MainMenuVerticalStyle; } else { m_MainStyle = &REFIT_MAINMENU_SCREEN::MainMenuStyle; } }else{ m_MainStyle = &REFIT_MAINMENU_SCREEN::TextMenuStyle; } Link to comment Share on other sites More sharing options...
matxpa Posted March 24, 2021 Share Posted March 24, 2021 On 3/22/2021 at 1:42 PM, Jief_Machak said: I've committed now. This commit is a refactoring, as usual. Which means, report the least behaviour change, please, but DON'T modify your config to workaround. The specific point I'd like to be tested, is custom entries and sub entries. If you have some of them configured, please test that it goes as usual. Thanks. Hi Jief I try to test "sub entries" with Clover r5131 (commit ff4c90b : Finish refactoring of custom entries settings) just wana start "Big Sur Preboot" in verbose mode with a sub entry in custom entry to test "sub entry" but Big Sur boots without verbose mode on std output. regards config.plist Link to comment Share on other sites More sharing options...
Slice Posted March 24, 2021 Share Posted March 24, 2021 One more 2021-3-24_19-0_CLOVERX64.EFI.log.zip Link to comment Share on other sites More sharing options...
matxpa Posted March 24, 2021 Share Posted March 24, 2021 49 minutes ago, matxpa said: Hi Jief I try to test "sub entries" with Clover r5131 (commit ff4c90b : Finish refactoring of custom entries settings) just wana start "Big Sur Preboot" in verbose mode with a sub entry in custom entry to test "sub entry" but Big Sur boots without verbose mode on std output. regards config.plist 14.97 kB · 2 downloads SubEntry-boot-log.txt Link to comment Share on other sites More sharing options...
Jief_Machak Posted March 24, 2021 Share Posted March 24, 2021 On 3/9/2020 at 3:48 PM, Jief_Machak said: I've committed a Qemu folder, in which you can easily start under control of gdb to catch where the panic message come from. It'll considerably speed up the bug resolution. To use : - regenerate your basetools to recompile GenFW - install qemu with brew (super easy) - install gdb with brew (super easy too, but wait...) - codesign gdb. That's a bit annoying. Well there is plenty of guide over the internet and it doesn't take long. The thing is : if you got this error with a very good self explanatory message, you may have to create in your login keychain instead os System and move it after. I was able once to create in System, some time ago, but not anymore. This should work : https://gist.github.com/hlissner/898b7dfc0a3b63824a70e15cd0180154 If it doesn't work first time, it's not because of custom parameter of the certificate. No need to waste your time with that. The field you need to change are specify in the guide. It's really a problem of having your keychain unlock to create the certificate. If you got a panic message, compile with GCC53 toolchain, DEBUG version, then start Qemu/gdb_launch (not need in a the folder). When you got your panic agin, gdb should give you a prompt "(gdb) ". Just type bt, return and send us the backtrace. It looks like this and it's super helpful : (gdb) bt #0 panic () at /JiefLand/5.Devel/Clover/workspace_Clover-master/Clover--CloverHackyColor--master/rEFIt_UEFI/cpp_util/panic.cpp:18 #1 0x000000007ddb8448 in REFIT_MENU_SCREEN::RunGenericMenu (this=0x7deddfe0 <MainMenu>, StyleFunc=&virtual REFIT_MENU_SCREEN::MainMenuStyle(unsigned long long, wchar_t const*), DefaultEntryIndex=0x7fcef9b0, ChosenEntry=0x7fcef9c0) at /JiefLand/5.Devel/Clover/workspace_Clover-master/Clover--CloverHackyColor--master/rEFIt_UEFI/refit/menu.cpp:2770 #2 0x000000007ddc3426 in REFIT_MENU_SCREEN::RunMainMenu (this=0x7deddfe0 <MainMenu>, DefaultSelection=-1, ChosenEntry=0x7fcefac8) at /JiefLand/5.Devel/Clover/workspace_Clover-master/Clover--CloverHackyColor--master/rEFIt_UEFI/refit/menu.cpp:5682 #3 0x000000007dda8972 in RefitMain (ImageHandle=0x7ec38918, SystemTable=0x7f745f18) at /JiefLand/5.Devel/Clover/workspace_Clover-master/Clover--CloverHackyColor--master/rEFIt_UEFI/refit/main.cpp:2641 #4 0x000000007dda2360 in ProcessModuleEntryPointList (ImageHandle=0x7ec38918, SystemTable=0x7f745f18) at /JiefLand/5.Devel/Clover/workspace_Clover-master/Clover--CloverHackyColor--master/Build/Clover/DEBUG_GCC53/X64/rEFIt_UEFI/refit/DEBUG/AutoGen.c:497 #5 0x000000007dda2297 in _ModuleEntryPoint (ImageHandle=0x7ec38918, SystemTable=0x7f745f18) at /JiefLand/5.Devel/Clover/workspace_Clover-master/Clover--CloverHackyColor--master/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c:59 (gdb) Sometime, in the backtrace, you get a lot of line before (means below) RefitMain. No need for that. Hope you'll try. I'll assist. That a post I made to explain how to get the backtrace on a panic. Very easy once you've installed gdb. For example, I added a panic line 729: Compile a DEBUG_GCC53 version, launch ./Qemu/gdb_launch and you get : Breakpoint 2, panic_ (Python Exception <type 'exceptions.NameError'> Installation error: gdb.execute_unwinders function is missing: format=0x7ddb1938 "sdfsdf", va=0x7fcef488 "\377\377\377\377\377\377\377\377", <incomplete sequence \372\316\177>) at /JiefLand/5.Devel/Clover/Clover-projects/Clover--CloverHackyColor--master.2/rEFIt_UEFI/Platform/Posix/abort.cpp:37 37 egSetGraphicsModeEnabled(false); (gdb) Enter "bt" for backtrace and that's it : (gdb) bt Python Exception <type 'exceptions.ImportError'> No module named gdb.frames: #0 panic_ (format=0x7ddb1938 "sdfsdf", va=0x7fcef488 "\377\377\377\377\377\377\377\377", <incomplete sequence \372\316\177>) at /JiefLand/5.Devel/Clover/Clover-projects/Clover--CloverHackyColor--master.2/rEFIt_UEFI/Platform/Posix/abort.cpp:37 #1 0x000000007dc9b0d6 in panic (Python Exception <type 'exceptions.NameError'> Installation error: gdb.execute_unwinders function is missing: format=0x7ddb1938 "sdfsdf") at /JiefLand/5.Devel/Clover/Clover-projects/Clover--CloverHackyColor--master.2/rEFIt_UEFI/Platform/Posix/abort.cpp:71 #2 0x000000007dc7bb95 in REFIT_MAINMENU_SCREEN::RunMainMenu (Python Exception <type 'exceptions.NameError'> Installation error: gdb.execute_unwinders function is missing: this=0x7de1d700 <MainMenu>, DefaultSelection=-1, ChosenEntry=0x7fcefa28) at /JiefLand/5.Devel/Clover/Clover-projects/Clover--CloverHackyColor--master.2/rEFIt_UEFI/gui/REFIT_MAINMENU_SCREEN.cpp:729 #3 0x000000007dc45ac4 in RefitMain (Python Exception <type 'exceptions.NameError'> Installation error: gdb.execute_unwinders function is missing: ImageHandle=0x7ec39918, SystemTable=0x7f745f18) at /JiefLand/5.Devel/Clover/Clover-projects/Clover--CloverHackyColor--master.2/rEFIt_UEFI/refit/main.cpp:3339 #4 0x000000007dc38369 in ProcessModuleEntryPointList (Python Exception <type 'exceptions.NameError'> Installation error: gdb.execute_unwinders function is missing: ImageHandle=0x7ec39918, SystemTable=0x7f745f18) at /JiefLand/5.Devel/Clover/Clover-projects/Clover--CloverHackyColor--master.2/Build/Clover/DEBUG_GCC53/X64/rEFIt_UEFI/refit/DEBUG/AutoGen.c:649 #5 0x000000007dc38297 in _ModuleEntryPoint (Python Exception <type 'exceptions.NameError'> Installation error: gdb.execute_unwinders function is missing: ImageHandle=0x7ec39918, SystemTable=0x7f745f18) at /JiefLand/5.Devel/Clover/Clover-projects/Clover--CloverHackyColor--master.2/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c:59 (gdb) Notice the "REFIT_MAINMENU_SCREEN.cpp:729" on the frame #2. That way you'll get the exact line where most likely a loop among MainMenu.entries is wrong. I can do it if you send me the Qemu img AND the "./Build/Clover/DEBUG_GCC53/X64/CLOVERX64.debug" file, generated at the compilation of the CloverX64.efi that's in the img. Any other, from a previous compilation, won't work. Link to comment Share on other sites More sharing options...
Jief_Machak Posted March 24, 2021 Share Posted March 24, 2021 1 hour ago, matxpa said: SubEntry-boot-log.txt 59.38 kB · 0 downloads I tried an old 5123 and your problem is already there. And it happens only when the parameter is "-v", I think. So I guess, somewhere Clover removes it for an unknown reason. Link to comment Share on other sites More sharing options...
Jief_Machak Posted March 24, 2021 Share Posted March 24, 2021 I can also add that if you want to iterate through menu entries : if you use size(), you need then to access with operator [] if you used sizeIncludingHidden(), you need to use ElementAt() instead of []. This will panic otherwise. Link to comment Share on other sites More sharing options...
Jief_Machak Posted March 25, 2021 Share Posted March 25, 2021 To save time from gdb compilation, this should work : gdb.zip Link to comment Share on other sites More sharing options...
Jief_Machak Posted March 25, 2021 Share Posted March 25, 2021 The good news is : it looks like gdb doesn't need to be signed to debug qemu ! Link to comment Share on other sites More sharing options...
Slice Posted March 25, 2021 Share Posted March 25, 2021 6 hours ago, Jief_Machak said: To save time from gdb compilation, this should work : gdb.zip Thanks. But then I need an instruction what to do iMac2017:CloverBootloader sergey$ ./Qemu/gdb_launch ./Qemu/CLOVERX64.efi clover_debug_file=./Qemu/CLOVERX64.debug clover_efi_file=./Qemu/CLOVERX64.efi ++ '[' Darwin = Darwin ']' ++ '[' -f ./Qemu/qemu_portable/qemu-system-x86_64 ']' ++ '[' -f /Users/sergey/src/CloverBootloader/Qemu/disk_image_gpt.img ']' ++ pgrep qemu ++ hdiutil attach /Users/sergey/src/CloverBootloader/Qemu/disk_image_gpt.img /dev/disk3 GUID_partition_scheme /dev/disk3s1 Microsoft Basic Data /Volumes/QEMU_EFI /dev/disk3s2 Apple_HFS /Volumes/QEMU_MACOS ++ shopt -s nocasematch +++ basename ./Qemu/CLOVERX64.debug ++ [[ CLOVERX64.debug =~ CloverX64* ]] ++ echo ditto ./Qemu/CLOVERX64.efi /Volumes/QEMU_EFI/EFI/CLOVER/CLOVERX64.efi ditto ./Qemu/CLOVERX64.efi /Volumes/QEMU_EFI/EFI/CLOVER/CLOVERX64.efi ++ ditto ./Qemu/CLOVERX64.efi /Volumes/QEMU_EFI/EFI/CLOVER/CLOVERX64.efi ++ echo ditto ./Qemu/CLOVERX64.efi /Volumes/QEMU_EFI/EFI/BOOT/BOOTX64.efi ditto ./Qemu/CLOVERX64.efi /Volumes/QEMU_EFI/EFI/BOOT/BOOTX64.efi ++ ditto ./Qemu/CLOVERX64.efi /Volumes/QEMU_EFI/EFI/BOOT/BOOTX64.efi ++ shopt -u nocasematch ++ diskutil eject /Volumes/QEMU_EFI Disk /Volumes/QEMU_EFI ejected ++ sleep 1 ++ set -m ++ cd /Users/sergey/src/CloverBootloader/Qemu ++ [[ 0 == 0 ]] ++ set +m ++ count=1 ++ timeout=60 ++ image_base_str='CloverX64 : Image base = ' ++ '[' 1 -le 60 ']' ++ getImageBase ++ '[' -f /Users/sergey/src/CloverBootloader/Qemu/serial0_qemu_out.log ']' ++ grep 'CloverX64 : Image base = ' /Users/sergey/src/CloverBootloader/Qemu/serial0_qemu_out.log ++ ./qemu_portable/qemu-system-x86_64 -L qemu_portable -m 2048 -cpu Penryn -bios ./bios.bin-1.13.0 -machine q35 -device ahci,id=ahi -drive format=raw,id=hda,file=./disk_image_gpt.img -usb -device usb-mouse,bus=usb-bus.0,port=2 -device usb-kbd,bus=usb-bus.0,port=1 -serial file:./serial0_qemu_out.log -gdb tcp::9000 ++ return 1 ++ sleep 1 ++ count=2 ++ '[' 2 -le 60 ']' ++ getImageBase ++ '[' -f /Users/sergey/src/CloverBootloader/Qemu/serial0_qemu_out.log ']' ++ grep 'CloverX64 : Image base = ' /Users/sergey/src/CloverBootloader/Qemu/serial0_qemu_out.log ++ return 1 ++ sleep 1 ++ count=3 ++ '[' 3 -le 60 ']' ++ getImageBase ++ '[' -f /Users/sergey/src/CloverBootloader/Qemu/serial0_qemu_out.log ']' ++ grep 'CloverX64 : Image base = ' /Users/sergey/src/CloverBootloader/Qemu/serial0_qemu_out.log ++ return 1 ++ sleep 1 ++ count=4 1 Link to comment Share on other sites More sharing options...
Slice Posted March 25, 2021 Share Posted March 25, 2021 23 hours ago, Slice said: One more 2021-3-24_19-0_CLOVERX64.EFI.log.zip 4.71 kB · 1 download The crash happen when I type "Space" on the penguin. executing the command SubMenuExit = MainChosenEntry->SubScreen->RunGenericMenu(&SubMenuIndex, &TempChosenEntry); Link to comment Share on other sites More sharing options...
Jief_Machak Posted March 25, 2021 Share Posted March 25, 2021 I'll have a look. I'm sure what is " I type "Space" on the penguin", though. For gdb, If you don't put any parameter, it'll get the one in Build/Clover/DEBUG_GCC53/X64 folder. Both CloverX64.debug and CloverX64.are needed. Then, you have to wait more. Qemu is extremely slow to launch. Gdb can only start when Clover will have printed something like "CloverX64 : Image base = 0x7DC38000". It can take 30/40 seconds sometimes. It worth having that working because locating panic (and therefore bug) happens in a matter of seconds. Have a go and tell me if it work. 2 hours ago, Slice said: ++ '[' 2 -le 60 ']' ++ getImageBase ++ '[' -f /Users/sergey/src/CloverBootloader/Qemu/serial0_qemu_out.log ']' ++ grep 'CloverX64 : Image base = ' /Users/sergey/src/CloverBootloader/Qemu/serial0_qemu_out.log ++ return 1 ++ sleep 1 ++ count=3 These are just shell trace I never took the time to remove... Link to comment Share on other sites More sharing options...
Jief_Machak Posted March 25, 2021 Share Posted March 25, 2021 2 hours ago, Slice said: penguin. Oh ok, I got back your qemu disk img and I understand the penguin. Having a look now. Link to comment Share on other sites More sharing options...
Jief_Machak Posted March 25, 2021 Share Posted March 25, 2021 (edited) Ok, fixed. Explanation : gdb back trace shows that the crash happens at REFIT_MENU_SCREEN.cpp:1555 when "GraphicsMenuStyle()" tries to access Entries[0] without checking if there is at least one entry in the array. Problem is that the menu for linux entries was empty. A look at "AddDefaultMenu()" shows that there is some test about the loader type : if (LoaderType == OSTYPE_OSX || LoaderType == OSTYPE_OSX_INSTALLER || LoaderType == OSTYPE_RECOVERY) { // entries for Mac OS X // add some entries } else if (LoaderType == OSTYPE_LINEFI) { // add some entries } else if ((LoaderType == OSTYPE_WIN) || (LoaderType == OSTYPE_WINEFI)) { // add some entries } Problem is : what happen if it's none of the above, like OSTYPE_LIN for example ? Answer : no entry at all is added. As a rule of thumb : never leave a test like this (which is equivalent to a C switch) without a default action. I've added an else condition with one default entry. In this particular case, maybe OSTYPE_LIN is wrong. And if it's right, these probably better to do for os type OSTYPE_LIN. But I don't the linux boot process. Edited March 25, 2021 by Jief_Machak 1 Link to comment Share on other sites More sharing options...
kushwavez Posted March 25, 2021 Share Posted March 25, 2021 (edited) Unfortuantely I'm facing another issue right now. I'm trying to install a Catalina 10.15.7 supplemental patch with Clover v5131 (commit sha in log name), but I can't see the Installer entry, therefore I can't boot from it. It isn't there even with "Show hidden entries". Same with Clover v5130 It's okay with Clover v5128 (can't test v5129 because I can't find the .efi): attaching debug logs. I saw another person with this issue, he was right: https://github.com/CloverHackyColor/CloverBootloader/issues/380 EDIT: also saw that a lot of Clover release zips are just gone from the Release page 2021-3-25_21-47_CloverX64-RELEASE_XCODE8-20210322154001-829fd04.efi.log preboot_v5128.log Edited March 25, 2021 by kushwavez 1 Link to comment Share on other sites More sharing options...
iCanaro Posted March 25, 2021 Share Posted March 25, 2021 @Jief_Machak this commit https://github.com/CloverHackyColor/CloverBootloader/commit/3b542ca7119c13c9c860716df62b5c6e3720b49a does not start macOS, you reload the Clover GUI as when you perform the NVRAM reset, but you do not start catalina or even big sur; other OS I haven't tried 2 Link to comment Share on other sites More sharing options...
eng_redaesm Posted March 26, 2021 Share Posted March 26, 2021 1 hour ago, iCanaro said: @Jief_Machak this commit https://github.com/CloverHackyColor/CloverBootloader/commit/3b542ca7119c13c9c860716df62b5c6e3720b49a does not start macOS, you reload the Clover GUI as when you perform the NVRAM reset, but you do not start catalina or even big sur; other OS I haven't tried same here also there is no options menu or help or any response Link to comment Share on other sites More sharing options...
Slice Posted March 26, 2021 Share Posted March 26, 2021 5 hours ago, Jief_Machak said: Ok, fixed. Yes, fixed But now 1 hour ago, eng_redaesm said: same here also there is no options menu or help or any response confirm Link to comment Share on other sites More sharing options...
Jief_Machak Posted March 26, 2021 Share Posted March 26, 2021 my bad. fixed. 2 1 Link to comment Share on other sites More sharing options...
eng_redaesm Posted March 26, 2021 Share Posted March 26, 2021 7 hours ago, Slice said: Yes, fixed But now confirm fixed response to options help and other buttons but not booting at all stalls on this preboot.log 3 Link to comment Share on other sites More sharing options...
Recommended Posts