Jump to content

Clover General discussion


ErmaC
30,171 posts in this topic

Recommended Posts

9 hours ago, Pene said:

removed .wc_str()

For giving to a parameter that is explicitly a CHAR16*, you still have to use wc_str(). What I did is to accept XString (I mean XString8 or XStringW) as well as char* wchar_t* for method in objects XString and XStringArray (like takeValueFrom, concatAll, etc.).

 

This should work the same and not having fixed size limitation :

for (UINTN Index = 0; Index < 60; Index++) {
    XStringW Name;
    Name.SPrintf(L"EFI\\CLOVER\\misc\\screenshot%lld.png", Index);
    if (!FileExists(SelfRootDir, Name.wc_str())) {
      Status = egSaveFile(SelfRootDir, Name.wc_str(), FileData, FileDataLength);
      if (!EFI_ERROR(Status)) {
        break;
      }
    }
  }

Did I do a FileExists version that accept XStringW ? If yes, wc_str() in FileExists could be removed.

 

Link to comment
Share on other sites

48 minutes ago, Jief_Machak said:

For giving to a parameter that is explicitly a CHAR16*, you still have to use wc_str(). What I did is to accept XString (I mean XString8 or XStringW) as well as char* wchar_t* for method in objects XString and XStringArray (like takeValueFrom, concatAll, etc.).

I still don't understand how the original code could have produced a "EFI\\CLOVER\\misc.png" in some cases (I couldn't reproduce through).

Edited by Pene
Link to comment
Share on other sites

@Pene Sorry, I didn't have a look. I'm really overwhelmed by something else for the next few days. 

 

I missed this post :

4 hours ago, vector sigma said:

Sorry I felt asleep, tomorrow Jief probably will fix it. That should compile:


  XStringW Name = L"EFI\\CLOVER\\misc\\screenshot_test.png"_XSW;
  Status = egSaveFile(SelfRootDir, Name.wc_str(), FileData, FileDataLength);
  if (EFI_ERROR(Status)) {
    MsgLog("Make screenshot_test fail\n");
  }

 

That doesn't compile ???

10 hours ago, Pene said:
10 hours ago, LAbyOne said:

 

This is Good! 

no additional folder created only shots into misc.

Thanks

Very strange, in that case it looks like a bug in XStringW() or SWPrintf().

@Jief_Machak any clue?

I missed this one too...

Link to comment
Share on other sites

20 minutes ago, Jief_Machak said:

In fact, I missed quite a few post and I'm a bit lost.

If there is a suspected in SWPrintf of XString, I'll investigate.

What wasn't working as it should ?

See this message

https://www.insanelymac.com/forum/?app=core&amp;module=system&amp;controller=content&amp;do=find&amp;content_class=forums_Topic&amp;content_id=284656&amp;content_commentid=2721955

But we can't understand what is wrong.

Looks like string "\\EFI\\CLOVER\\misc\\screenshot0.png" was converted to "\\EFI\\CLOVER\\misc.png"

 

 

Link to comment
Share on other sites

31 minutes ago, Jief_Machak said:

In fact, I missed quite a few post and I'm a bit lost.

If there is a suspected in SWPrintf of XString, I'll investigate.

What wasn't working as it should ?

OK, Let me make a summary:

 

@LAbyOne reported that when he makes a screenshot (F10) from Clover GUI, a misc.png folder is created:

https://www.insanelymac.com/forum/uploads/monthly_2020_05/1891019853_Screenshot2020-05-11at18_09_00.png.86e860af1b31ee8a0ba2f99b55634fd1.png

He also mentioned also that every time he deletes it, after he makes another screenshot, it is created again.

 

@Matgen84 confirmed he has the same issue, but neither me not @vector sigma could reproduce it.

 

The code resposible for that is at egScreenShot(VOID) @ rEFIt_UEFI/libeg/libscreen.cpp.

 

@vector sigma thought it is due to a missing .wc_str() in FileExists, so he added that in a commit, but the issue persisted for @LAbyOne.

Then he offered to change the code in Clover with this:

