• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Bad EXC_BAD_INSTRUCTION on drawRect call in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bad EXC_BAD_INSTRUCTION on drawRect call in Swift


  • Subject: Bad EXC_BAD_INSTRUCTION on drawRect call in Swift
  • From: "Peters, Brandon" <email@hidden>
  • Date: Sat, 23 Aug 2014 04:25:12 +0000
  • Thread-topic: Bad EXC_BAD_INSTRUCTION on drawRect call in Swift

Devs,

I am getting this error:

EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode 0x0)

over this line of code:

if self.contentView!.frame.size.width > photo.size.width {
                   docRect.size.width = self.contentView!.frame.size.width
                   imageLocation.origin.x = (self.contentView!.frame.size.width - photo.size.width) / 2.0
               }

I am using XC6 beta 6. Has any encountered this? Any guidance on resolving the issue? Thanks.

I will also add the stack trace:

ArnoldTransformer2`@objc ArnoldTransformer2.ATView.drawRect (ArnoldTransformer2.ATView)(C.CGRect) -> () at ATView.swift:
0x10000e550:  pushq  %rbp
0x10000e551:  movq   %rsp, %rbp
0x10000e554:  subq   $0x30, %rsp
0x10000e558:  leaq   0x10(%rbp), %rax
0x10000e55c:  movsd  (%rax), %xmm0
0x10000e560:  movsd  0x8(%rax), %xmm1
0x10000e565:  movsd  0x10(%rax), %xmm2
0x10000e56a:  movsd  0x18(%rax), %xmm3
0x10000e56f:  movq   %rdi, -0x8(%rbp)
0x10000e573:  movsd  %xmm2, -0x10(%rbp)
0x10000e578:  movsd  %xmm3, -0x18(%rbp)
0x10000e57d:  movsd  %xmm0, -0x20(%rbp)
0x10000e582:  movsd  %xmm1, -0x28(%rbp)
0x10000e587:  callq  0x100018f1a               ; symbol stub for: objc_retain
0x10000e58c:  movsd  -0x20(%rbp), %xmm0
0x10000e591:  movsd  -0x28(%rbp), %xmm1
0x10000e596:  movsd  -0x10(%rbp), %xmm2
0x10000e59b:  movsd  -0x18(%rbp), %xmm3
0x10000e5a0:  movq   -0x8(%rbp), %rdi
0x10000e5a4:  movq   %rax, -0x30(%rbp)
0x10000e5a8:  callq  0x10000bc60               ; ArnoldTransformer2.ATView.drawRect (ArnoldTransformer2.ATView)(C.CGRect) -> () at ATView.swift:224
0x10000e5ad:  addq   $0x30, %rsp <- Problem is here
0x10000e5b1:  popq   %rbp
0x10000e5b2:  retq
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Bad EXC_BAD_INSTRUCTION on drawRect call in Swift
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: -glyphWithName:
  • Next by Date: Re: -glyphWithName:
  • Previous by thread: Re: -glyphWithName:
  • Next by thread: Re: Bad EXC_BAD_INSTRUCTION on drawRect call in Swift
  • Index(es):
    • Date
    • Thread