{"action":"created","issue":{"url":"https://api.github.com/repos/kivy/kivy-ios/issues/124","labels_url":"https://api.github.com/repos/kivy/kivy-ios/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/kivy/kivy-ios/issues/124/comments","events_url":"https://api.github.com/repos/kivy/kivy-ios/issues/124/events","html_url":"https://github.com/kivy/kivy-ios/issues/124","id":60767266,"number":124,"title":"pyobjus code crashing on 64 bit devices after using new toolchain","user":{"login":"matafc","id":1737895,"avatar_url":"https://avatars.githubusercontent.com/u/1737895?v=3","gravatar_id":"","url":"https://api.github.com/users/matafc","html_url":"https://github.com/matafc","followers_url":"https://api.github.com/users/matafc/followers","following_url":"https://api.github.com/users/matafc/following{/other_user}","gists_url":"https://api.github.com/users/matafc/gists{/gist_id}","starred_url":"https://api.github.com/users/matafc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matafc/subscriptions","organizations_url":"https://api.github.com/users/matafc/orgs","repos_url":"https://api.github.com/users/matafc/repos","events_url":"https://api.github.com/users/matafc/events{/privacy}","received_events_url":"https://api.github.com/users/matafc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-12T03:50:29Z","updated_at":"2015-04-13T20:27:33Z","closed_at":null,"body":"First, I am not sure if this should be here or in the pyobjus repo. Since this is what triggered it, and the problem files are in the kivy-ios/build directroy, I decided to start here.\r\n\r\nFirst, the old code worked on all simluators and devices previously. I can replicate crashes on start sometimes with every 64 bit simulator and real device listed. For the simluators, it will sometimes start the app and display the ad, but after rotating a bit it will crash. I have included the errors I have seen so far.\r\n\r\nsimluator:\r\n  iphone 4s: ok\r\n  iphone 5: ok\r\n  iphone 5s:\r\n    sometimes on start, xcode debugger stops at:\r\n\r\n````\r\n      kivy-ios/build/python/x86_64/Python-2.7.1/Modules/gcmodule.c\r\n        gc->gc.gc_refs = Py_REFCNT(FROM_GC(gc));    Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)\r\n````\r\nor xcode debugger stops at:\r\n\r\n````\r\n      kivy-ios/build/python/x86_64/Python-2.7.1/Modules/gcmodule.c\r\n        if (PyObject_IS_GC(op)) { Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)\r\n````\r\n\r\nit will sometimes start, able to toggle ad, then sometimes on rotate, xcode debugger stops at:\r\n\r\n````\r\n      kivy-ios/build/sdl2/x86_64/slime73-sdl-experiments-a66a7f7e8cd8/src/video/uikit/SDL_uikitevents.m\r\n        result = CFRunLoopRunInMode(kCFRunLoopDefaultMode, seconds, TRUE);  Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)\r\n````\r\n\r\n  iphone 6:\r\n      same as iphone 5s, but sometimes also see it crash at start with, xcode debugger stops at:\r\n````    \r\n      kivy-ios/build/python/x86_64/Python-2.7.1/Modules/gcmodule.c\r\n        _PyObject_GC_UNTRACK(op); Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)\r\n````\r\n\r\n  iphone 6 plus: \r\n    cannot test, see issue #122 \r\n  ipad 2: ok\r\n  ipad air: same as iphone 5s\r\n  ipad retina: ok\r\n\r\n It seems all 32 bit devices work properly.\r\n\r\nReal devices:\r\n  iphone 5s:\r\n      on start always crashes with xcode debugger stopping at:\r\n````\r\n        kivy-ios/build/python/arm64/Python-2.7.1/Objects/listobject.c\r\n          op->ob_item = (PyObject **) PyMem_MALLOC(nbytes); Thread 1: signal SIGABRT\r\n````\r\nxcode log:\r\n\r\n````\r\n          kivy-iad-sample(2549,0x1997e5310) malloc: *** error for object 0x17420c320: Invalid pointer dequeued from free list\r\n          *** set a breakpoint in malloc_error_break to debug\r\n          (lldb) \r\n````\r\n\r\nConfirmed removing all pyobjus code allows it to run properly\r\n\r\n  ipad air 2: same as real iphone 5s\r\n\r\n  I don't have a 32-bit real ios device to test on, I suspect it would work.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/9465241-pyobjus-code-crashing-on-64-bit-devices-after-using-new-toolchain?utm_campaign=plugin&utm_content=tracker%2F9081&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F9081&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/kivy/kivy-ios/issues/comments/92488674","html_url":"https://github.com/kivy/kivy-ios/issues/124#issuecomment-92488674","issue_url":"https://api.github.com/repos/kivy/kivy-ios/issues/124","id":92488674,"user":{"login":"JulienDrecq","id":6137350,"avatar_url":"https://avatars.githubusercontent.com/u/6137350?v=3","gravatar_id":"","url":"https://api.github.com/users/JulienDrecq","html_url":"https://github.com/JulienDrecq","followers_url":"https://api.github.com/users/JulienDrecq/followers","following_url":"https://api.github.com/users/JulienDrecq/following{/other_user}","gists_url":"https://api.github.com/users/JulienDrecq/gists{/gist_id}","starred_url":"https://api.github.com/users/JulienDrecq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JulienDrecq/subscriptions","organizations_url":"https://api.github.com/users/JulienDrecq/orgs","repos_url":"https://api.github.com/users/JulienDrecq/repos","events_url":"https://api.github.com/users/JulienDrecq/events{/privacy}","received_events_url":"https://api.github.com/users/JulienDrecq/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T20:27:33Z","updated_at":"2015-04-13T20:27:33Z","body":"Hi @matafc , I try to integrate your sample kivy-iad-sample in my kivy app and i meet the same error as you, on all devices. \r\nAt Kivy, Other idea to fix the bug ?\r\n\r\nThank you.\r\nNB: I work with Mac OS X 10.10.3 and Xcode 6.3."}}