Recent

Author Topic: Is this a Sequoia or Rosetta issue maybe?  (Read 564 times)

MISV

  • Hero Member
  • *****
  • Posts: 814
Is this a Sequoia or Rosetta issue maybe?
« on: November 16, 2025, 11:47:47 pm »
I have a user reporting a problem my software freezes while generating text file in user selected path (spinning ball of death)

On my own Intel 64bit Big Sur it works
- signed one year old release executable
- freshly compiled debug build on Trunk FPCUPdeluxe 2.4.0g x86_64 darwin-cocoa

However, my Lazarus states in about
2025-11-12
Lazarus_3_2
FPC 3.2.2

So apparently newest trunk version?



From user description: I would guestimate it could some string handling code getting lost looping in a huge amount of memory.

Are there any known issues regarding
1) Intel code generated and the ARM rosetta2 intel emulator/virtual?
2) Some API in Sequoia with stricter file access? (Chatgpt seems to thing file security been beefed up and there are certain flags with dialogs for selecting directory that has changed)
3) Maybe something with Sequoia and UTF8 and string libraries?



Any ideas from where to start to look?
Modify message

Thausand

  • Sr. Member
  • ****
  • Posts: 454
Re: Is this a Sequoia or Rosetta issue maybe?
« Reply #1 on: November 17, 2025, 12:07:05 am »
No very big help ...

Lazarus_3_2
Type error ? https://forum.lazarus.freepascal.org/index.php/topic,72707.0.html

Quote
So apparently newest trunk version?
No. Trunk:
FPC 3.3.1
Lazarus 4.99


jwdietrich

  • Hero Member
  • *****
  • Posts: 1267
    • formatio reticularis
Re: Is this a Sequoia or Rosetta issue maybe?
« Reply #2 on: November 17, 2025, 12:12:40 am »
This is an unusual issue. It may have to do with access rights. Is the folder to be written to on a networked volume?

Which functions do you use to write the text file?
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 4.2.0 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

MISV

  • Hero Member
  • *****
  • Posts: 814
Re: Is this a Sequoia or Rosetta issue maybe?
« Reply #3 on: November 18, 2025, 11:08:08 am »
No very big help ...

Lazarus_3_2
Type error ? https://forum.lazarus.freepascal.org/index.php/topic,72707.0.html

Quote
So apparently newest trunk version?
No. Trunk:
FPC 3.3.1
Lazarus 4.99

This is really odd

On my mac using "FPCUPdeluxe V2.4.0h for x86_64-darwin-cocoa" clicking "trunk" in "FPC version" and "Lazarus version" and then clicking "Trunk" button still installs
2025-11-12
Lazarus_3_2
FPC 3.2.2


I am now trying for 3rd time where I am installing into an empty folder + clearing all prior config files in FPCUPdeluxe directory.




MISV

  • Hero Member
  • *****
  • Posts: 814
Re: Is this a Sequoia or Rosetta issue maybe?
« Reply #4 on: November 18, 2025, 11:16:49 am »
This is an unusual issue. It may have to do with access rights. Is the folder to be written to on a networked volume?

Just local user folder

Which functions do you use to write the text file?

Code: Pascal  [Select][+][-]
  1. //------------------------------------------------------------------------------
  2. function msCloseFileStr_UTF8(const APathFileName: string; const ASaveStr: UTF8String; const ModeRights: Word = fmCreate or fmOpenWrite; AWithBom: Boolean = False): Boolean;
  3. var
  4.   FS: TFileStream;
  5.   TmpLen: Integer;
  6.   U: UTF8String;
  7. begin
  8.   U := ASaveStr;
  9. {$IFDEF mymsIsDebug}
  10.   TmpLen := msxGetBytesLength_UTF8(ASaveStr);
  11. {$ENDIf}
  12.   if AWithBom then
  13.     U := msxChkAddUTF8BomSig(U)
  14.   ;
  15.   Result := True;
  16.   try
  17.     FS := TFileStream.Create(APathFileName, ModeRights);
  18.     try
  19.       TmpLen := msxGetBytesLength_UTF8(U);
  20.       if (TmpLen <> 0) then
  21.         FS.Write(U[CmsxStrIdxFirst], TmpLen); // could also use s[1] // PChar(ASaveStr)^
  22.     finally
  23.       FS.Free;
  24.     end;
  25.   except
  26.     Result := False;
  27.   end;
  28. end;
  29.  

Never experienced this problem before. This code part unchanged in 10+ years running allover the place across Delphi/Windows, Lazarus/Mac. (Function used by all my text file writes of which there is a ton.)

Most likely it must a file access error. I do not think it can be an issue in the string (no fancy stuff done this place)



Do you know of any security software on Mac that maybe blocks file writes?

Thausand

  • Sr. Member
  • ****
  • Posts: 454
Re: Is this a Sequoia or Rosetta issue maybe?
« Reply #5 on: November 18, 2025, 11:23:42 am »
This is really odd
This yes very odd.

When have done FpCUpdeluxe, before quit there is message in window for display progress (all text line with pretty color). This text can save with menu with FpCupeluxe. Can you may be save file and have attach (or paste message) ?

If I make good understand then FPCupdeluxe have update for mac with V2.4.0h

I may be have hint (is guess). FPCUpdeluxe have file configuration. If use before have use old version FPCUpdeluxe then can possible that new fpcupdeluxe is use old configuration and have use .ini old setting. That can have result not have new version for select FPCUpDeluxe when select "FPC version" and "Lazarus version" in listbox.

MISV

  • Hero Member
  • *****
  • Posts: 814
Re: Is this a Sequoia or Rosetta issue maybe?
« Reply #6 on: November 19, 2025, 10:14:17 pm »
It helped removing the old Lazarus installation + removing all existing config files in the fpcupdeluxe

Then the "Trunk" button worked.



 

TinyPortal © 2005-2018