The new version of Crossbox (8.4.96.2053) still does not work

Steps:

  1. We install new Crossbox.

  2. MAC off

  3. MAC on

  4. Run app (App2TableView) in Visual Studio

  5. The simulator opens.

  6. The initial application screen is displayed, but it stop and does not show the tableview.

  7. After a long time, the message “Timeout waiting for debugserver to respond” is displayed.


    This is the log.
    2016-10-17_14-21-11 Output.txt (541 Bytes)

  8. I close the simulator.

  9. Run again the application.

  10. Now are displayed more lines in the log, but the application stop in the initial window, and finally it shown the error message “Timeout waiting for debugserver to respond”


    This is the log.
    2016-10-17_14-34-32 Output.txt (1.3 KB)

  11. I close Visual Studio.

  12. I close the simulator.

  13. Run the app again

  14. I hope for quite some time and the error message is displayed: “Timeout waiting for debugserver to respond”


    This is the log
    2016-10-17_14-21-11 Output.txt (541 Bytes)

  15. Now I do a Hardware/Reboot in the simulator menu.

  16. Run the app again in Visual Studio.

  17. The application is now displayed correctly in the simulator and the Output window displays full information.



    This is the log
    2016-10-17_14-55-16 Output.txt (41.0 KB)

Note: When finally I runs the application correctly on the simulator, I can run it as many times as I want and it always works, even the debugger works. But if I restart the MAC again all problems appear.

hmm. this contradicts the log:

Running /Applications/Xcode7/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID D333BB3C-744C-4DDE-826D-D3611E9B5265
Device booted ok.
Running /usr/bin/xcrunsimctl install D333BB3C-744C-4DDE-826D-D3611E9B5265 "/Users/francisco/Library/Application Support/RemObjects Software/Elements/CrossBox/6ea53f01-1a50-4280-8ebf-bd909e79c1a7-app2tableview/Debug/iOS Simulator/App2TableView.app"
The program './Debug/iOS Simulator/App2TableView.app/App2TableView ' has exited with code -1 (0xffffffff).

according to which then app never even gets launched. From what the log tells me, the install of your app hangs or takes a very long time, to the extend that VS eventually gives up and times out.

Now in your SECOND run, the app actually gets launched, we get a PID and attach debgserver, but apparently VS then never connects in a timely fashion, but times out instead.

Running /Applications/Xcode7/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID D333BB3C-744C-4DDE-826D-D3611E9B5265
Device booted ok.
Running /usr/bin/xcrunsimctl install D333BB3C-744C-4DDE-826D-D3611E9B5265 "/Users/francisco/Library/Application Support/RemObjects Software/Elements/CrossBox/6ea53f01-1a50-4280-8ebf-bd909e79c1a7-app2tableview/Debug/iOS Simulator/App2TableView.app"
App deployed ok.
Running /usr/bin/xcrun simctl launch -w D333BB3C-744C-4DDE-826D-D3611E9B5265 org.me.App2TableView
simctl launch: org.me.App2TableView: 786
Running /Applications/Xcode7/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver 0.0.0.0:49257 --attach=786
The program './Debug/iOS Simulator/App2TableView.app/App2TableView ' has exited with code -1 (0xffffffff).

to be frank, it sounds to me that tour Simulator set is simply fucked. especially if

  1. Now I do a Hardware/Reboot in the simulator menu."

fixes everything, apparently?

Do me a last favor and try this.

  • reboot your mac, do NOT start CrossBox and do NOT run an app from VS.
  • go to terminal and manually run the three commands (waiting for one to finish before the next):
/Applications/Xcode7/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID D333BB3C-744C-4DDE-826D-D3611E9B5265
/usr/bin/xcrunsimctl install D333BB3C-744C-4DDE-826D-D3611E9B5265 "/Users/francisco/Library/Application Support/RemObjects Software/Elements/CrossBox/6ea53f01-1a50-4280-8ebf-bd909e79c1a7-app2tableview/Debug/iOS Simulator/App2TableView.app"
/usr/bin/xcrun simctl launch -w D333BB3C-744C-4DDE-826D-D3611E9B5265 org.me.App2TableView

what happens? By money is on: it’ll hang/fail too.

I run the first line in the terminal, and produces the following:

Last login: Mon Oct 17 15:55:56 on console
Mac-mini-de-Francisco:~ francisco$ /Applications/Xcode7/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID D333BB3C-744C-4DDE-826D-D3611E9B5265
2016-10-17 15:59:12.225 Simulator[555:16887] CoreSimulator is attempting to unload a stale CoreSimulatorService job. Detected Xcode.app relocation or CoreSimulatorService version change. Framework path (/Applications/XCode7/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework) and version (209.19) does not match existing job path (/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService) and version (303.8).
2016-10-17 15:59:12.483 Simulator[555:16887] Failed to locate a valid instance of CoreSimulatorService in the bootstrap. Adding it now.

The simulator has been opened and displays the icons for applications, but the terminal does not display the prompt the administrator to enter a new command.

What do I do now?

Simulator is getting confused about what your selected version of Xcode is, and the one you manually launching. make sure they match. You can’t have rthe system point to Xcode 8.0 and then run the Xcode 7 simulator, or vice versa, or all hell will break loose.

That said, now of your steps in your last post mentioned you were switching between Xcode versions, so that SHOULD not have bene the problem before. But please get those straightened out, reboot the Mac again (so we have a clean and comparable slate), do NOT touch the Xcode setting again, and then run the three commands.

—marc

I do not understand why the old version of Crossbox (8.4.96.2045) works seamlessly with the same configuration of Mac that I have, and however, the new does not work.

Well. 2045 used the old API, which only works with Xcode 7, and does not support Xcode 8. 2047 and later use the new API. The way they interact with the Simulator is completely different.

As for why it doesn’t work — beats me. Maybe if you’d try the steps i suggested, we could figure it out?

As I indicated before, the first step never ends. :flushed:
I’m uninstalling XCode 7 to see if that works.

Ok, i missed that part then there you have it — your simulator is fucked.

There’s nothing i can do in CrossBox or Visual Studio, if a core command line tool provided by Xcode hangs when you run it. Nothing. It’s not a bug in CrossBox or anything CrossBox does wrong. CrossBox just calls the command — of the command hangs, how the heck am i supposed to do anything about that?

You can try contacting Apple support, and inquire about the command line specifically (doing tell em about CrossBox or Elements, coz that will just distract them). Or tty deleting/reinstalling/recreating Xcode and the Simulators.

Other than that — no idea, sorry.

when you say

do you mean it DOES show the prompt? because “it does not seem to be a weird” thing to report — why the heck WOULD it prompt? If it DOES ask for the admin password, have you tried entering it, just for shut and giggles?

  1. I open the terminal.
  2. I paste the “/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID D333BB3C-744C-4DDE-826D-D3611E9B5265” command
  3. Enter
  4. The $ sign is not displayed to enter a new command, even if I wait long.

I also uninstalled XCode7, and I’ve done the tests from Visual Studio, but still does not work, it has the same problems as before.
I could not finish the indications you had done me, as the first command that you have indicated me never ends, what is the next step?

Note: Do not always Hardware/Reboot in simulator solves the problem.

Thinking it could be a problem in the configuration of our Mac, we have installed the latest version of Delphi Berlin 10.1 Update 1, and it works perfectly with the simulator.
After restarting the Mac, launch the application from Delphi, the simulator is opened without any problem, the application is shown in it and can be debugged without problems. So obviously the problem is not on our Mac.

ok. as long as this hangs, something is broken, and nothing 8 can do can fix that. This is the API we use, and if that is not working on your system, it’s not working. And why it’s t working is outside of our control.

good for them. i don’t know what APIs they use to control the Sim. This, what we do, is the official way to do it.

—marc

Actually, no wait. That’s not correct. Simulator.app is not SUPPOSED to return. you need to run

/Applications/Xcode7/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID D333BB3C-744C-4DDE-826D-D3611E9B5265

and keep it running. then from a second terminal. run

/usr/bin/xcrunsimctl list devices | grep D333BB3C-744C-4DDE-826D-D3611E9B5265

until the status changed from “Shutdown” to Booted. Then, in the second terminal, while the Simulator process is still active, run

/usr/bin/xcrunsimctl install D333BB3C-744C-4DDE-826D-D3611E9B5265 "/Users/francisco/Library/Application Support/RemObjects Software/Elements/CrossBox/6ea53f01-1a50-4280-8ebf-bd909e79c1a7-app2tableview/Debug/iOS Simulator/App2TableView.app"

and then

/usr/bin/xcrun simctl launch -w D333BB3C-744C-4DDE-826D-D3611E9B5265 org.me.App2TableView

Do this after a fresh boot (i.e. in the same scenario where CB/VS fail), and let me know what happens.

thanx,
marc

The commands in the second terminal produced the following results:

Mac-mini-de-Francisco:~ francisco$ /usr/bin/xcrun simctl list devices | grep D333BB3C-744C-4DDE-826D-D3611E9B5265
iPad 2 (D333BB3C-744C-4DDE-826D-D3611E9B5265) (Booted)
Mac-mini-de-Francisco:~ francisco$ /usr/bin/xcrun simctl install D333BB3C-744C-4DDE-826D-D3611E9B5265 “/Users/francisco/Library/Application Support/RemObjects Software/Elements/CrossBox/6ea53f01-1a50-4280-8ebf-bd909e79c1a7-app2tableview/Debug/iOS Simulator/App2TableView.app”
Mac-mini-de-Francisco:~ francisco$ /usr/bin/xcrun simctl launch -w D333BB3C-744C-4DDE-826D-D3611E9B5265 org.me.App2TableView
org.me.App2TableView: 850
Mac-mini-de-Francisco:~ francisco$

With the last command the application is shown in the simulator, but only the initial screen,

not the tableview and instantly automatically closes.

If I run the application from the simulator icon it is then displayed correctly and does not close automatically.

Seeing that did not work the command to launch the application, I’ve done more research, and if I use the command:

/usr/bin/xcrun simctl launch booted org.me.App2TableView

the application is displayed correctly on all occasions.

yes. -w means it waits for a dneugger to attach.

now the question is, why does t it work when CB runs the exact same commands…

With ‘-w’ does not work, I have to put ‘booted’ to work.

That’s not what i meant. “booted” is just shorthand for the ID. but its the -w that caused it to not “show” the app fully, because the app pauses on the splash and waits for a debugger. fro the -w and it’ll run.

in any case, thats not the issue. These are the commands CB runs, and i don’t see why they’d fail for you for CB (unless you hard reset the sim first), but would not fail from the compline manually,

my money it still on a forked Simulator install/config, especially if no-one else is seeing this behavior and if resetting it fixes it every time… I don’t believe there’s more i can do on this at this stage, sorry.

What do you advise me to do?
Uninstall XCode 8 and I re-install?