Delphi XE8, using iOS framework gives AV

The app uses the iOS framework CoreMIDI and works fine targeting iOSDevice (8.2), but on iOSSimulator (iOS8.2) I get an AV on the first function call (MIDIGetNumberOfSources) from this framework.

There are no errors shown by Delphi, nor by the paServer in Verbose mode, and a *new empty app that only calls MIDIGetNumberOfSources, does not fail either*!

How can calling a framework suddenly not work, in this main app?

I think the bindings for the framework are correct. I have added the framework to the iPhoneSimulator 8.2 SDK in the Delphi SDK manager, updated local File Cache and verified that the framework exists in C:\Users\Hans\Documents\Embarcadero\Studio\SDKs\iPhoneSimulator8.2.sdk\System\Library\Frameworks.
If any of these things had been wrong I suppose the new empty app would have failed too.

Here is the system log from the simulator:

{code}
May 27 12:00:49 Hanss-Mac-mini.local CoreSimulatorBridge[23458]: LaunchServices: installing app for existing placeholder <LSApplicationProxy: 0x78e114a0> MyMobileApp
May 27 12:00:49 Hanss-Mac-mini.local CoreSimulatorBridge[23458]: LaunchServices: Not creating progress for <LSApplicationProxy: 0x78e114a0> MyMobileApp since it is not a placeholder.
May 27 12:00:49 Hanss-Mac-mini.local installd[23446]: 0xb0093000 -[MIClientConnection _doBackgroundInstallationForPath:withOptions:completion:]: Install of "/Users/Hans/PAServer/scratch-dir/Hans-MyMac/MyMobileApp.app" type Developer requested by CoreSimulatorBridge (pid 23458)
May 27 12:00:49 Hanss-Mac-mini.local installd[23446]: 0xb0093000 MDMCreateDeltaDirectory: calling MDMDirectoryDiff with:
    state->old_bundle: /Users/Hans/Library/Developer/CoreSimulator/Devices/ADAE10FD-2A7E-4168-947B-FDFF09D540A3/data/Containers/Bundle/Application/E2DFA4FB-E2C9-42C1-A755-222E6AFF6D87/MyMobileApp.app
    state->new_bundle: /Users/Hans/PAServer/scratch-dir/Hans-MyMac/MyMobileApp.app
    state->dst_bundle: /Users/Hans/Library/Developer/CoreSimulator/Devices/ADAE10FD-2A7E-4168-947B-FDFF09D540A3/data/Library/Caches/com.apple.mobile.installd.staging/temp.oUQjRY/extracted/Payload//MyMobileApp.app, binaryDiff flag: FALSE
        dst_ipa: /Users/Hans/Library/Developer/CoreSimulator/Devices/ADAE10FD-2A7E-4168-947B-FDFF09D540A3/data/Library/Caches/com.apple.mobile.installd.staging/temp.oUQjRY/extracted
