I built me a bug into my App that I can not find.
This App did run in the simulator.
When I try to run the same project on the device, the Build interrupts with a “malloc_error_break” exception.
The App will not deployed to my device…
Actually, I nowhere “Dealloc” objects manually.
This project has no references to external 3rd party libraries.
In Xcode, I would now put a symbolic Breakpoint under “Run> Breakpoints> Add symbolic Breakpoint” on “malloc_error_break”.
How can I locate the fault in Oxygene?
Fehler 2 (Link) ld(1883,0x7fff7c533180) malloc: *** error for object 0x7fc370d00ce0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Thanx for bringing this up, we do need to expose that feature in the debugger.
That said: are you saying the BUILD fails with the exception, not the run? If so, that seems like a bug in the linker, and nothing you can debug. Can you send us the exact project you are building, along with the info what Xcode version and SDK you are using?
Not sure, but I think the linker sends this error, >> (Link) Id (…)…
The App wil not deployed to the device. The error comes before the “Downloading Symbols” window…
I can reproduce the “malloc_error_break” with each clean App started from a Oxygene template.
If I set the “Deployment Target Version” to any Value greater then 5.1, then I can run this App on the simulator but not on my devices.
My Xcode Versions:
Version 4.6.3 (4H1503)
Version 5.0 (5A11314m)
The Commandline Tools of v 4.6.3 are activated.
Do you still need my “Test-App”?
I have to fix some things (regarding EKEventstore permissions) before I can send it to you.
Version 5.0 (5A11314m)
The Commandline Tools of v 4.6.3 are activated in the Xcode Preferences.
Yes, ist OK with Deployment Target <= 5.1.
An empty Target did not work. Same “malloc” Error as before…
PS:
Perhaps is there a causality to another “effect” that I have since 2-3 Months with my both Oxygene Installations.
I can debug my Apps only, when I start them with the simulator.
When I try to debug an App (with Deployment Target 5.0) on the Device, I get different messages (after “Sandboxing Application” and Deployment) and the debugger did not start:
“Object reference not assigned to an Object instance”
OR “VS2012 is crashed. Restart? Debug?..”
OR Debugger is starting, VS2012 is frozen and must be “killed”
OR Debugger is starting, VS2012 looks like if debugger is running but nothing happens. If I click on “Stop Button” VS2012 gives me this dialog:
"Debugging is being canceled…"
Debugging will stopped, however, is not finished.
You can force the immediate exit of debugging, but it might terminate processes that should be detached.
This window is automatically closed after debugging is complete.
[Now stop]
This dialog never closes automatically. I have to click “stop now”.
The App is deployed to the device in all cases, and I’m able to “manually debug” it with Instruments and NSLog …
I cannot reproduce ld crashing here, even with Deployment Target set top, say 6.1, i’m afraid :(. Builds fine for device. Can you post the full log details from Console.app on the Mac, and messages with “crossbox” or “crossboxhelper”, as well as a full/detailed msbuild build log from the Visual Studio side.
For the NRE/Crash, can you post any ogs from Event Viewer you might see? This is an unrelated issue in most likelihood.
Which build of Oxygene are you using? Have you been seeing this crash from the very start of using Nougat? What about the deployment target issue?
Before yesterday I had no need to change the deployment Target. Default in the Templates is 5.0.
I am using always the latest Beta of Oxygene (currently build 1325).
As I write this, I’m not sure, if debugging has on the device has ever worked, since I have installed the Developer Certificates. I think so.
Before June 2013 I had no Developer certificate and could only run some “Learning Apps” in the simulator. On the Simulator I had never problems with debugging.
Probably I did something wrong only in the Xcode installation.
My first Mac … Everything is new and strange …
I have just learned that the Console.app is not the CMD.EXE from Apple: o)
It seems I had a mix-up in my Xcode command line tools (4.6.3 and two 5.0 Versions (from mounted “Xcode 5.0-DP dmg” and /Applications).
Now I have dismounted the dmg, reinstalled the command line tools in Xcode 5 (Version in /Applications) and selected this Xcode 5.0 command line tools in the Xcode 5-DP preferences.
I can debug on the device without problems and select all Deployment targets from 5.0 to 7.0 in Oxygene.
Since I use the “correct” Installation of the command line tools I got no error message while debugging and VS2012 did not crash …
Glad to hear, and the ld crash i’m happy to just forget about and never worry about again, as that stuff is out of our control ;). The IDE crash, even if fixed for you, does seem worrying though. will have a look at the logs to see of there’s anything actionable.