Jump to content
30960 posts in this topic

Recommended Posts

11 minutes ago, Slice said:

Because we want to know if there is compiler dependency. You compile your Clover and release Clover was compiled by me.

 

Thanks :)

 

As @Pene says in a previous post (not the last):

  • I delete misc folder
  • Press F10
  • After restart, mount ESP: misc folder what recreated, without misc.png folder

Do you want me to test Binaries Release 5117 anyway.

Edited by Matgen84
Just now, Pene said:

You are saying misc IS recreated or NOT recreated? I dont understand.

 

misc folder is recreated (with my own build). Do you want me to test Binaries Release 5117 anyway.

Just now, Pene said:

I still dont understand.

misc is recreated or misc.png is recreated?

misc should be recreated, but misc.png not.

 

I wrote misc folder is recreated. :) misc.png not.

 

Can you answer to me: Do you want me to test Binaries Release 5117 anyway.

Just now, Matgen84 said:

 

I wrote misc folder is recreated. :) misc.png not.

 

Can you answer to me: Do you want me to test Binaries Release 5117 anyway.

If misc.png is not recreated there is no sense to test anything else.

But I dont understand when the problem was solved or what was it.

  • Thanks 1
4 minutes ago, Pene said:

If misc.png is not recreated there is no sense to test anything else.

But I dont understand when the problem was solved or what was it.

 

I too do not understand when the problem was resolved and where it was. It's strange.

Thanks.

@Jief_Machak @Slice

 

Well, the problem is NOT resolved. I figured out how to reproduce it, sort of, sometimes.
It just doesn't happen always.

Reproduced with standard 5117 CLOVERX64.efi compiled by Slice, in Qemu, without any special drivers or Fat.efi.

To reproduce in Qemu, press F10 like 30 times, one every second or so, and this is the result:

/Volumes/NO NAME/EFI/CLOVER/misc:
total 16069
-rwxrwxrwx  1 pene  staff  434777 May 12 09:36 screenshot0.png
-rwxrwxrwx  1 pene  staff  434777 May 12 09:36 screenshot1.png
-rwxrwxrwx  1 pene  staff  430375 May 12 09:37 screenshot10.png
-rwxrwxrwx  1 pene  staff  430375 May 12 09:37 screenshot11.png
-rwxrwxrwx  1 pene  staff  434777 May 12 09:37 screenshot12.png
-rwxrwxrwx  1 pene  staff  430375 May 12 09:37 screenshot13.png
-rwxrwxrwx  1 pene  staff  433949 May 12 09:38 screenshot14.png
-rwxrwxrwx  1 pene  staff  430375 May 12 09:38 screenshot15.png
-rwxrwxrwx  1 pene  staff  430375 May 12 09:38 screenshot16.png
-rwxrwxrwx  1 pene  staff  433523 May 12 09:38 screenshot17.png
-rwxrwxrwx  1 pene  staff  430945 May 12 09:38 screenshot18.png
-rwxrwxrwx  1 pene  staff  434777 May 12 09:36 screenshot2.png
-rwxrwxrwx  1 pene  staff  434777 May 12 09:37 screenshot3.png
-rwxrwxrwx  1 pene  staff  434777 May 12 09:37 screenshot4.png
-rwxrwxrwx  1 pene  staff  434777 May 12 09:37 screenshot5.png
-rwxrwxrwx  1 pene  staff  430945 May 12 09:37 screenshot6.png
-rwxrwxrwx  1 pene  staff  433523 May 12 09:37 screenshot7.png
-rwxrwxrwx  1 pene  staff  431642 May 12 09:37 screenshot8.png
-rwxrwxrwx  1 pene  staff  431766 May 12 09:37 screenshot9.png

/Volumes/NO NAME/EFI/CLOVER/miscgመ竑:

/Volumes/NO NAME/EFI/CLOVER/miscg℘竑:

/Volumes/NO NAME/EFI/CLOVER/miscg崘竊:

