GithubHelp home page GithubHelp logo

Comments (6)

Ciechan avatar Ciechan commented on July 26, 2024

Could you provide a pet project showing the issue, or at least provide a list of steps to recreate it?

from bcgenieeffect.

k06a avatar k06a commented on July 26, 2024

I've just started animation and starting to filter an image => app fails. Only animation works perfect. Only image filtering works perfect. But both them not works...

from bcgenieeffect.

k06a avatar k06a commented on July 26, 2024

I found a problem... This is how animation invokes GPUImage filtering.
Why animation makes relayout?

* thread #1: tid = 0x1c03, 0x000767fd Pictography`-[GPUImagePicture initWithCGImage:smoothlyScaleOutput:] + 173 at GPUImagePicture.m:39, stop reason = breakpoint 4.1
    frame #0: 0x000767fd Pictography`-[GPUImagePicture initWithCGImage:smoothlyScaleOutput:] + 173 at GPUImagePicture.m:39
    frame #1: 0x0007662a Pictography`-[GPUImagePicture initWithCGImage:] + 90 at GPUImagePicture.m:20
    frame #2: 0x000637ad Pictography`-[GPUImageFilter newCGImageByFilteringCGImage:orientation:] + 93 at GPUImageFilter.m:235
    frame #3: 0x000639a7 Pictography`-[GPUImageFilter imageByFilteringImage:] + 135 at GPUImageFilter.m:255
    frame #4: 0x00018097 Pictography`-[HNPSepiaImageFilter processImage:] + 103 at HNPSepiaImageFilter.m:25
    frame #5: 0x00011cf4 Pictography`-[HNPEditorViewController tableView:cellForRowAtIndexPath:] + 6132 at HNPEditorViewController.m:370
    frame #6: 0x007bcf4b UIKit`-[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 412
    frame #7: 0x007bd01f UIKit`-[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 69
    frame #8: 0x007a580b UIKit`-[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1863
    frame #9: 0x007b619b UIKit`-[UITableView layoutSubviews] + 241
    frame #10: 0x0075292d UIKit`-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 279
    frame #11: 0x017ce6b0 libobjc.A.dylib`-[NSObject performSelector:withObject:] + 70
    frame #12: 0x00351fc0 QuartzCore`-[CALayer layoutSublayers] + 240
    frame #13: 0x0034633c QuartzCore`CA::Layer::layout_if_needed(CA::Transaction*) + 468
    frame #14: 0x00351eaf QuartzCore`-[CALayer layoutIfNeeded] + 166
    frame #15: 0x0034effe QuartzCore`-[CALayer renderInContext:] + 153
    frame #16: 0x00035b84 Pictography`-[UIView(Genie) renderSnapshotWithMarginForAxis:] + 420 at UIView+Genie.m:293
    frame #17: 0x0003312d Pictography`-[UIView(Genie) genieTransitionWithDuration:edge:destinationRect:reverse:completion:] + 413 at UIView+Genie.m:151
    frame #18: 0x00032f71 Pictography`-[UIView(Genie) genieOutTransitionWithDuration:startRect:startEdge:completion:] + 161 at UIView+Genie.m:128
    frame #19: 0x0001a932 Pictography`-[HNPHomeEditorSegue beginHomePushAnimation] + 2226 at HNPHomeEditorSegue.m:90
    frame #20: 0x0001ed42 Pictography`-[HNPHomeEditorSegue pushSegue] + 994 at HNPHomeEditorSegue.m:216
    frame #21: 0x0000a090 Pictography`-[HNPHomeViewController tableView:didSelectRowAtIndexPath:] + 2240 at HNPHomeViewController.m:435
    frame #22: 0x007b18d5 UIKit`-[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1194
    frame #23: 0x007b1b3d UIKit`-[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 201
    frame #24: 0x011b8e83 Foundation`__NSFireDelayedPerform + 380
    frame #25: 0x0233b376 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
    frame #26: 0x0233ae06 CoreFoundation`__CFRunLoopDoTimer + 534
    frame #27: 0x02322a82 CoreFoundation`__CFRunLoopRun + 1810
    frame #28: 0x02321f44 CoreFoundation`CFRunLoopRunSpecific + 276
    frame #29: 0x02321e1b CoreFoundation`CFRunLoopRunInMode + 123
    frame #30: 0x0270f7e3 GraphicsServices`GSEventRunModal + 88
    frame #31: 0x0270f668 GraphicsServices`GSEventRun + 104
    frame #32: 0x0070265c UIKit`UIApplicationMain + 1211
    frame #33: 0x00002de5 Pictography`main + 181 at main.m:16
    frame #34: 0x00002ce5 Pictography`start + 53

from bcgenieeffect.

Ciechan avatar Ciechan commented on July 26, 2024

As you can see in the call stack it's not me who is calling [CALayer layoutIfNeeded], it's the Apple's implementation of [CALayer renderInContext:]. Unfortunately I can't do anything about this, this is just how CoreAnimation works.

One solution I can think of is to temporarily disable call to [HNPSepiaImageFilter processImage:] inside [HNPEditorViewController tableView:cellForRowAtIndexPath:] when you know you're just about to animate using genie effect.

from bcgenieeffect.

k06a avatar k06a commented on July 26, 2024

@Ciechan, thank you! I've solved problem - my table delegate was unready to cell creation while this update...

from bcgenieeffect.

Ciechan avatar Ciechan commented on July 26, 2024

I'm glad it works!

from bcgenieeffect.

Related Issues (16)

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.