Failing to run w/o debugging

Hi,
I have a cocoa app that I cant get running if I select “run w/o debugging”.

I see this in the console

2014-05-04 2:56:07.051 PM Fire[175]: xbuild /Users/JohnMoshakis/Documents/develop/Nougat/SailingLogIOS/SailingLogIOS.sln /nologo /target:Build /verbosity:normal /property:Configuration=Debug /toolsversion:4.0
2014-05-04 2:56:09.619 PM com.apple.launchd.peruser.501[160]: (org.me.SailingLog.100880[2255]) Job failed to exec(3) for weird reason: 13
2014-05-04 2:56:09.620 PM Fire[175]: 8837325: Attempting to SIGCONT to pid #2255 failed, with errno=#3, or the process failed to actually start
2014-05-04 2:56:09.621 PM Dock[191]: no information back from LS about running process LSASN:{hi=0x0;lo=0x51051}
2014-05-04 2:56:09.630 PM Fire[175]: 8837325: Attempting to SIGCONT to pid #2255 failed, with errno=#3, or the process failed to actually start
2014-05-04 2:56:09.641 PM Fire[175]: 8837325: Attempting to SIGCONT to pid #2255 failed, with errno=#3, or the process failed to actually start
2014-05-04 2:56:09.652 PM Fire[175]: 8837325: Attempting to SIGCONT to pid #2255 failed, with errno=#3, or the process failed to actually start

The message Attempting to SIGCONT… appears way more that I have shown.

Cheers,
John

Weird. Run wo debug just calls NSWorkSpace.openURL(). nothing else I do that could make this fail or not.

Did you reboot yet?

I just rebooted

I get this from a cocoa app

/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver -f16 --log-file /dev/stdout 0.0.0.0:19904 “/Users/JohnMoshakis/Documents/develop/Nougat/BindToIntegerCocoaApplication/bin/Debug/OS X/BindToIntegerCocoaApplication.app/Contents/MacOS/BindToIntegerCocoaApplication”

debugserver-310.2 for x86_64.

Listening to port 19904 for a connection from 0.0.0.0…

Got a connection, launched process /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver.

Got a ‘k’ packet, killing the inferior process.
Sending ptrace PT_KILL to terminate inferior process.
1 +0.000000 sec [0159/0303]: error: ::ptrace (request = PT_THUPDATE, pid = 0x015a, tid = 0x1503, signal = 0) err = Resource busy (0x00000010)
2 +0.000192 sec [0159/0303]: error: ::task_info ( target_task = 0x1103, flavor = TASK_BASIC_INFO, task_info_out => 0x7fff5f1d3cd0, task_info_outCnt => 10 ) err = (os/kern) invalid argument (0x00000004)
Waited 50 ms for process to be reaped (state = Exited)
3 +0.054755 sec [0159/1a03]: error: ::read ( 7, 0x100d47a40, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Exiting.

Actually with this app I cant even run it from Finder.

“good”. that means it’s not the debugger that’s broken. can you send me the project and the finished app/exe?

the .app that fire had produced was missing execute permission on the file inside the package. Once I fixed that I can run the application.

Are you able to debug cocoa applications ? I haven’t been able to do that

Yes. works fine here. That said, please please try to not conflate issues. If you cannot run your app from Finder either then clearly it’s not the debugger at fault, and something else is going on. Do you get any log to Console when you run your app from Finder? Can you run it from the commandline LLDB?

$ lldb path/to/YourApp.app/Contents/MacOS/YourApp
(lldb) run

Sorry. I replied with that because you said “that means its not the debugger that’s broken”. That made me wonder if you could debug cocoa apps.

yes, i can.

what i meant is that if you can’ run the app standalone either, then it can’t be the debugger’s fault that you can’t run it.

With the latest I can debug cocoa apps.

1 Like

If I go into the .app folder for a cocoa application and look at the permissions on the executable inside Contents/MacOS visual studio doesn’t set it as executable.

If I open the same project inside Fire and do a clean and rebuild the executable bits are set.

Unless I do the clean and rebuild I can’t launch the debugger inside Fire.

Hmm. That’s with VS building from a VM to Mac local folder? VS cannot set +x itself, in that case (no such concept on Windows), but i’ve never had issues with that. what VM type are you using? You can run via CrossBox though, correct?

makes sense. the xbuild toolchain for the Mac has an extra step to set that flag.

i take it the issue are that VS and Fire are building into the same Bin/Debug folder, and Fire will run from there, while VS will run it from a separate copy that it uploaded via CrossBox. Technically, that’s “as designed” behavior. but i guess i could add something to Fire that it forces the +x flag on the exe, before it tries to run it.

I assume this affects only Mac apps, not iOS Simulator (and certainly not iOS Device), correct?

Done.

FYI I’ve seen stuff like this. I like to use BetterZip for handling zip files but I found that some stuff was getting unzipped with the execute flag off. These days I unzip your compiler stuff using the built in archive utility and I haven’t had any problems. (E.g. Once the install.sh in your compiler zip was not executable until I ran chmod).

That’s the way to go.

FWIW, next Fire build will have the “for building” compiler embedded, and will no longer require either Mono or the command line compiler to be installed separately.

I’m using Parallels. Yes it runs fine using crossbox. I have only been doing cocoa development and haven’t tried iOS.

Whats the “for building” compiler ? Has mono been totally removed ?

That’ll be a lot more convenient to get people up and running initially. But that’ll preclude our updating the compiler ourselves between actual Fire releases, right? (Or will it still be possible to drop new compiler bits inside the Fire package?)

There’s two versions of mono, and of the compiler, involved currently.

Fire.app has a custom-build 64-bit version of Mono embedded, that it uses to host the managed code that drives IDE smarts — CC & co. But to build your project, it just calls /usr/bin/xbuild — which uses the “installed” mono version, and the installed compiler (that you install from the zip via install.sh.

In the next build, no more, Fire wil use the embedded compiler and Mono to build. So you can now copy Fire.app to a clean Mac and just hit Build and everything works. (there’s an option to still use the external compiler & Mono if you prefer).

that’s assuming you’ll have a way to get a newer compiler, anyways. I;m pretty close to having Fire’s build integrated with our core build system, which means every build we do will spit out a matching Fire.app as well.

in theory, sure.