/Volumes/NO NAME/EFI/CLOVER/miscg栘竊:

/Volumes/NO NAME/EFI/CLOVER/miscg瀘竊:

/Volumes/NO NAME/EFI/CLOVER/miscgꄘ竉:

/Volumes/NO NAME/EFI/CLOVER/miscgꈘ竈:

/Volumes/NO NAME/EFI/CLOVER/miscg찘竟:

/Volumes/NO NAME/EFI/CLOVER/miscg竑:

And no, I am not Chinese, nor do I use any Chinese characters :lol:

Edited by Pene
  • Sad 1
1 hour ago, Slice said:

Screenshot or Preboot.log. But it is not now, I just remember it was.

It was before XString. The error is in egSaveFile.

but this works, why? ignore, I saw your last commit. 

Edited by vector sigma
5 hours ago, Jief_Machak said:

I missed this post :

9 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 ???

Yes this work. Only I did not tested it as I wrote it by hand with the phone as i was in bad 9 hours ago :), but that apparently wont compile:

XStringW Name = L"EFI\\CLOVER\\misc\\screenshot_test.png";

For me the original code works well, not sure why LabyOne and Matgen84 had problems. Seeing chinese characters and truncations looks like concatenating strings fail due to a null termination not present or present twice? But only a supposition, why I proposed LabyOne to test an "hard coded”  string like the above. 

EDIT

I spoke for the past as looks like now everythings works for every one :)

 

EDIT 2

Also copying code from this forum (even from the code box) it adds special and invisible characters which prevent the right compilation Lol. This should be fixed...

Edited by vector sigma
2 hours ago, Slice said:

Screenshot or Preboot.log. But it is not now, I just remember it was.

It was before XString. The error is in egSaveFile.

Thanks, I just didn't think to look at egSaveFile.

From some reason we were stuck at looking at the wrong place. Now I look at egSaveFile, and the error is kind of obvious. I corrected in last commit. No more Chinese characters or weird directories.

All the rest with it happening / not happening was just coincidence.

 

1 hour ago, Jief_Machak said:

Let's refactor egSaveFile to use XStringW... I'll try to save a bit of time later in day.

Not an urgency anymore. As usual the problem was not related to your code :lol:

The only one that actually was related from all weird bugs that appeared lately and I bugged you with was/is the self assignment. So take your time and not get too agglomerated because of us bugging you with all kind of unrelated things :lol:

Edited by Pene
  • Like 2
28 minutes ago, Pene said:

From some reason we were stuck at looking at the wrong place. Now I look at egSaveFile, and the error is kind of obvious. I corrected in last commit.

Slice already did it directly in the StrnCpy() function in the previous commit..

Edited by vector sigma
6 minutes ago, vector sigma said:

Slice already did it directly in the StrnCpy() function in the previous commit..

Missed that, but I was still getting chinese after that commit. Or was it before? I don't know anymore.

Anyway it's gone now.

Edited by Pene
  • Like 1

I think Matgen84 tested with this commit. As not release.

4 hours ago, Matgen84 said:

 

I wrote misc folder is recreated. :) misc.png not.

 

Can you answer to me: Do you want me to test Binaries Release 5117 anyway.

39 minutes ago, Pene said:

The only one that actually was related from all weird bugs that appeared lately and I bugged you with was/is the self assignment. So take your time and not get too agglomerated because of us bugging you with all kind of unrelated things :lol:

right! XString works like sharm!

6 minutes ago, Slice said:

I think Matgen84 tested with this commit. As not release.

But I'm not sure it's a good idea to do that in StrnCpy.

Because that's against the standard implementation: http://www.cplusplus.com/reference/cstring/strncpy/

Sometimes, we may pass a buffer of specific size, and doing a *Destination = L'\0' at the end may write past that buffer.

StrnCpy cannot know what size of buffer we have, only what we specified. That's why standard implementation does not include '\0' in this case.

Edited by Pene
×
×
  • Create New...