1

Our app has never worked with the simulator (due to not having 3rd party dependency support for i386 and x86_64). I've just recently resolved the dependencies and I'm now running in 64 bit mode on the simulator now, yet I'm seeing a crash that says EXC_i386_GPFLT. There is no extended code, so I can't tell what exactly the error is.

Is it possible it could be an alignment error too or should I be taking this as a bad address? The crash doesn't occur at all on a 64 bit device. memcpy_s is just a macro for memmove, we do some size checking in it.

Here's the top of the stock, so that you can see where the exception was actually raised.

EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x0000000109cd23a0 libsystem_platform.dylib`_platform_memmove$VARIANT$Nehalem + 96
    frame #1: 0x0000000109a66bd4 libsystem_sim_c.dylib`__memmove_chk + 22
    frame #2: 0x0000000103b5ee21 appName`memcpy_s(dest=0x6ba6820000000800, sizeInBytes=2, src=0x00007fb26c0ebc18, count=2048) + 113 at file.h:26
Joey Carson
  • 2,973
  • 7
  • 36
  • 60
  • Symbolicated stack trace? – Phillip Mills Jan 20 '15 at 23:12
  • Most of the stack is the iOS audio rendering thread calling into an audio rendering handler. The function is complex and depends on other things, so trying to post it wouldn't be realistic either. The exception occurs in when calling memcpy, but it's not descriptive. – Joey Carson Jan 20 '15 at 23:16
  • Question updated with just the source of the exception raising. Not asking what's wrong with my code, but I want to be sure I'm properly interpreting the meaning of the exception. – Joey Carson Jan 20 '15 at 23:21
  • You sound like you know this stuff better than I do but `dest` really doesn't look like anything I'd expect to see as an address. – Phillip Mills Jan 20 '15 at 23:31
  • Yes, that's what I'm thinking too. Though it's hard to be sure with the exception not saying exactly what's wrong. Come to think of it, I was seeing a bug with the iOS audio rendering thread, passing this pointer in a misaligned struct, only on the 64 bit devices. It was obvious that the struct was off by 4 bytes, so I added an integer in the middle of it and cast the passed pointer and everything worked. I wonder if it's different on the simulator. – Joey Carson Jan 20 '15 at 23:41
  • This thread might help - [http://stackoverflow.com/questions/19651788/whats-the-meaning-of-exception-code-exc-i386-gpflt](http://stackoverflow.com/questions/19651788/whats-the-meaning-of-exception-code-exc-i386-gpflt) – whoKnows May 03 '15 at 11:42

0 Answers0