Recent

Author Topic: MacOS Lazarus Startup Problem - "Access Violation"  (Read 9351 times)

c_knowles4834

  • New Member
  • *
  • Posts: 25
MacOS Lazarus Startup Problem - "Access Violation"
« on: August 03, 2021, 03:15:31 am »
Has anyone seen this problem and has a known workaround on MacOS Big Sur 11.5?

See attached image:

Lazarus was working fine earlier today and now this window pops up when I try to start the IDE.  Nothing has changed in the configuration settings since I last tried to start the IDE; however, it now shows me an "Access Violation" message.

I did see a window earlier today that said something about "Darwin with 2 options" or something along that line with four choices when I tried to compile a simple "hello world" program.  I chose the option on the farthest left of the window and compiled the program without any problems.  Could this be causing the problem?

Sorry for the lack of precise information, this is like my second day of trying to figure out Lazarus and Object Pascal.

This is the setup I am running:

MacOS - Big Sur 11.5
Lazarus 2.2.0RC1-x86_64
fpc-3.2.2.intelarm64
fpc-src-3.2.2-2


« Last Edit: August 03, 2021, 04:05:43 am by c_knowles4834 »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #1 on: August 03, 2021, 04:44:51 am »
Never seen it and I have been using Lazarus 2.2 Release Candidate 1 on a 2018 Intel Mac mini with Big Sur almost daily.

If you go to Applications > Utilities > Terminal and open a Terminal and type:

fppkg list

What happens?

[You might also want to install the Big Sur 11.5.1 update]
« Last Edit: August 03, 2021, 04:48:18 am by trev »

c_knowles4834

  • New Member
  • *
  • Posts: 25
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #2 on: August 04, 2021, 12:24:50 am »
It returns the following message:

Code: [Select]
fppkg list
Warning: Connect to www.freepascal.org:443 failed.
Name                 Installed      Available

I am assuming that I need to install a fppkg.config file to get Lazarus running properly?

By the way @trev, you seem pretty knowledgable about running Lazarus on macOS.  What specific setup with Lazarus would you suggest with my current situation?  I am operating the following system specifications:


2019 MacBook Pro 16-in
Big Sur 11.5.1
2.3 GHz 8-Core Intel Core i9
16 GB 2667 MHz DDR4
Intel UHD Graphics 630 1536 MB


trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #3 on: August 04, 2021, 01:16:58 am »
I'm sorry to say it, but I think your FPC installation is sick (again).

This is the result of that command on my systems (3.3.1 for FPC trunk, 3.2.2 for current FPC release):