May 27 12:00:49 Hanss-Mac-mini.local installd[23446]: 0xb0093000 createDictFromFile: open failed for /Users/Hans/Library/Developer/CoreSimulator/Devices/ADAE10FD-2A7E-4168-947B-FDFF09D540A3/data/Containers/Bundle/Application/E2DFA4FB-E2C9-42C1-A755-222E6AFF6D87/ManifestCache.plist : No such file or directory
May 27 12:00:49 Hanss-Mac-mini.local installd[23446]: 0xb0115000 __MDMDirectoryDiff_block_invoke29: calling writeDictToFile with: /Users/Hans/Library/Developer/CoreSimulator/Devices/ADAE10FD-2A7E-4168-947B-FDFF09D540A3/data/Library/Caches/com.apple.mobile.installd.staging/temp.oUQjRY/extracted/ManifestCache.plist
May 27 12:00:49 Hanss-Mac-mini.local installd[23446]: 0xb0115000 writeDictToFile: ==== Successfully wrote Manifest cache to /Users/Hans/Library/Developer/CoreSimulator/Devices/ADAE10FD-2A7E-4168-947B-FDFF09D540A3/data/Library/Caches/com.apple.mobile.installd.staging/temp.oUQjRY/extracted/ManifestCache.plist
May 27 12:00:49 Hanss-Mac-mini.local installd[23446]: 0xb0093000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundlePatch ID=MyMobileApp; Version=1.0.0, ShortVersion=1.0>
May 27 12:00:49 Hanss-Mac-mini.local installd[23446]: 0xb0093000 -[MIInstallableBundlePatch applyPatchWithError:]: Attempting patch update of MyMobileApp from 1.0.0 (1.0) to 1.0.0 (1.0)
May 27 12:00:49 Hanss-Mac-mini.local SpringBoard[23450]: Killing MyMobileApp for termination assertion
May 27 12:00:49 Hanss-Mac-mini.local pkd[23466]: releasing plug-in hold D3EDD1F4-6903-4308-BDD2-7F24E721085E for dead client pid 23450
May 27 12:00:49 Hanss-Mac-mini.local installd[23446]: 0xb0093000 -[MIInstallableBundle _refreshUUIDForContainer:withError:]: Data container for MyMobileApp is now at /Users/Hans/Library/Developer/CoreSimulator/Devices/ADAE10FD-2A7E-4168-947B-FDFF09D540A3/data/Containers/Data/Application/F784D308-C571-4BF4-83DD-4C4762BCB6C2
May 27 12:00:49 Hanss-Mac-mini.local installd[23446]: 0xb0093000 -[MIContainer makeContainerLiveReplacingContainer:withError:]: Made container live for MyMobileApp at /Users/Hans/Library/Developer/CoreSimulator/Devices/ADAE10FD-2A7E-4168-947B-FDFF09D540A3/data/Containers/Bundle/Application/D29B70CB-4B8B-4EF6-9625-09E37F6579F4
May 27 12:00:49 Hanss-Mac-mini.local installd[23446]: 0xb0093000 -[MIInstaller performInstallationWithError:]: Staging: 0.02s; Waiting: 0.00s; Installation: 0.05s; Overall: 0.06s
May 27 12:00:49 Hanss-Mac-mini.local CoreSimulatorBridge[23458]: LaunchServices: NotifiedObservers <LSApplicationProxy: 0x78e14c90> MyMobileApp was installed
May 27 12:00:49 Hanss-Mac-mini.local lsd[23464]: LaunchServices: Updating identifier store
May 27 12:00:49 Hanss-Mac-mini.local SpringBoard[23450]: libMobileGestalt MobileGestalt.c:841: still-camera is static and will never generate a notification
May 27 12:00:49 Hanss-Mac-mini.local SpringBoard[23450]: libMobileGestalt MobileGestalt.c:841: stand-alone-contacts is static and will never generate a notification
May 27 12:00:49 Hanss-Mac-mini.local /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/libexec/lsd[23464]: LaunchServices: Failed to set the data protection class for /Users/Hans/Library/Developer/CoreSimulator/Devices/ADAE10FD-2A7E-4168-947B-FDFF09D540A3/data/tmp/com.apple.IconsCache/MyMobileApp_defaultRole-FM_ApplicationIcon_57x57_FM_ApplicationIcon_87x87_FM_ApplicationIcon_114x114_FM_ApplicationIcon_72x72_FM_ApplicationIcon_144x144_FM_A
pplicationIcon_76x76_FM_ApplicationIcon_152x152_FM_ApplicationIcon_60x60_FM_ApplicationIcon_120x120_FM_ApplicationIcon_180x180-32
May 27 12:00:49 Hanss-Mac-mini.local SpringBoard[23450]: Installed apps did change.
    Added: {(
    )}
    Removed: {(
    )}
    Modified: {(
        MyMobileApp
    )}
