Coder Social home page Coder Social logo

Comments (6)

dzenbot avatar dzenbot commented on May 27, 2024

Every UIKit call is made on the main thread. I don't think that's the cause.

The only multi-thread calls are made by its dependecies, AFNetworking and SDWebImage. Perhaps that's where you should look at.

from dznphotopickercontroller.

Alifar avatar Alifar commented on May 27, 2024

Thak you for your quick reply. Did you tested it yourself from your sample code?

from dznphotopickercontroller.

dzenbot avatar dzenbot commented on May 27, 2024

I haven't test it myself yet (afk), but will do it as soon as I can.
I remember the sample project was working perfectly before, perhaps some latest commits introduced this bug.

from dznphotopickercontroller.

Alifar avatar Alifar commented on May 27, 2024

Hi there, did you tested already?

from dznphotopickercontroller.

dzenbot avatar dzenbot commented on May 27, 2024

I've tested this on iOS7 and iOS8, without being able to reproduce. Sorry.
Did you find a workaround?

from dznphotopickercontroller.

tjanela avatar tjanela commented on May 27, 2024

From my understanding, [DZNPhotoEditorViewContoller editImage] is accessed from a BG thread on the [DZNPhotoEditorViewController acceptEdition] method, since the code creates a new background queue and invokes editImage inside the BG dispatch block.

Since the editImage accesses several properties of views this triggers the UI Thread checker of iOS.

Maybe this is where the problem lies.

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 5925, TID: 12886857, Thread name: (none), Queue name: com.apple.root.background-qos, QoS: 9
Backtrace:
4   DZNPhotoPickerController            0x000000010fa1fb00 -[DZNPhotoEditorViewController cropSize] + 208
5   DZNPhotoPickerController            0x000000010fa1fdaa -[DZNPhotoEditorViewController guideRect] + 250
6   DZNPhotoPickerController            0x000000010fa212c5 -[DZNPhotoEditorViewController editedImage] + 245
7   DZNPhotoPickerController            0x000000010fa22d96 __46-[DZNPhotoEditorViewController acceptEdition:]_block_invoke + 54
8   libdispatch.dylib                   0x000000011514c595 _dispatch_call_block_and_release + 12
9   libdispatch.dylib                   0x000000011514d602 _dispatch_client_callout + 8
10  libdispatch.dylib                   0x000000011515e1eb _dispatch_root_queue_drain + 832
11  libdispatch.dylib                   0x000000011515e9af _dispatch_worker_thread2 + 130
12  libsystem_pthread.dylib             0x000000011553c70e _pthread_wqthread + 619
13  libsystem_pthread.dylib             0x000000011553c435 start_wqthread + 13
2018-12-01 12:34:27.442665-0500 ...[5925:12886857] [reports] Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 5925, TID: 12886857, Thread name: (none), Queue name: com.apple.root.background-qos, QoS: 9
Backtrace:
4   DZNPhotoPickerController            0x000000010fa1fb00 -[DZNPhotoEditorViewController cropSize] + 208
5   DZNPhotoPickerController            0x000000010fa1fdaa -[DZNPhotoEditorViewController guideRect] + 250
6   DZNPhotoPickerController            0x000000010fa212c5 -[DZNPhotoEditorViewController editedImage] + 245
7   DZNPhotoPickerController            0x000000010fa22d96 __46-[DZNPhotoEditorViewController acceptEdition:]_block_invoke + 54
8   libdispatch.dylib                   0x000000011514c595 _dispatch_call_block_and_release + 12
9   libdispatch.dylib                   0x000000011514d602 _dispatch_client_callout + 8
10  libdispatch.dylib                   0x000000011515e1eb _dispatch_root_queue_drain + 832
11  libdispatch.dylib                   0x000000011515e9af _dispatch_worker_thread2 + 130
12  libsystem_pthread.dylib             0x000000011553c70e _pthread_wqthread + 619
13  libsystem_pthread.dylib             0x000000011553c435 start_wqthread + 13

from dznphotopickercontroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.