Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BAD_ACCESS on device #4

Open
markrickert opened this issue Jul 1, 2014 · 7 comments
Open

EXC_BAD_ACCESS on device #4

markrickert opened this issue Jul 1, 2014 · 7 comments

Comments

@markrickert
Copy link

So I'm trying to get this up and running on a device and I'm running into an EXC_BAD_ACCESS error when running in debug mode (it just stops with no error message when not in debug mode). Any idea about what's going on here?

$ rake device debug=1

  packet: QSetEnableAsyncProfiling;enable:1;interval_usec:1000000;scan_type:0xfffffeff;
response: OK
Process 0 connected
Executing commands in '/var/folders/v7/vrn4z9cs6ml0q2817kx3vrnh0000gn/T/_deploylldbcmds'.
(lldb)  command script import /var/folders/v7/vrn4z9cs6ml0q2817kx3vrnh0000gn/T/_deploylldbcmds.py
Process 194 stopped
* thread #1: tid = 0x14c7, 0x2bea9028 dyld`_dyld_start, stop reason = signal SIGSTOP
    frame #0: 0x2bea9028 dyld`_dyld_start
dyld`_dyld_start:
-> 0x2bea9028:  mov    r8, sp
   0x2bea902c:  sub    sp, sp, #0x10
   0x2bea9030:  bic    sp, sp, #0x7
   0x2bea9034:  ldr    r3, [pc, #112]            ; _dyld_start + 132
(lldb) c
Process 194 resuming
"Starting IAP"
2014-06-30 21:25:05.292 MYApp[194:60b] Starting purchase process.
Process 194 stopped
* thread #1: tid = 0x14c7, 0x3a2b5622 libobjc.A.dylib`objc_msgSend + 2, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x4)
    frame #0: 0x3a2b5622 libobjc.A.dylib`objc_msgSend + 2
libobjc.A.dylib`objc_msgSend + 2:
-> 0x3a2b5622:  ldr.w  r9, [r0]
   0x3a2b5626:  ldrh.w r12, [r9, #12]
   0x3a2b562a:  ldr.w  r9, [r9, #8]
   0x3a2b562e:  and.w  r12, r12, r1
@markrickert
Copy link
Author

To add a little more info:

Here's the method call where it's crashing:

(lldb) x/s $r1
0x32974cdc: "isKindOfClass:"
(lldb)

Looks like CargoBay is using that method twice:
https://github.com/mattt/CargoBay/blob/master/CargoBay/CargoBay.m#L168
https://github.com/mattt/CargoBay/blob/master/CargoBay/CargoBay.m#L712

@markrickert
Copy link
Author

The same thing happens when I use the CargoBay example code (converted over to RubyMotion, of course)

    identifiers = ["my.product.identifier"]
    CargoBay.sharedManager.productsWithIdentifiers(
      NSSet.setWithArray(identifiers),
      success:-> products, invalidIdentifiers {
        NSLog("Products: %@", products)
        NSLog("Invalid Identifiers: %@", invalidIdentifiers)
      }, failure:-> error {
        NSLog("Error: %@", error)
      }
    )

@holgersindbaek
Copy link
Owner

I'm not sure what's going on there. Let me know what you find out.

All the best

Holger Sindbaek
Holgersindbaek.com

On Monday, June 30, 2014 at 8:28 PM, Mark Rickert wrote:

So I'm trying to get this up and running on a device and I'm running into an EXC_BAD_ACCESS error when running in debug mode (it just stops with no error message when not in debug mode). Any idea about what's going on here?
$ rake device debug=1 packet: QSetEnableAsyncProfiling;enable:1;interval_usec:1000000;scan_type:0xfffffeff; response: OK Process 0 connected Executing commands in '/var/folders/v7/vrn4z9cs6ml0q2817kx3vrnh0000gn/T/_deploylldbcmds'. (lldb) command script import /var/folders/v7/vrn4z9cs6ml0q2817kx3vrnh0000gn/T/_deploylldbcmds.py Process 194 stopped * thread #1: tid = 0x14c7, 0x2bea9028 dyld_dyld_start, stop reason = signal SIGSTOP frame #0: 0x2bea9028 dyld_dyld_start dyld_dyld_start: -> 0x2bea9028: mov r8, sp 0x2bea902c: sub sp, sp, #0x10 0x2bea9030: bic sp, sp, #0x7 0x2bea9034: ldr r3, [pc, #112] ; _dyld_start + 132 (lldb) c Process 194 resuming "Starting IAP" 2014-06-30 21:25:05.292 MYApp[194:60b] Starting purchase process. Process 194 stopped * thread #1: tid = 0x14c7, 0x3a2b5622 libobjc.A.dylibobjc_msgSend + 2, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x4) frame #0: 0x3a2b5622 libobjc.A.dylibobjc_msgSend + 2 libobjc.A.dylibobjc_msgSend + 2: -> 0x3a2b5622: ldr.w r9, [r0] 0x3a2b5626: ldrh.w r12, [r9, #12] 0x3a2b562a: ldr.w r9, [r9, #8] 0x3a2b562e: and.w r12, r12, r1


Reply to this email directly or view it on GitHub (#4).

@stevebooks
Copy link

Yeah, I am getting the same error. Any status updates on this?

@markrickert
Copy link
Author

@stevebooks
Copy link

@markrickert Thanks for the links!

@jsheets
Copy link

jsheets commented Dec 15, 2014

I ran into this too on startup. I ran the app in the simulator and it just stopped, no error message. In debug mode, I did a "bt" stacktrace and noticed a crash in NSUserDefaults. On a hunch, I converted the price to a float and it worked fine. Must not have liked the BigDecimal.

module Vendor
  class Info
    ...
    def productsRequest(request, didReceiveResponse:response)
    ...
        NSUserDefaults["#{@params.id}.price"] = product.price.to_f

jsheets pushed a commit to FourFringe/Vendor that referenced this issue Dec 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants