ionic-team / cordova-plugin-wkwebview-engine

Mirror of Apache Cordova wkwebview engine plugin
Apache License 2.0
289 stars 66 forks source link

Malloc pointer being freed was not allocated -- Ionic1 #57

Open jgw96 opened 8 years ago

jgw96 commented 8 years ago

From @snehoo on September 28, 2016 18:26

Everything was running fine then suddenly this, oh yeah upgraded to Sierra before this bug and now using xCode 8.0.

malloc: *** error for object 0x1740b6e00: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

looked everywhere, tried restarting everything.

screen shot 2016-09-26 at 2 30 55 am

Copied from original issue: driftyco/ionic#8259

jgw96 commented 8 years ago

Hello, thanks for opening an issue with us! What command are you running when you get this error? It looks like you are using the wkwebview plugin, am i correct?

jgw96 commented 8 years ago

From @snehoo on September 28, 2016 18:39

Yes using wkwebview plugin.

ionic prepare ios, then executed the xcode project via xCode and then Build and Run on iOS device.

everything ok till i upgraded to Sierra and xCode 8. Thanks

jgw96 commented 8 years ago

If possible, could you try with a project that is not using the WkWebView plugin and see if you get the same error? Thanks!

jgw96 commented 8 years ago

From @snehoo on September 28, 2016 19:2

YEP! i guess that was it 🙏

jgw96 commented 8 years ago

Interesting, thanks for testing! Are you using our fork of the plugin?

jgw96 commented 8 years ago

From @snehoo on September 28, 2016 20:4

yes same one

ghost commented 8 years ago

Got the same Issues. Are there any news or solutions out there?

manucorporat commented 8 years ago

@snehoo @weissadrian Can you guys try to remove the platforms/ and plugins/ folder and recreate the Cordova project from scratch:

rm -rf platforms
rm -rf plugins
cordova platform add ios@4.2.0
ionic build

then, manually open the Xcode project and run it.

ghost commented 8 years ago
screen shot 2016-09-29 at 17 35 32

Thanks for the advice but it makes no difference. Tried it several times before. As soon as the wkwebview ist involved you get a runtime error. Happens since Xcode 8 / iOS10 :/

antonfire commented 8 years ago

I had a similar error to this on another plugin. Have you tried building on another iPhone? If it works on another phone like it did for me then factory reset the phone with the error then restore then rebuild with Xcode and the error disappeared.

larssn commented 8 years ago

Same exact problem.

Ps. For Ionic 2 though. Tried using the ionic 2 conference project.

ouedraog commented 8 years ago

Getting the same problem when running the ionic 2 conference project on ios 10

manucorporat commented 8 years ago

I can't reproduce it. iPhone 6. iOS10. ionic 2 conference app.

ouedraog commented 8 years ago
capture d ecran 2016-10-06 a 21 55 04

Run on Iphone SE Ios 10.0.2

Cordova CLI: 6.3.1 Gulp version: CLI version 3.9.1 Gulp local:
Ionic Framework Version: 2.0.0-rc.0 Ionic CLI Version: 2.1.0 Ionic App Lib Version: 2.1.0-beta.1 ios-deploy version: 1.8.6 ios-sim version: 5.0.8 OS: Mac OS X El Capitan Node Version: v6.7.0 Xcode version: Xcode 8.0 Build version 8A218a

fathyb commented 8 years ago

I struggled with this crash for hours before i finally figured out that Safari was responsible. It was due to the option Develop>Device>Automatically show web inspector for JSContext. If it doesn't work try quit Safari completely.

capture d ecran 2016-10-10 a 22 59 09
antonfire commented 8 years ago

@fathyb thanks that fixed it

tlapuste commented 8 years ago

Ran into this same issue with a native implementation of WKWebview, unrelated to the cordova plugin. Started happening right after upgrading to Sierra (already had Xcode 8 and running iOS10 on device on El Capitan).

Thanks @fathyb, your fix worked!