Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
StoreKit EXC_BAD_ACCESS — Gideros Forum

StoreKit EXC_BAD_ACCESS

moopfmoopf Guru
edited July 2014 in General questions
Trying to get a project finished for an old client and I keep getting the following when just trying the storekit:requestProducts method on a device:

CpApp`GReferenced::proxy() const at refptr.cpp:57:
0x7b48c: ldr r0, [r0, #20]
0x7b48e: bx lr

Does anybody have any ideas. I'm doing the require("storekit") and this happens as soon as I try to access the storekit:requestProducts method. I've confirmed bundle IDs, everything. At a bit of a loss.

Comments

  • Exactly the same happens with the Common In-App Billing plugin from @ar2rsawseen as well. In the Common In-App Billing it seems that the following line is where the EXC_BAD_ACCESS is being raised in the setProducts method:

    IAB *iab = getInstance(L, 1);

    I've got no clue what's going on here.
  • ar2rsawseenar2rsawseen Maintainer
    edited July 2014
    Wow @moopf did not know you were still hanging around :)

    That's really interesting error.
    Are you using any other plugins on that same ios? Or storekit/Iab Interface are the only one's not working?

    Because if none of the plugins is working, then my only guess is that you have ARC (Automatic Reference Counting) enabled for your code, and Gideros (including plugins) should be executed without ARC

    So try disabling ARC and running project again:

    Click on you project, in the left hand organizer.
    Select your target, in the next column over.
    Select the Build Settings tab at the top.
    Scroll down to "Objective-C Automatic Reference Counting" (it may be listed as "CLANG_ENABLE_OBJC_ARC" under the User-Defined settings group),
    and set it to NO.
  • Hi @ar2rsawseen, I lurk :)

    I've checked the build settings and it's already set to No. I'm not using any other plugins.

    Any other ideas? I'm fresh out at this end!

    Likes: PaulH

    +1 -1 (+1 / -0 )Share on Facebook
  • ar2rsawseenar2rsawseen Maintainer
    Well EXC_BAD_ACCESS errors occur when your application attempts to access an object that has already been released.

    That's why I thought the ARC was at fault. Maybe it still is, for example, maybe there is an option somewhere enable ARC for newly added files and ARC is only enabled for those files and not for whole project.

    I can make other guesses, but they all would be just guesses, for example, you make iab instance in Lua local and it gets magically garbage collected during method call :)

    As you see I'm pretty desperate on ideas right now, will think about that more.

    If you want, you can send me an xcode project to ar2rsawseen at gmail.com
    or pm me your email, and I'll send you my working version of xcode project with iab preinstalled

    and then we can start making more educated guesses :)
Sign In or Register to comment.