"dyld: could not load inserted library '/usr/lib/libgmalloc.dylib' because image not found"
Asked Answered
S

7

20

When I run the app in Xcode IOS 6 beta 2 firmware on the device 8 Beta 2, I get the error message: "dyld: could not load inserted library '/ USR / Library / libgmalloc.dylib", because the image was not found. "

What could be the problem?

Stokehole answered 1/7, 2014 at 13:35 Comment(0)
S
2

This is because Xcode mount wrong DeveloperImage. If you open the Settings-> Developer you will see that the "Enable UIAutomation» and others are missing.

For fix:

  1. move all folders from "/Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport" except "8.0 (12A4297e)" to safe place
  2. reboot the phone
  3. connect your phone to xCode 6 beta 2
  4. restore folders in DeviceSupport

This is the only thing that helped me. Even re-flashing on ios8 beta2 does not helps.

Stokehole answered 1/7, 2014 at 13:35 Comment(4)
Modifying the contents of Xcode itself is nearly always the wrong thing to do. I wouldn't recommend doing that.Hally
I did not have to copy any folders anywhere, but rebooting the phone was mandatory. This helped, thanks!Igor
Here is a theory why this happens: devforums.apple.com/message/1000609#1000609Pintsize
This actually worked for me on Xcode 9 beta 4, thanks!Epicure
G
49

Disable "Enable guard Malloc" from diagnostics to run app in device.

Geology answered 7/5, 2015 at 12:3 Comment(5)
I cannot debug the guard malloc in device?Blockhouse
Thats y i have answered, disable guard mallocGeology
this worked for me, in ios 10.3, swift 3.1 and xcode 8.3Linton
Hm, but I actually enabled this myself to guard malloc on the device, and then started getting this error. So, I guess no luck, cannot fully debug on real device which is a shame because I need to debug my Bluetooth code, which is not available in emulator.Intercede
Works for me, in iOS 13, Swift 5.1 and Xcode 11. And for those wondering where Guard Malloc is: Click on the current scheme > Edit Scheme > Run tab > Diagnostics > Guard Malloc checkboxFalito
S
2

This is because Xcode mount wrong DeveloperImage. If you open the Settings-> Developer you will see that the "Enable UIAutomation» and others are missing.

For fix:

  1. move all folders from "/Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport" except "8.0 (12A4297e)" to safe place
  2. reboot the phone
  3. connect your phone to xCode 6 beta 2
  4. restore folders in DeviceSupport

This is the only thing that helped me. Even re-flashing on ios8 beta2 does not helps.

Stokehole answered 1/7, 2014 at 13:35 Comment(4)
Modifying the contents of Xcode itself is nearly always the wrong thing to do. I wouldn't recommend doing that.Hally
I did not have to copy any folders anywhere, but rebooting the phone was mandatory. This helped, thanks!Igor
Here is a theory why this happens: devforums.apple.com/message/1000609#1000609Pintsize
This actually worked for me on Xcode 9 beta 4, thanks!Epicure
H
0

If you're using any 3rd party IDEs for iOS development (e.g. RubyMotion) you should be able to fix this by rebooting your device without that 3rd party IDE running and building and running an app on your device from Xcode.

Hally answered 3/7, 2014 at 22:50 Comment(1)
I don't use any 3rd party IDEs.Stokehole
C
0

I've been seeing this on Xcode 7.1. My quick and dirty solution has been to open the right sidebar of the playground, and toggle the platform setting under "Playground Settings".

In my case, I toggled from iOS to OS X and viola, playground compiles and runs as expected.

Reboots had no effect in my case.

Cordova answered 7/11, 2015 at 18:17 Comment(0)
H
0

Just restart your iPhone. It worked for me.

Haemocyte answered 5/12, 2016 at 19:48 Comment(0)
W
0

Disable "Enable guard Malloc" from diagnostics to run app in device. Edit Scheme step - 1 enter image description here

Step 2: enter image description here you can see Memory Management Uncheck Guard Malloc

Winepress answered 18/7, 2019 at 7:48 Comment(0)
I
-2

Try deleting the app from the device and then reboot. Worked for me.

Interrogatory answered 9/11, 2016 at 9:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.