May 27 12:00:50 Hanss-Mac-mini assertiond[23454]: assertion failed: 13F1077 12D508: assertiond + 14743 [849F745E-3AAA-3638-91FF-892312A54F42]: 0x1
{code}
0
Hans
5/28/2015 2:16:56 PM
embarcadero.delphi.ios 412 articles. 0 followers. Follow

4 Replies
1714 Views

Similar Articles

[PageSpeed] 28
Get it on Google Play
Get it on Apple App Store

Any suggestions what I can do?

I think the problem is not related to the specific framework, it could happen with any framework.
It works on the iOS device, but not in the iOS Simulator. I am on XE8, and unfortunately I do not know if it works with XE7 because it does not support the iOS8 simulator.

Could this error happen if the framework is not found?
- or what else could cause an AV when calling a framework function?
0
Hans
6/3/2015 1:02:58 PM
Take a look here:

http://mobilepascal.blogspot.com.es/2013/05/delphi-xe4-with-ios-13-procedure-for.html

I think you need to call to "dlopen" to load the framework under the iOS simulator
0
Borja
6/4/2015 3:48:46 PM
> {quote:title=Borja Serrano wrote:}{quote}
> Take a look here:
> http://mobilepascal.blogspot.com.es/2013/05/delphi-xe4-with-ios-13-procedure-for.html
> I think you need to call to "dlopen" to load the framework under the iOS simulator

Thank you. I checked up on this and found that it is already done the right way: The header file of the library loads it, and the load returns a handle, so at that point everything looks fine. But later when I call a function in the framework I get an Access Violation.

Tried to call the framework at a later point, but then it is just another framework that fails. This time it was calling *CGImageSourceCreateWithData* in the ImageIO framework.

Any ideas what can make those frameworks unavailable?
- or ideas how I can debug this?
0
Hans
6/8/2015 2:08:49 PM
Still not solved :-( - but now I have more information to add:

When I call a framework that I added manually to the SDK manager, I get this error: "Project dyld_sim raised exception class EAccessViolation with message 'Access violation at address 015A8019, accessing address 00000010'
".

It fails in my main large app, but it works with a new empty app, when calling the same function in the same framework.

My debugging has revealed something interesting:
I made a unit that only calls 'MIDIGetNumberOfSources' in the initialization section (this is the function in CoreMIDI that used to fail). 
Now if I place this unit in my main project uses section *before* 'FMX.Forms,' then it does not fail, and when I later make the real call to 'MIDIGetNumberOfSources' (which used to fail) it also works!
It tried to do the same trick with the 'AudioToolbox' framework, but unfortunately this always failed no matter when it was called.

Any ideas?
0
Hans
7/1/2015 11:46:44 AM
Reply:

Similar Artilces:

I can to install one not delphi program foir iOS into one iOS for delphi?
For example i have one programm builded as xcode for iOS, and i build one program as delphi for iOS. I want to have only one instalation, i can to add this xcode program into my delphi installer of my ios program? I can to do the same as android? how i can to to this? > {quote:title=oscar mejia wrote:}{quote} > For example i have one programm builded as xcode for iOS, and i build one program as delphi for iOS. I want to have only one instalation, i can to add this xcode program into my delphi installer of my ios program? > > I can to do the same as android? how i can to to...

How to create iOS Service application using delphi XE8
Hi, I'm using Delphi XE8 for developing mobile application. In that I have tried to create Service application for Android and iOs. And from the internet I found some of the sample code for developing Service application in Android. [Sample code for Android Service application|http://blog.blong.com/2013/11/delphi-and-android-services.html] . And Please provide me any sample code for developing Service Application for iPhone(iOs) or is the same code can be used for iPhone also. Please help me in this. Thanks A lot. https://developer.apple.com/library/ios/documentation/iPhone/Concept...

Does Delphi for iOS come with native iOS UI controls?
According to this link http://www.embarcadero.com/products/delphi/ios-development, Delphi for iOS comes with "Pixel-perfect native UI controls". Are those controls the iOS native ones (UILabel, UIText, UISwitch, MKMapView, etc.), i.e. the same ones that one sees in XCode InterfaceBuilder? Le 31/01/13 19:02, Jacques Gonzalez a écrit : > According to this link http://www.embarcadero.com/products/delphi/ios-development, > Delphi for iOS comes with "Pixel-perfect native UI controls". > > Are those controls the iOS native ones (UILabel, UIText, UIS...

Delphi XE8 IdSSLOpenSSL crashes on iOS
Hi! I got an e-mail from one of my users of my component: Hi, I’ve managed to locate where the code is failing and put together a simple test case which demonstrates the problem. The problem occurs in TCPClientThread.pas in procedure TTCPClientThread.IdTCPClientConnected in the line SendPassWord := HashSHA512String(Trim(ServerResponse) + PassWord)); The call to HashSHA512String fails consistently on IOS with the error “Access violation at address 0000000000000000, accessing address 0000000000000000. This occurs on iDevices running IOS 8.3 both in 64 bit and 32 bit...

Using MessageUI in Delphi XE5-iOS
Does anyone here have a clue how I should be able to send emails using the MessageUI on iOS? Afaik it's not natively supported by DelphiXE5. I need to send out an email with a file attached (no bitmap so the Media Library's share sheet won't do). If there are better ways to achieve this then suggestions are welcome also. t.i.a. Hert Hert Vanzet wrote: > Does anyone here have a clue how I should be able to send emails using the MessageUI on iOS? Afaik it's not natively > supported by DelphiXE5. You can use either Indy (TIdSMTP) component, or use DPF: ht...

Using C libraries with Delphi and iOS
Is it possible to combine C code with a Delphi app for iOS? I have some legacy C libraries I'd like to use use with an iPad application. iOS support is provided by FPC and FPC does allow the linking in of C object files generated using gcc. However, this being iOS there could be limitations as to exactly what can be included. Just try it and see if it works. Regards Mike <Herbert Sauro> wrote in message news:460246@forums.embarcadero.com... > Is it possible to combine C code with a Delphi app for iOS? I have some > legacy C libraries I'd like to use use with...

Can I do this with iOS apps developed in Delphi XE4 Pro + iOS?
I still don't have XE4/iOS as I have some questions first. Do I have access to iOS "native" library/system? What do I use for internet (downloading files etc.) - Indy? *If my research is correct, Google maps is available for iOS? Can I use Google maps or Apple's maps solutions in Delphi iOS apps?* If I have XE4 Pro, can I still use database functionality? Any restrictions? (Am I allowed to use what iOS offers or connect with a database on a webserver?) Anyone here developed demo apps I can see available in Apple iTunes store? (Even simple apps is okay as I onl...

Delphi XE4 - Firemonkey
I have an application that runs fine on windows, however when running on iOS simulator the onKeyUp event for a TEdit control is not being fired? Please advise if this event should get fired when running on iOS? This problem occurs onKeyUp events created directly on the control and by assigning the event programatically. Running XE4 update 1 iPhoneOS6.1.sdk Minimac: OS X 10.9 XCode 5 iOS Simulator Version 7.0 - iPad Retina / iOS 7.0.3(11B508) ...

I will never use Delphi for iOS development
I posted an article on my blog explaining why I would never use Delphi for anything other than Windows development: http://mihaelamj.com/delphi/i-will-never-use-delphi-for-ios-development/ I just wanted to point out the "(BTFTJ) best tool for the job" paradigm, and when it comes to Delphi, the job is done on Windows. I love Delphi, I'm still using it and will continue to use in the future. But I just want other developers no to be seduced by "do it all in Delphi" frame of mind, because that is just plain wrong (BTFTJ agin). Cheers There is a bug in your b...

Using ZBar with Delphi XE4 app for iOS
I found a free SDK to scan the QR-codes (http://zbar.sourceforge.net/) and I want to use in the my app for iOS, but I can't find an example of its use in delphi xe4 applications for ios. Is there a possibility of using the SDK for ios in delphi xe4 or use static libraries (*.a) for ios is not allowed? > {quote:title=Sergey Kukharev wrote:}{quote} > I found a free SDK to scan the QR-codes (http://zbar.sourceforge.net/) and I want to use in the my app for iOS, but I can't find an example of its use in delphi xe4 applications for ios. Is there a possibility of using the SDK for i...

ios delphi Xe2: Using Iphone camera
Hello... I'am looking for a delphi Xe2 example: Using the camera on iOS with Delphi (Firemonkey) Lot of people do the same as I. We all found: 1) a picture of the demo 2) a video of the demo But we do not found the real demo for download. Pls give us the code of this demo (we waiting since October for this code) bye... Joerg www.JRichmann.de Am 31.12.2011 14:41, schrieb Joerg Richmann: > Hello... > > I'am looking for a delphi Xe2 example: Using the camera on iOS with Delphi (Firemonkey) > Lot of people do the same as I. > > We all found:...

File read write on iOS using Delphi
Does anyone have sample code that shows how to read and write files on iOS device in Delphi? Or any other information on that topic? How is file i/o in iOS different on the Simulator and the actual iOS device itself? Thanks! Almost same in windows , but r/w speed is much slower :) {code} // // iOS Native Graphic Wrapper for Delphi // unit iOS_Files; interface {$mode delphi} {$modeswitch objectivec1} uses SysUtils, Types, Classes, Variants, Math, UITypes, CFBase,CFURL, CGContext,CGGeometry,CGColorSpace, iPhoneAll, NSHelpers, // By P...

IOS Setup in Delphi help
Could someone check this document for me, since I cannot get my Delphi to talk properly anymore with my Mac and compile for my Test, adhoc and App Store. Had to reinstall my laptop, and forgot those settings, and I am at a loss. I added some screens in it, so you know what I all did. Could someone take a look at it, and tell me what's wrong / missing etc? Thank you ...

Web resources about - Delphi XE8, using iOS framework gives AV - embarcadero.delphi.ios

Framework - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

How to find which versions of the .NET Framework are installed on a PC
Check the system requirements for a Windows application and you’ll often find it needs some minimum version of Microsoft’s .NET Framework. .NET ...

Frameworks releasing 'Time Spent' EP
by Andrew Sacher photo by Shauna Hundeby Gainesville's Frameworks became one of the more promising new bands in the current wave of screamo with ...

Int'l groups launch new global framework to eliminate human rabies
... the worst rabies problem. Metro Manila (CNN Philippines) – International organizations launched on Thursday (December 10) a new global framework ...

Agile Frameworks: Does Anyone Know What A Framework Is?
[Welcome to the first in a series of posts about Agile frameworks. In this series, Cutter consultants in the Agile Product Management & Software ...

The Complex Framework Of The UN Climate Talks, Demystified
As COP21 convenes this week in Paris, this data viz breaks down all you need to know about the history, key players, and big decisions. Yesterday, ...

AT&T teams with Cisco, Ericsson, Qualcomm, Intel on smart cities framework
Network World AT&T teams with Cisco, Ericsson, Qualcomm, Intel on smart cities framework FierceWireless LAS VEGAS—AT&T (NYSE: T) is collaborating ...

A Framework For How Any Company Can Design Amazing Employee Experiences
Over the past few months I've been working on a series of articles all around the employee experience which I define as being a combination of ...

Democrats attempt to set legal framework to sue the gun industry out of existence
Well, most of the Democratic 2016 field supports this, as do anti-gun activists, so it’s no surprise that some members of Congress are trying ...

130-foot Framework tower slated to become the tallest wooden building in the US
Read the rest of 130-foot Framework tower slated to become the tallest wooden building in the US

Resources last updated: 1/22/2016 12:04:22 PM