Code: Text  [Select][+][-]
  1. trev@macmini7 [/Users/trev] $ fppkg list
  2. Warning: Unexpected response status code: 404
  3. Name                 Installed        Available  
  4. aspell               3.3.1            -          
  5. bfd                  3.3.1            -          
  6. bzip2                3.3.1            -          
  7. cairo                3.3.1            -          
  8. chm                  3.3.1            -          
  9. cocoaint             3.3.1            -          
  10. fastcgi              3.3.1            -          
  11. fcl-async            3.3.1            -          
  12. fcl-base             3.3.1            -          
  13. fcl-db               3.3.1            -          
  14. fcl-extra            3.3.1            -          
  15. fcl-fpcunit          3.3.1            -          
  16. fcl-image            3.3.1            -          
  17. fcl-js               3.3.1            -          
  18. fcl-json             3.3.1            -          
  19. fcl-net              3.3.1            -          
  20. fcl-passrc           3.3.1            -          
  21. fcl-pdf              3.3.1            -          
  22. fcl-process          3.3.1            -          
  23. fcl-registry         3.3.1            -          
  24. fcl-report           3.3.1            -          
  25. fcl-res              3.3.1            -          
  26. fcl-sdo              3.3.1            -          
  27. fcl-sound            3.3.1            -          
  28. fcl-stl              3.3.1            -          
  29. fcl-web              3.3.1            -          
  30. fcl-xml              3.3.1            -          
  31. fftw                 3.3.1            -          
  32. fpgtk                3.3.1            -          
  33. fpindexer            3.3.1            -          
  34. fpmkunit             3.3.1            -          
  35. fppkg                3.3.1            -          
  36. fv                   3.3.1            -          
  37. gdbm                 3.3.1            -          
  38. gmp                  3.3.1            -          
  39. gnome1               3.3.1            -          
  40. gnutls               3.3.1            -          
  41. googleapi            3.3.1            -          
  42. gtk1                 3.3.1            -          
  43. gtk2                 3.3.1            -          
  44. hash                 3.3.1            -          
  45. hermes               3.3.1            -          
  46. httpd22              3.3.1            -          
  47. httpd24              3.3.1            -          
  48. ibase                3.3.1            -          
  49. iconvenc             3.3.1            -
  50. ide                  3.3.1        B   -          
  51. imagemagick          3.3.1            -          
  52. imlib                3.3.1            -          
  53. iosxlocale           3.3.1            -          
  54. libcups              3.3.1            -          
  55. libcurl              3.3.1            -          
  56. libffi               3.3.1            -          
  57. libfontconfig        3.3.1            -          
  58. libgd                3.3.1            -          
  59. libmagic             3.3.1            -          
  60. libmicrohttpd        3.3.1            -          
  61. libpng               3.3.1            -          
  62. libtar               3.3.1            -          
  63. mysql                3.3.1            -          
  64. ncurses              3.3.1            -          
  65. numlib               3.3.1            -          
  66. objcrtl              3.3.1            -          
  67. odata                3.3.1            -          
  68. odbc                 3.3.1            -          
  69. opencl               3.3.1            -          
  70. opengl               3.3.1            -          
  71. opengles             3.3.1            -          
  72. openssl              3.3.1            -          
  73. oracle               3.3.1            -          
  74. pasjpeg              3.3.1            -  
  75. pastojs              3.3.1            -          
  76. paszlib              3.3.1            -          
  77. pcap                 3.3.1            -          
  78. postgres             3.3.1            -          
  79. pthreads             3.3.1            -          
  80. regexpr              3.3.1            -          
  81. rsvg                 3.3.1            -          
  82. rtl                  3.3.1            -          
  83. rtl-console          3.3.1            -          
  84. rtl-extra            3.3.1            -          
  85. rtl-generics         3.3.1            -          
  86. rtl-objpas           3.3.1            -          
  87. rtl-unicode          3.3.1            -          
  88. sdl                  3.3.1            -          
  89. sqlite               3.3.1            -          
  90. symbolic             3.3.1            -          
  91. syslog               3.3.1            -          
  92. tcl                  3.3.1            -          
  93. tplylib              3.3.1            -          
  94. univint              3.3.1            -          
  95. unzip                3.3.1            -          
  96. utils-lexyacc        3.3.1            -          
  97. utils-pas2js         3.3.1            -          
  98. utmp                 3.3.1            -          
  99. vcl-compat           3.3.1            -    
  100. webidl               3.3.1            -          
  101. x11                  3.3.1            -          
  102. xforms               3.3.1            -          
  103. zlib                 3.3.1            -

Is your file system suffering corruption? I'd try running Disk Utility First Aid on it to check. After that, I can only suggest reinstalling FPC again.

I've never seen these issues before and noone has reported them here before either. It's certainly not the typical experience.

I've been buying Mac minis since 2007, having ditched my Windows PCs after sucking them into Parallels VMs to run on the Mac mini. I run macOS on the latest ones and FreeBSD on the older ones. All but the base model 2020 M1 were bought at discount from the Apple refurb store.

I don't see why your current MacBook shouldn't be suitable for running Lazarus and FPC as long as it's not suffering any hardware issues.

 

c_knowles4834

  • New Member
  • *
  • Posts: 25
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #4 on: August 04, 2021, 03:01:15 am »
Well, I checked the Disk Utility and everything looked good.

I am going to go ahead and reinstall Lazarus, along with the respective files. However, I have two questions:

1.) Are there any scripts for uninstalling the FPC and related packages through the terminal?  If not, what is the best way to completely uninstall everything and start from scratch?

2.) What files/setup would you suggest that I install on this next attempt to get Lazarus running?


This will be the third time that I have tried to correctly install Lazarus, FPC, and the respective packages; I really want this to be the last time. I just want to teach myself Object Pascal.




trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #5 on: August 04, 2021, 04:59:13 am »
Well, I checked the Disk Utility and everything looked good.

I was hoping that would find an issue as the reason for your experiences to date remains inexplicable.

Quote
I am going to go ahead and reinstall Lazarus, along with the respective files. However, I have two questions:

1.) Are there any scripts for uninstalling the FPC and related packages through the terminal?  If not, what is the best way to completely uninstall everything and start from scratch?

Yes, there's a script listed on the Wiki here which I only updated a day or so ago. Note: you will need to expand the second section under the main heading (click on the [Expand] link on the right of the page).

Quote
2.) What files/setup would you suggest that I install on this next attempt to get Lazarus running?

Just follow the steps on the Installing Lazarus on macOS Wiki page. Many have successfully done so, and I've just verified that they also work on a 2018 Mac mini running the latest Monterey developer beta.

Quote
This will be the third time that I have tried to correctly install Lazarus, FPC, and the respective packages; I really want this to be the last time. I just want to teach myself Object Pascal.

I can imagine it is really frustrating. Noone has previously experienced these issues, so it's hard to know what the cause might be. If you had access to another Mac, you might be able to rule out your particular machine as the cause, but I gather you don't.

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #6 on: August 04, 2021, 08:26:30 am »
Я сталкивался не раз с этой проблемой. В разных системах, но чаще в MacOS (у меня Catalina).
Насколько я помню, это проблемы с отладкой. Попробуйте отключить отладку. Или "поиграться" с отладкой (хотя сейчас для MacOS рекомендуют определённую отладку, я не запомнил какую).

Сильно пугаться не стоит, с вашим Lazarus всё в порядке.

google translate:
I faced this problem more than once. On different systems, but more often on MacOS (I have Catalina).
As far as I remember, these are debugging issues. Try turning off debugging. Or "play around" with debugging (although now a certain debugging is recommended for MacOS, I did not remember which one).

Don't be too scared, your Lazarus is fine.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #7 on: August 04, 2021, 10:02:35 am »
........
This will be the third time that I have tried to correctly install Lazarus, FPC, and the respective packages; I really want this to be the last time. I just want to teach myself Object Pascal.

I must say here that I am not a big fan of the 'reinstall model' - especially when it becomes a habit.  There is no intrinsic reason why you should need to reinstall. Yes, I know is necessary with Windows because of the DLL mess but MacOS is, sort of, Unix. My point is that it would be nice to workout why this is necessary before reinstalling, Otherwise, we risk having to do it again !

 So, just in case you have not yet begun ...

Concentrating on this issue that Trev brought up, why fppkg is unconfigured (just as somewhere to start) fppkg has a config file, fppkg.cfg. On my Linux box, it lives in ~/.config and maybe there on the mac too, given that the mac install does try to lever its Unix-ness as much as possible. So, please try this in a terminal in your home directory -

Code: [Select]
find . -name fppkg.cfg [enter]
If that does no find anything, and you have some time to spare -

Code: [Select]
find  .  -name fppkg.cfg  2>/dev/null   [enter]
If you do find it, please cat it out and see if it contains sensible data, should be human readable in an ini file like format.  If, as seems likely it might be there but corrupted. Unlikely its not there at all ....

Davo




 
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #8 on: August 04, 2021, 10:14:10 am »
If that does no find anything, and you have some time to spare -

Code: [Select]
find  .  -name fppkg.cfg  2>/dev/null   [enter]

Don't you mean:
Code: [Select]
find  /  -name fppkg.cfg  2>/dev/null   [enter]???
Otherwise both commands are (almost) equivalent ...
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #9 on: August 04, 2021, 11:24:42 am »
I must say here that I am not a big fan of the 'reinstall model' - especially when it becomes a habit.  There is no intrinsic reason why you should need to reinstall. Yes, I know is necessary with Windows because of the DLL mess but macOS is, sort of, Unix. My point is that it would be nice to workout why this is necessary before reinstalling, Otherwise, we risk having to do it again !

1) On the first installation, the LCL could not even be compiled (error invalid PPU files);
2) On the second installation, it worked for a while, then there were issues starting Lazarus because of fppkg.

It doesn't seem to be file system corruption which leaves me stumped. I've used the same macOS packages on four machines (Mojave, Big Sur - Intel and aarch64, Monterey developer beta) all of which are still working including the two I use daily. If the third installation fails immediately or shortly thereafter, I would have to conclude it's some computer-specific issue like a marginal SSD.

By the way, macOS is a certified UNIX, not a "sort of" UNIX, though I do get your point. However, when all you have is a hammer, everything looks like a nail :)

c_knowles4834

  • New Member
  • *
  • Posts: 25
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #10 on: August 04, 2021, 07:18:06 pm »
I was actually running Lazarus and compiling some simple code without the fppkg being configured.  I thought that it would just run on a default setting for fppkg, and it did for about 3 hours or so.  Then, I started getting that "Access Violation" message without making any changes. 

I will start a new thread upon reinstallation if I run into any more problems.  I am convenience that this is an error on my part and I am just too ignorant of all technical stuff to make Lazarus work that I don't notice it.

Thanks for the help fellas!


dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #11 on: August 05, 2021, 02:31:18 am »

Don't you mean:
Code: [Select]
find  /  -name fppkg.cfg  2>/dev/null   [enter]???

Indeed I did, thanks lucamar.  I was rushing hoping to get in before c_k trashed the existing install, looks like I was too late. Thats a pity. It does seem really strange how many problems this poor guy is having.

"Yes Captain (Trev), Its Unix but not as we know it."   

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

c_knowles4834

  • New Member
  • *
  • Posts: 25
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #12 on: August 05, 2021, 02:49:52 am »
Alright, here's another problem that I just ran into.  I ran the shell script as directed on the wiki and then checked to see if the files had been removed from my hard drive with
Code: [Select]
mdfind -name fpc and it returned the following:

Code: [Select]
/usr/share/vim/vim82/compiler/fpc.vim
/private/etc/fpc.bak
/usr/local/share/src/fpc-3.2.2/demo/morphos/Makefile.fpc
/usr/local/share/src/fpc-3.2.2/demo/win32/Makefile.fpc
/usr/local/share/src/fpc-3.2.2/demo/Makefile.fpc
/usr/local/share/src/fpc-3.2.2/demo/text/Makefile.fpc
/usr/local/share/src/fpc-3.2.2/demo/modex/Makefile.fpc
/usr/local/share/src/fpc-3.2.2/demo/modex/fpcmodex.txt
/usr/local/share/src/fpc-3.2.2/demo/linux/Makefile.fpc
/usr/local/share/src/fpc-3.2.2/demo/lister/Makefile.fpc
/usr/local/share/src/fpc-3.2.2/demo/freebsd/Makefile.fpc
/usr/local/share/src/fpc-3.2.2/demo/netwlibc/Makefile.fpc
/usr/local/share/src/fpc-3.2.2/demo/unix/Makefile.fpc
/usr/local/share/src/fpc-3.2.2/demo/graph/Makefile.fpc

...

/usr/local/share/src/fpc-3.2.0/demo/netware/Makefile.fpc
/usr/local/share/src/fpc-3.2.0/demo/os2/Makefile.fpc
/usr/local/share/src/fpc-3.2.0/demo/fpcdemos.txt
/usr/local/share/src/fpc-3.2.2
/usr/local/share/fpcsrc
/usr/local/share/fpcsrc/3.2.0/packages/fcl-fpcunit
/usr/local/share/fpcsrc/3.2.0/utils/fpcres
/usr/local/share/fpcsrc/3.2.0/utils/javapp/src/fpc
/usr/local/share/fpcsrc/3.2.0/utils/fpcm
/usr/local/share/fpcsrc/3.2.0/utils/fpcmkcfg
/usr/local/share/fpcsrc/3.2.0/utils/fpcreslipo
/usr/local/share/fpcsrc/3.2.0/tests/test/units/fpcunit
/usr/local/share/src/fpc-3.2.0
/Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk/usr/share/man/man3/fpclassify.3
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/share/man/man3/fpclassify.3
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/share/man/man3/fpclassify.3
/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/share/man/man3/fpclassify.3

Lol, this is so screwed.  This has to be a user error on my part.  Any suggestion on how to get these files off of my computer with some other shell script?

c_knowles4834

  • New Member
  • *
  • Posts: 25
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #13 on: August 05, 2021, 03:45:09 am »
I found a workaround fellas, if you go into finder and use the keystroke cmd-shift-G then you can search /usr/local/lib and delete the fpc files. Here's a link to where I found this info:

https://fpc-devel.freepascal.narkive.com/uApEucCp/uninstalling-fpc-in-macos-x

Pretty cool, I am going to continue deleting the rest of the files and start from scratch again. Thanks again!

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: MacOS Lazarus Startup Problem - "Access Violation"
« Reply #14 on: August 05, 2021, 11:19:51 am »
There's been some changes between recent Lazarus versions and the single uninstallation script was out of date. I have now deleted the old script and created two new scripts. One for each of:

1) FPC 3.x.x and Lazarus 2.0.8 through 2.0.10
2) FPC 3.x.x and Lazarus 2.0.12 and  2.2.0 (RC1)

I verified that they delete all files specifically having tested combinations of FPC 3.0.4, 3.2.0 and 3.2.2 and Lazarus 2.0.8, 2.0.10. 2.0.12 and 2.2.0 (RC1). I'm not going back any further than that.

I have also listed version numbers so that future users will not run into similar issues when installing if the versions change and the scripts are not updated in a timely manner.

 

TinyPortal © 2005-2018