FBRetainCycleDetector icon indicating copy to clipboard operation
FBRetainCycleDetector copied to clipboard

fishhook.c crash

Open applebest opened this issue 5 years ago • 11 comments

WechatIMG167

applebest avatar May 18 '20 06:05 applebest

What version of XCode were you running and what iOS version?

youngdfb avatar May 18 '20 12:05 youngdfb

您正在运行哪个版本的XCode和哪个iOS版本?

xcode version 11.3.1 iOS version 13.4.1 It runs on my phone

So far I have switched release

applebest avatar May 18 '20 12:05 applebest

I have the same issue on my Xs with iOS 13.2, does not happen on my 6s with iOS 12.4

simonepauro avatar May 26 '20 13:05 simonepauro

I have the same issue on my air3 iOS 13.3.1 and iPad Pro 12.9-inch (3rd generation) 13.5.

Auber2071 avatar Jun 17 '20 06:06 Auber2071

遇到了同样的问题,iOS13.5.1,运行必crash

SummerYP avatar Jun 22 '20 06:06 SummerYP

When I try to create barcode with "CIFilter *filter = [CIFilter filterWithName:@"CIQRCodeGenerator"];",it crashes 100% on iOS13 under debug mode, while release mode is workable, same same crash issue with the screenshoot

humoroutlaw avatar Jul 13 '20 04:07 humoroutlaw

Same Problem.

iOS 14.0 beta 2, XCode 12 beta 2, MacOS Big Sur

travishan avatar Jul 15 '20 03:07 travishan

Same Problem.

iOS 13.6, XCode 11.6, MacOS 10.15.5

FuncTime avatar Jul 27 '20 09:07 FuncTime

Xcode 12.1 macOS 11.0.1 (20B29) the same. When I call +[CIFilter filterWithName:withInputParameters:]

wangwanjie avatar Nov 18 '20 07:11 wangwanjie

Update fishhook to the latest version, contains .h and .c files; Be care for the renames.

jooyyy avatar Dec 11 '20 10:12 jooyyy

Hot fix in Xcode 13, push this code into your Podfile:

pod 'MLeaksFinder', :configurations => ['Debug']
  post_install do |installer|
      ## Fix for XCode 12.5
      find_and_replace("Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayout.mm",
        "layoutCache[currentClass] = ivars;", "layoutCache[(id<NSCopying>)currentClass] = ivars;")
      ## Fix for XCode 13.0
        find_and_replace("Pods/FBRetainCycleDetector/fishhook/fishhook.c",
        "indirect_symbol_bindings[i] = cur->rebindings[j].replacement;", "if (i < (sizeof(indirect_symbol_bindings) / sizeof(indirect_symbol_bindings[0]))) { \n indirect_symbol_bindings[i]=cur->rebindings[j].replacement; \n }")
  end

push end of the file:

def find_and_replace(dir, findstr, replacestr)
  Dir[dir].each do |name|
      text = File.read(name)
      replace = text.gsub(findstr,replacestr)
      if text != replace
          puts "Fix: " + name
          File.open(name, "w") { |file| file.puts replace }
          STDOUT.flush
      end
  end
  Dir[dir + '*/'].each(&method(:find_and_replace))
end

lexuanquynh avatar Oct 13 '21 05:10 lexuanquynh