for (UINTN Index = 0; Index < 60; Index++) {
    CHAR16 Name[128];
    UnicodeSPrint(Name, 256, L"EFI\\CLOVER\\misc\\screenshot%lld.png", Index);
    if (!FileExists(SelfRootDir, Name)) {
      Status = egSaveFile(SelfRootDir, Name, FileData, FileDataLength);
      if (!EFI_ERROR(Status)) {
        break;
      }
    }
  }

Which @LabyOne tested (he changed it himself, it wasn't committed to Clover), and said it solved the issue.

 

9 minutes ago, Slice said:

See this message

https://www.insanelymac.com/forum/?app=core&amp;module=system&amp;controller=content&amp;do=find&amp;content_class=forums_Topic&amp;content_id=284656&amp;content_commentid=2721955

But we can't understand what is wrong.

Looks like string "\\EFI\\CLOVER\\misc\\screenshot0.png" was converted to "\\EFI\\CLOVER\\misc.png"

 

 

Did you manage to reproduce the problem?

Edited by Pene
Link to comment
Share on other sites

If I understand well, the original code was with a XStringW and that created a misc.png but for @LAbyOne and @Matgen84 only ?

I think we must find what it is. Could be a bug in Xcode compiler... I've seen that before.

@LAbyOne and @Matgen84 : could you put back the code that creates misc.png and commit in a branch ? Then I'll see if it does that same here.

 

Link to comment
Share on other sites

8 minutes ago, Jief_Machak said:

If I understand well, the original code was with a XStringW and that created a misc.png but for @LAbyOne and @Matgen84 only ?

I think we must find what it is. Could be a bug in Xcode compiler... I've seen that before.

@LAbyOne and @Matgen84 : could you put back the code that creates misc.png and commit in a branch ? Then I'll see if it does that same here.

 

The code is still with a XStringW, no one changed it in Clover yet. And I always tested with GCC. Didn't check with Xcode, but sure how they compile.

Edit: tested now an Xcode compile, and it still doesn't create the folder for me.

Edited by Pene
  • Like 1
Link to comment
Share on other sites

Or this is a bug in Fat32 driver provided by UEFI BIOS so why we can't reproduce it!

For this reason we produce own driver Fat.efi and strongly recommend to include it into folder

/EFI/CLOVER/drivers/UEFI/

Link to comment
Share on other sites

5 minutes ago, Pene said:

@Matgen84

You had the issue with your own builds or also with Clover release builds?

 

I've misc.png folder with my won build from source (Xcode). In few minutes, I build ffec5b8. Test and report.

 

I've this issue when try to build commit ffec5b8

 

Updating 56c4e4dd4..ffec5b89c
error: Your local changes to the following files would be overwritten by merge:
	CloverPackage/package/po/clover.pot
	CloverPackage/package/po/de.po
	CloverPackage/package/po/en.po
	CloverPackage/package/po/es.po
	CloverPackage/package/po/fr.po
	CloverPackage/package/po/hr.po
	CloverPackage/package/po/id.po
	CloverPackage/package/po/it.po
	CloverPackage/package/po/ja.po
	CloverPackage/package/po/ko.po
	CloverPackage/package/po/lv.po
	CloverPackage/package/po/nl.po
	CloverPackage/package/po/pl.po
	CloverPackage/package/po/pt-BR.po
	CloverPackage/package/po/pt.po
	CloverPackage/package/po/ro.po
	CloverPackage/package/po/ru.po
	CloverPackage/package/po/tr.po
	CloverPackage/package/po/uk.po
	CloverPackage/package/po/uk_UA.po
	CloverPackage/package/po/vi.po
	CloverPackage/package/po/zh_CN.po
	CloverPackage/package/po/zh_TW.po
Please commit your changes or stash them before you merge.
Aborting

 

Edited by Matgen84
Link to comment
Share on other sites

2 minutes ago, Pene said:

@Matgen84

You had the issue with your own builds or also with Clover release builds?

Code still there ? Oh, ok.

 

@Matgen84 : good. Check if your compilation of the latest commit still produces the misc.png. If yes @Pene could you send him your compilation.

Interesting to know If Pene dosen't have the problem and Matgen84 you still have it with his .efi. That could mean that it's a UEFI bug, but in that case why going back to UnicodeSPrint fixed it ?

  • Like 1
Link to comment
Share on other sites

5 minutes ago, Matgen84 said:

 

I've misc.png folder with my won build from source (Xcode). In few minutes, I build ffec5b8. Test and report.

 

I've this issue when try to build commit ffec5b8

 


Updating 56c4e4dd4..ffec5b89c
error: Your local changes to the following files would be overwritten by merge:
	CloverPackage/package/po/clover.pot
	CloverPackage/package/po/de.po
	CloverPackage/package/po/en.po
	CloverPackage/package/po/es.po
	CloverPackage/package/po/fr.po
	CloverPackage/package/po/hr.po
	CloverPackage/package/po/id.po
	CloverPackage/package/po/it.po
	CloverPackage/package/po/ja.po
	CloverPackage/package/po/ko.po
	CloverPackage/package/po/lv.po
	CloverPackage/package/po/nl.po
	CloverPackage/package/po/pl.po
	CloverPackage/package/po/pt-BR.po
	CloverPackage/package/po/pt.po
	CloverPackage/package/po/ro.po
	CloverPackage/package/po/ru.po
	CloverPackage/package/po/tr.po
	CloverPackage/package/po/uk.po
	CloverPackage/package/po/uk_UA.po
	CloverPackage/package/po/vi.po
	CloverPackage/package/po/zh_CN.po
	CloverPackage/package/po/zh_TW.po
Please commit your changes or stash them before you merge.
Aborting

 

git reset --hard

git pull

then compile

  • Like 1
Link to comment
Share on other sites

Just now, Jief_Machak said:

You might to delete the Build folder after a git reset.

 

I use git stash to solve this problem. Build is Ok. Update and test.

 

Thanks

Link to comment
Share on other sites

1 minute ago, Matgen84 said:

 

I use git stash to solve this problem. Build is Ok. Update and test.

 

Thanks

stash is for when you actually made changes and wanted to keep them, which I doubt is the case.

Link to comment
Share on other sites

4 minutes ago, Pene said:

stash is for when you actually made changes and wanted to keep them, which I doubt is the case.

 

Sure, I don't make any change to source files.

 

I've misc.png folder with my own build r5117 commit ffec5b8 from source (Xcode). 

 

 

Capture d’écran 2020-05-12 à 10.21.40.png

Link to comment
Share on other sites

1 minute ago, Matgen84 said:

 

Sure, I don't make any change to source files.

 

I've misc.png folder with my own build r5117 commit ffec5b8 from source (Xcode). 

 

 

Capture d’écran 2020-05-12 à 10.21.40.png

Do you have Fat.efi driver?

Link to comment
Share on other sites

8 minutes ago, Matgen84 said:

 

Sure, I don't make any change to source files.

 

I've misc.png folder with my own build r5117 commit ffec5b8 from source (Xcode). 

 

 

Capture d’écran 2020-05-12 à 10.21.40.png

Attach your CLOVERX64.efi

Which Xcode version is this? Could be a bug with a specific Xcode.

Edited by Pene
Link to comment
Share on other sites

3 minutes ago, Matgen84 said:

 

I use Xcode 11.3.1 (Mojave).

 

CLOVERX64.efi.zip

Yeah well his build also dont cause me the problem.

Did you try to erase the misc folder and confirm it is recreated when making screenshot?

How about with binary from Clover's release 5117, do you also have the problem?

Also, what Slice asked, what do you have in drivers?

Edited by Pene
Link to comment
Share on other sites

7 minutes ago, Jief_Machak said:

why is it a folder and not a file ? egSaveFile can create folder ?

Yes, it can. It will create folder misc/ if it is absent.

  • Like 1
Link to comment
Share on other sites

16 minutes ago, Pene said:

Yeah well his build also dont cause me the problem.

Did you try to erase the misc folder and confirm it is recreated when making screenshot?

How about with binary from Clover's release 5117, do you also have the problem?

Also, what Slice asked, what do you have in drivers?

 

I will try to erase the actual misc folder and report his recreation. Why test binary release 5117! I don't understand. All works well before.

 

What is the relationship between the drivers and the misc.png folder?

IvyBridge config Drivers in use: 

 


 

Capture d’écran 2020-05-12 à 10.56.48.png

Link to comment
Share on other sites

×
×
  • Create New...