Author Topic: IDE Errors  (Read 8219 times)

Offline drieran

  • Single posting newcomer
  • *
  • Posts: 5
IDE Errors
« on: May 22, 2013, 01:02:17 pm »
Hi,

Just I installed Codeblocks on my Mac and I tested with my current project (owned Makefile). I detected two errors:

a) If the path contains an space the Run command fails.
Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/drieran/Documents/XCode Projects/RegTraf/RegTraf

must be

Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. "/Users/drieran/Documents/XCode Projects/RegTraf/RegTraf"

b) When I start the Debugger this error occurs:

Can't launch console (osascript -e 'tell app "Terminal"' -e 'activate' -e 'do script ""' -e 'end tell' sleep 80022283)

Then the debug console is running correctly, I got a empty terminal window and I can't see the output of the application (console app).
The log:
Quote
Building to ensure sources are up-to-date
Selecting target:
all
Adding source dir: /Users/drieran/Documents/XCode Projects/RegTraf/
Adding source dir: /Users/drieran/Documents/XCode Projects/RegTraf/
Adding file: /Users/drieran/Documents/XCode Projects/RegTraf/RegTraf
Changing directory to: "/Users/drieran/Documents/XCode Projects/RegTraf/."
Set variable: DYLD_LIBRARY_PATH=.:
Starting debugger: /usr/bin/gdb -nx -fullname  -quiet  -args "/Users/drieran/Documents/XCode Projects/RegTraf/RegTraf"
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Can't launch console (osascript -e 'tell app "Terminal"' -e 'activate' -e 'do script ""' -e 'end tell' sleep 80022283)
Debugger name and version: GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug  5 03:00:42 UTC 2012)
At /Users/drieran/Documents/XCode Projects/RegTraf/src/App.cpp:28

Any help ?

Thanks.


Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: IDE Errors
« Reply #1 on: May 22, 2013, 01:49:05 pm »
hello,
to a): don't use spaces in your file path. Spaces confuse a lot other programs to, so it is better to avoid them (for me spaces have no advantage)
to b) i'm not familiar with mac, but have you osascript installed on your system? (if you run a terminal and type osascript does it work?). If not install it ;)

greetings

Offline drieran

  • Single posting newcomer
  • *
  • Posts: 5
Re: IDE Errors
« Reply #2 on: May 22, 2013, 02:10:41 pm »
to a): don't use spaces in your file path. Spaces confuse a lot other programs to, so it is better to avoid them (for me spaces have no advantage)

Yep, I'm agree I changed to bypass this problem.

to b) i'm not familiar with mac, but have you osascript installed on your system? (if you run a terminal and type osascript does it work?). If not install it ;)

As I mentioned on the first post the osascript is installed and running fine. When executes opens a terminal window with a shell.
I think that one of these problems may be happening:

a) missing script or command ? the code says ... 'do script ""'' ...
b) For some reason the terminal is opened but C::B captures an invalid return code, or something similar.

Thanks

Offline drieran

  • Single posting newcomer
  • *
  • Posts: 5
Re: IDE Errors
« Reply #3 on: May 22, 2013, 02:59:32 pm »
I installed C::B on Ubuntu 13.04 with the same project. When I Debugged all was fine. The log is

Quote
Building to ensure sources are up-to-date
Selecting target:
all
Adding source dir: /home/elecnor/Documents/RegTraf/
Adding source dir: /home/elecnor/Documents/RegTraf/
Adding file: /home/elecnor/Documents/RegTraf/RegTraf
Changing directory to: /home/elecnor/Documents/RegTraf/.
Set variable: LD_LIBRARY_PATH=.:
Starting debugger: /usr/bin/gdb -nx -fullname  -quiet  -args /home/elecnor/Documents/RegTraf/RegTraf
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
At /home/elecnor/Documents/RegTraf/src/App.cpp:26
Debugger finished with status 0

Offline drieran

  • Single posting newcomer
  • *
  • Posts: 5
Re: IDE Errors
« Reply #4 on: May 22, 2013, 04:56:15 pm »
I found the problem in the source code, the solution must be developed by C::B developers:

You are starting (osascript -e 'tell app "Terminal"' -e 'activate' -e 'do script ""' -e 'end tell' sleep 80024506), then you run a ps to find the sleep number. That's wrong!

1. osascript executes the Terminal and activates
2. osascript executes the sleep outside the Terminal and without tty.

Quote
  501 24425     1   0  4:10PM ??         0:00.01 sleep 80023153

3. Execute a ps to find the sleep and get the tty fails.

I tried to change to change in Settings -> Environment -> Terminal to launch ... to a custom script that opens Terminal and attach correctly the sleep, but still C::B refuses to find/attach to the tty.

Quote
ttys007  24873 -bash
ttys007  24874 sleep 80024506

And now, what else I can do ????

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: IDE Errors
« Reply #5 on: May 22, 2013, 05:04:51 pm »
And now, what else I can do ????
Compile C::B from source and modify the code until it starts working. This is a 10.8 issue as far as I know, older versions of OSX have been reported as working.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline drieran

  • Single posting newcomer
  • *
  • Posts: 5
Re: IDE Errors
« Reply #6 on: May 23, 2013, 09:15:24 am »
Compile C::B from source and modify the code until it starts working. This is a 10.8 issue as far as I know, older versions of OSX have been reported as working.

Ops! I'll try to find some time to do that. I can see http://wiki.codeblocks.org/index.php?title=Developer_documentation, but I can't see what to install and how to compile on OSX. Any help ?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: IDE Errors
« Reply #7 on: May 23, 2013, 03:45:13 pm »
Compile C::B from source and modify the code until it starts working. This is a 10.8 issue as far as I know, older versions of OSX have been reported as working.

Ops! I'll try to find some time to do that. I can see http://wiki.codeblocks.org/index.php?title=Developer_documentation, but I can't see what to install and how to compile on OSX. Any help ?

You are likely going to have to write directions for the new version of OSX.

The old directions.

http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Mac_OS_X

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org