Recent

Author Topic: Strange Lazarus 1.4.0 problem on OS X causing debugger error  (Read 3994 times)

MISV

  • Hero Member
  • *****
  • Posts: 792
Strange Lazarus 1.4.0 problem on OS X causing debugger error
« on: September 07, 2015, 11:30:56 am »
Not sure if this is IDE configuration or debugger issue:


I am getting an odd error every time I try run my application from within Lazarus:

Quote
"Debugger error.... Stop and hope for he best, we're pulling the plug'

message (not exact words but close)

In details I get this:

Quote
Failed to load application execuable

"/Volumns.../path/mylazarus.app/Contents/MacOS/mylazarus": not in executable format: File format not recognized

Here comes the kicker though... If I move the core executable file  "mylazarus" into my own .app file it runs fine without problems.

Any ideas what I can try check? Configuration, tests or similar?


MISV

  • Hero Member
  • *****
  • Posts: 792
Re: Strange Lazarus 1.4.0 problem on OS X causing debugger error
« Reply #1 on: September 08, 2015, 11:48:02 am »
So far unsuccessful at resolving the problem - trying different things right now like recreaing the project etc. Here's debugger log


Code: [Select]
=thread-group-added,id="i1"
(gdb)
<-gdb-set confirm off>
^done
(gdb)
<-gdb-set new-console off>
^error,msg="No symbol table is loaded.  Use the \"file\" command."
(gdb)
<set width 50000>
&"set width 50000\n"
=cmd-param-changed,param="width",value="50000"
^done
(gdb)
<-gdb-version>
~"GNU gdb (GDB) 7.8.1\n"
~"Copyright (C) 2014 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-apple-darwin14.0.0\".\nType \"show configuration\" for configuration details."
~"\nFor bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>.\n"
~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\".\n"
^done
(gdb)
<-gdb-set env TMPDIR=/var/folders/1f/bnsnksrs1nx2yztm33d36l1h0000gn/T/>
^done
(gdb)
<-gdb-set env __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0>
^done
(gdb)
<-gdb-set env SHELL=/bin/bash>
^done
(gdb)
<-gdb-set env HOME=/Users/myname>
^done
(gdb)
<-gdb-set env Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.RFNY1ZGdsq/Render>
^done
(gdb)
<-gdb-set env SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.34Vd1AMPMu/Listeners>
^done
(gdb)
<-gdb-set env PATH=/usr/bin:/bin:/usr/sbin:/sbin>
^done
(gdb)
<-gdb-set env LOGNAME=myname>
^done
(gdb)
<-gdb-set env XPC_SERVICE_NAME=lazarus.freepascal.ide.58820>
^done
(gdb)
<-gdb-set env USER=myname>
^done
(gdb)
<-gdb-set env XPC_FLAGS=0x0>
^done
(gdb)
<-file-exec-and-symbols "/Volumes/DiskW/projects-cool/MyProject/compiled/MyProjectLazarus.app">
^error,msg="/Volumes/DiskW/projects-cool/MyProject/compiled/MyProjectLazarus.app: Inappropriate ioctl for device."
(gdb)
<-file-exec-and-symbols "/Volumes/DiskW/projects-cool/MyProject/compiled/MyProjectLazarus.app/Contents/MacOS/MyProjectLazarus">
^error,msg="\"/Volumes/DiskW/projects-cool/MyProject/compiled/MyProjectLazarus.app/Contents/MacOS/MyProjectLazarus\": not in executable format: File format not recognized"
(gdb)
<kill>

MISV

  • Hero Member
  • *****
  • Posts: 792
Re: Strange Lazarus 1.4.0 problem on OS X causing debugger error
« Reply #2 on: September 08, 2015, 01:20:15 pm »
Right now, it acually appear to have been improved - but this is very preliminary (!)

I went into "Run | Run Paramaters...." and in "Host application" passed it:
/Volumes/DiskW/projects-cool/MyProject/compiled/MyProjectLazarus (i.e. the core executable)

Runtime, I have code that checks for data files using multiple test paths (if running in or ouside .app) after which it adjusts

I am slightly puzzled as to why my solution works though... Since I would expect Lazarus to "autofill" this path in. "Host application" was empty before I filled in the path.

However, on the downside, my app can not gain focus... (i.e. can' select any control with the mouse or anyhing) so as such, I am only a little closer to a solution


 

TinyPortal © 2005-2018