* * *

Author Topic: Lazarus IDE with Cocoa wont run using latest trunk  (Read 1799 times)

MISV

  • Sr. Member
  • ****
  • Posts: 453
Lazarus IDE with Cocoa wont run using latest trunk
« on: July 05, 2018, 10:17:13 pm »
I am having a problem with the trunk release today. After downloading darwin 64 bit with cocoa default I get this error log when trying to Launch Lazarus:

Quote
myname$ /Users/myname/MN/cocoa-lazarus-trunk/lazarus/lazarus ; exit;
using config file /Users/myname/MN/cocoa-lazarus-trunk/lazarus/lazarus.cfg
SetPrimaryConfigPath NewValue="/Users/thomasschulz/TS/cocoa-lazarus-trunk/config_lazarus" -> "/Users/myname/MN/cocoa-lazarus-trunk/config_lazarus"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/Users/myname/MN/cocoa-lazarus-trunk/config_lazarus"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"
NOTE: editor options config file not found - using defaults
Looking for code tools config file:  "/Users/myname/MN/cocoa-lazarus-trunk/config_lazarus/codetoolsoptions.xml"
NOTE: codetools config file not found - using defaults
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-darwin-cocoa New=x86_64-darwin-cocoa FPC=True LCL=False
NOTE: help options config file not found - using defaults
2018-07-05 22:07:21.125 lazarus[21334:6040085] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM insertObject:atIndex:]: index 3 beyond bounds [0 .. 0]'
*** First throw call stack:
(
   0   CoreFoundation                      0x00007fff477356bb __exceptionPreprocess + 171
   1   libobjc.A.dylib                     0x00007fff6e944942 objc_exception_throw + 48
   2   CoreFoundation                      0x00007fff477757cc _CFThrowFormattedException + 194
   3   CoreFoundation                      0x00007fff4765754f -[__NSArrayM insertObject:atIndex:] + 1311
   4   AppKit                              0x00007fff44ceac33 -[NSTabView insertTabViewItem:atIndex:] + 77
   5   lazarus                             0x0000000100314867 -[TCocoaTabControl exttabInsertTabViewItem:atIndex:] + 55
   6   lazarus                             0x0000000100308781 COCOAWSCOMCTRLS$_$TCOCOAWSCUSTOMTABCONTROL_$__$$_ADDPAGE$TCUSTOMTABCONTROL$TCUSTOMPAGE$LONGINT + 137
   7   lazarus                             0x00000001002635d2 COMCTRLS$_$TCUSTOMTABCONTROL_$__$$_ADDREMOVEPAGEHANDLE$TCUSTOMPAGE + 202
   8   lazarus                             0x0000000100262528 COMCTRLS$_$TCUSTOMTABCONTROL_$__$$_CREATEWND + 176
   9   lazarus                             0x000000010022dfdf CONTROLS$_$TWINCONTROL_$__$$_CREATEHANDLE + 39
   10  lazarus                             0x000000010022f610 CONTROLS$_$TWINCONTROL_$__$$_HANDLENEEDED + 112
   11  lazarus                             0x000000010022624a CONTROLS$_$TWINCONTROL_$_DOALLAUTOSIZE_$$_CHECKHANDLEALLOCATED$TWINCONTROL$$BOOLEAN + 66
   12  lazarus                             0x00000001002262ac CONTROLS$_$TWINCONTROL_$_DOALLAUTOSIZE_$$_CHECKHANDLEALLOCATED$TWINCONTROL$$BOOLEAN + 164
   13  lazarus                             0x0000000100225e69 CONTROLS$_$TWINCONTROL_$__$$_DOALLAUTOSIZE + 145
   14  lazarus                             0x000000010023fe8a CONTROLS$_$TCONTROL_$__$$_ENABLEAUTOSIZING + 306
   15  lazarus                             0x000000010023cbeb CONTROLS$_$TCONTROL_$__$$_SETVISIBLE$BOOLEAN + 419
   16  lazarus                             0x000000010005a8c1 FORMS$_$TCUSTOMFORM_$__$$_SETVISIBLE$BOOLEAN + 113
   17  lazarus                             0x000000010005f660 FORMS$_$TCUSTOMFORM_$__$$_SHOWONTOP + 56
   18  lazarus                             0x000000010005bbb0 FORMS$_$TCUSTOMFORM_$__$$_ENSUREVISIBLE$BOOLEAN + 48
   19  lazarus                             0x000000010047e9b9 IDEWINDOWINTF$_$TSIMPLEWINDOWLAYOUTLIST_$__$$_APPLYANDSHOW$crc11A3EF49 + 1281
   20  lazarus                             0x0000000100480d78 IDEWINDOWINTF$_$TIDEWINDOWCREATORLIST_$__$$_SHOWFORM$TCUSTOMFORM$BOOLEAN$TLAYOUTMOVETOVISBLEMODE + 448
   21  lazarus                             0x0000000100481035 IDEWINDOWINTF$_$TIDEWINDOWCREATORLIST_$__$$_RESTORESIMPLELAYOUT + 269
   22  lazarus                             0x00000001006cab74 ENVIRONMENTOPTS$_$TDESKTOPOPT_$__$$_RESTOREDESKTOP + 28
   23  lazarus                             0x00000001000820d3 MAIN$_$TMAINIDE_$__$$_RESTOREIDEWINDOWS + 51
   24  lazarus                             0x000000010007e322 MAIN$_$TMAINIDE_$__$$_STARTIDE + 378
   25  lazarus                             0x0000000100001766 PASCALMAIN + 502
   26  lazarus                             0x00000001000214ec FPC_SysEntry + 12
   27  lazarus                             0x00000001000014c4 start + 52
   28  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

I will report in fpcupdeluxe thread as well

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #1 on: July 05, 2018, 11:36:43 pm »
I am having a problem with the trunk release today. After downloading darwin 64 bit with cocoa default I get this error log when trying to Launch Lazarus:

I see the same bug. From the backtrace, you can see that it occurs in TCocoaTabControl.exttabInsertTabViewItem_atIndex. AIndex is out of range (3, in range 0..0). Report it in bugtracker. That file was modified within the last couple days, so a new bug was probably introduced.

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #2 on: July 06, 2018, 03:49:08 pm »
I am having a problem with the trunk release today. After downloading darwin 64 bit with cocoa default I get this error log when trying to Launch Lazarus:

I see the same bug. From the backtrace, you can see that it occurs in TCocoaTabControl.exttabInsertTabViewItem_atIndex. AIndex is out of range (3, in range 0..0). Report it in bugtracker. That file was modified within the last couple days, so a new bug was probably introduced.

This problem appears to have been fixed in trunk.

MISV

  • Sr. Member
  • ****
  • Posts: 453
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #3 on: July 12, 2018, 12:37:03 am »
Problem is kinda back

Quote
Just downloaded trunk using fpcupdeluxe- 12th July 2018

Lazarus gives arithmetic error when starting and on many other occasions...

In past solution has sometimes been to rebuild using
"Tools - Build Lazarus with Profile: Normal IDE"

But if I do that I get access violations so... no workaround possib

https://bugs.freepascal.org/view.php?id=33969

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #4 on: July 12, 2018, 12:51:19 am »
Problem is kinda back

Quote
Just downloaded trunk using fpcupdeluxe- 12th July 2018

Lazarus gives arithmetic error when starting and on many other occasions...

In past solution has sometimes been to rebuild using
"Tools - Build Lazarus with Profile: Normal IDE"

But if I do that I get access violations so... no workaround possib

https://bugs.freepascal.org/view.php?id=33969

I'm not seeing the problem here. Just updated from SVN and rebuilt Laz IDE.

Maybe the problem is in fpcupdeluxe. Try just compiling the SVN source yourself.

make LCL_PLATFORM=cocoa CPU_TARGET=x86_64

VTwin

  • Sr. Member
  • ****
  • Posts: 455
  • Former Turbo Pascal 3 user
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #5 on: July 12, 2018, 01:52:48 am »
I'm also having difficulty getting Mac trunk running. I already have 1.8.4 installed. Following:

http://wiki.freepascal.org/Installing_Lazarus_on_MacOS_X

I'm trying:

Code: Pascal  [Select]
  1. cd Developer
  2. svn co http://svn.freepascal.org/svn/lazarus/trunk laz_trunk
  3. cd laz_trunk
  4. make clean all

and I get the following errors:

Code: Pascal  [Select]
  1. ...
  2. carbondef.pp(187,1) Fatal: There were 1 errors compiling module, stopping
  3. Fatal: Compilation aborted
  4. make[3]: *** [../lcl.ppu] Error 1
  5. make[2]: *** [carbon_all] Error 2
  6. make[1]: *** [interfaces] Error 2
  7. make: *** [lcl] Error 2

I'd appreciate any advice.

Cheers,
VTwin

EDIT: I should listen to Phil
Code: Pascal  [Select]
  1. make LCL_PLATFORM=cocoa CPU_TARGET=x86_64

I'm still puzzled by the configuration dialog that pops up: Update, Ignore, Abort. I think Update is correct?
« Last Edit: July 12, 2018, 02:11:47 am by VTwin »
“Talk is cheap. Show me the code.” Linus Torvalds

Lazarus 1.8.4, FPC 3.0.4
macOS 10.11.5 (32 bit Carbon, working on Cocoa) 
Windows 7 (64 bit)
Ubuntu 16.04.3 (64 bit)

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #6 on: July 12, 2018, 02:03:16 am »

VTwin

  • Sr. Member
  • ****
  • Posts: 455
  • Former Turbo Pascal 3 user
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #7 on: July 12, 2018, 02:26:36 am »
Thanks Phil,

Sorry for being so dense. I'm thinking then that Update is not the right option if I want to have two separate installations. Is Abort correct? 

Cheers,
VTwin
“Talk is cheap. Show me the code.” Linus Torvalds

Lazarus 1.8.4, FPC 3.0.4
macOS 10.11.5 (32 bit Carbon, working on Cocoa) 
Windows 7 (64 bit)
Ubuntu 16.04.3 (64 bit)

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #8 on: July 12, 2018, 02:31:06 am »
Sorry for being so dense. I'm thinking then that Update is not the right option if I want to have two separate installations. Is Abort correct? 

I don't think I've ever seen that prompt. Is that the make command that's giving it? Type make help to see options.



VTwin

  • Sr. Member
  • ****
  • Posts: 455
  • Former Turbo Pascal 3 user
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #9 on: July 12, 2018, 03:01:05 am »
I don't think I've ever seen that prompt. Is that the make command that's giving it? Type make help to see options.

That was the message after using the command line you suggested.

make LCL_PLATFORM=cocoa CPU_TARGET=x86_64

Here is the message:


« Last Edit: July 12, 2018, 03:04:27 am by VTwin »
“Talk is cheap. Show me the code.” Linus Torvalds

Lazarus 1.8.4, FPC 3.0.4
macOS 10.11.5 (32 bit Carbon, working on Cocoa) 
Windows 7 (64 bit)
Ubuntu 16.04.3 (64 bit)

VTwin

  • Sr. Member
  • ****
  • Posts: 455
  • Former Turbo Pascal 3 user
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #10 on: July 12, 2018, 03:08:17 am »
make help gives:

Quote
Main targets
                  Without any target, target 'all' will be invoked.
   all            build all needed, i.e. minimal IDE, lazbuild, startlazarus.
   clean          deletes files that 'bigide' creates. It does not clean up all possible
                  targets. Clean other target: make clean LCL_PLATFORM=qt
   distclean      Clean all targets and common leftovers.
   lazbuild       build lazbuild and lcl with nogui widgetset
   bigide         as all, except that the IDE is built with a lot of extra packages
   useride        calls lazbuild to build an IDE with your active profile, requires lazbuild
   install        installs Lazarus under /usr/local/share/lazarus
                  You can change the directory by appending INSTALL_PREFIX=/some/path

 Sub targets
   registration   build package FCL
   lazutils       build package LazUtils, requires registration
   codetools      build package CodeTools, requires lazutils
   lcl            build package LCLBase and LCL, requires lazutils
   tools          build lazres, svn2revisioninc, updatepofiles, lrstolfm,
                  requires LCL with nogui widgetset
   basecomponents build debuggerintf, lazdebuggergdbmi, lazcontrols, synedit, ideintf
                  for the LCL_PLATFORM, requires lcl
   bigidecomponents build many extra packages for the LCL_PLATFORM, requires basecomponents
   lhelp          build lhelp, requires bigidecomponents
   starter        build startlazarus, requires basecomponents
   examples       build basic examples, requires basecomponents
                  Note: There are more examples having their own directory

 Flags:
   PP=/path/to/fpc        use another compiler
   USESVN2REVISIONINC=0   do not update ide/revision.inc
   INSTALL_PREFIX=/usr    used by 'install' as path prefix
   FPC_DIR=/usr/share/fpcsrc/3.0.4   used by fpcmake when regenerating Makefiles
   OPT='-vwnbq -gh'       append these options when calling the compiler

 Usage examples:

 Updating svn and build a minimal IDE, startlazarus and lazbuild:
   make clean
   svn up
   make clean all

 Note: You can start lazarus with 'startlazarus'
 Note: Use the IDE or lazbuild to compile your projects/packages.

 Updating svn and build an IDE with your last set of packages:
   make clean
   svn up
   make clean lazbuild useride

 Clean up:
  There is no command to clean up a svn repository completely, but
  you can use the following command under Linux/OS X:
  svn status | grep '\?' | sed -e 's/\? *//' | xargs rm -r

  Another possibility is to create a clean copy via the svn export command.

 Install:
   Note: You can use Lazarus without installing. Just start the lazarus executable.
   1. Build Lazarus as normal user with one of the above commands.
   2. Install as root into /usr
          sudo make install
      This installs startlazarus, lazarus-ide, lazbuild under /usr/bin
      and copies the whole lazarus source directory to /usr/share/lazarus
“Talk is cheap. Show me the code.” Linus Torvalds

Lazarus 1.8.4, FPC 3.0.4
macOS 10.11.5 (32 bit Carbon, working on Cocoa) 
Windows 7 (64 bit)
Ubuntu 16.04.3 (64 bit)

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #11 on: July 12, 2018, 04:11:47 am »
That was the message after using the command line you suggested.

make LCL_PLATFORM=cocoa CPU_TARGET=x86_64

Here is the message:

Ah, you weren't clear. That's what you see after you run Lazarus, not after you run make. See this for how to run Lazarus without messing with your old config:

https://macpgmr.github.io/MacXPlatform/UsingCocoaFromTrunk.html

VTwin

  • Sr. Member
  • ****
  • Posts: 455
  • Former Turbo Pascal 3 user
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #12 on: July 12, 2018, 04:22:33 am »
Ah, you weren't clear. That's what you see after you run Lazarus, not after you run make. See this for how to run Lazarus without messing with your old config:

https://macpgmr.github.io/MacXPlatform/UsingCocoaFromTrunk.html

Thanks Phil,

That seems to have done the trick. I was able to get a basic application to run. I'll do further testing and will try to do some bug reports.

Cheers,
VTwin
“Talk is cheap. Show me the code.” Linus Torvalds

Lazarus 1.8.4, FPC 3.0.4
macOS 10.11.5 (32 bit Carbon, working on Cocoa) 
Windows 7 (64 bit)
Ubuntu 16.04.3 (64 bit)

VTwin

  • Sr. Member
  • ****
  • Posts: 455
  • Former Turbo Pascal 3 user
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #13 on: July 12, 2018, 04:31:32 am »
Thanks Phil,

Is it possible to make the command:

open lazarus.app --args "--pcp=~/.laz_trunk"

an alias? Again, my ignorance shows, but I assume others may also be struggling with trying to run Lazarus trunk on Mac. I greatly appreciate your help.

Cheers,
VTwin 
“Talk is cheap. Show me the code.” Linus Torvalds

Lazarus 1.8.4, FPC 3.0.4
macOS 10.11.5 (32 bit Carbon, working on Cocoa) 
Windows 7 (64 bit)
Ubuntu 16.04.3 (64 bit)

MISV

  • Sr. Member
  • ****
  • Posts: 453
Re: Lazarus IDE with Cocoa wont run using latest trunk
« Reply #14 on: July 12, 2018, 11:56:19 am »
Problem is kinda back

Quote
Just downloaded trunk using fpcupdeluxe- 12th July 2018

Lazarus gives arithmetic error when starting and on many other occasions...

In past solution has sometimes been to rebuild using
"Tools - Build Lazarus with Profile: Normal IDE"

But if I do that I get access violations so... no workaround possib

https://bugs.freepascal.org/view.php?id=33969

I'm not seeing the problem here. Just updated from SVN and rebuilt Laz IDE.

Maybe the problem is in fpcupdeluxe. Try just compiling the SVN source yourself.

make LCL_PLATFORM=cocoa CPU_TARGET=x86_64

Phil, I will try.

Are you also using the newest macOS version?

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus