Skip to content

WebImage Instantly crashes on load when inside a TabView #133

@mjswen0923

Description

@mjswen0923

When used inside a TabView, any loading of a WebImage will immediately cause a crash. Here is the code that causes the crash:

TabView { Text("testing") .tabItem { Text("test") } WebImage(url: URL(string: "https://raw.githubusercontent.com/SDWebImage/SDWebImage/master/SDWebImage_logo.png")) .tabItem { Text("test2") } } 

I am using Xcode 12.0 with iOS 14.0, with SDWebImage 5.9.0 and SDWebImageSwiftUI 1.5.0.

Below is the stack trace:

#0 0x00000001b30dcc64 in AG::AttributeID::size() const ()
#10x00000001b30d0b2c in AG::Graph::add_indirect_attribute(AG::Subgraph&, AG::AttributeID, unsigned long, std::__1::optional, bool) ()
#20x00000001b30e2fe8 in (anonymous namespace)::create_indirect_attribute(unsigned int, std::__1::optional) ()
#30x00000001926b5bf4 in partial apply for thunk for @callee_guaranteed () -> (@unowned IndirectAttribute) ()
#40x00000001926b5a24 in closure #1 in AGSubgraphRef.apply(_:) ()
#50x00000001926b5818 in Attribute.makeReusable(indirectMap:) ()
#60x00000001926b1fd0 in closure #1 in closure #1 in closure #1 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#70x00000001923fd324 in closure #1 in closure #1 in PlaceholderInfo.makeItem(placeholder:seed:) ()
#80x0000000192525784 in thunk for @callee_guaranteed (@in_guaranteed _ViewInputs, @guaranteed @escaping @callee_guaranteed (@in_guaranteed _ViewInputs) -> (@out _ViewOutputs)) -> (@out _ViewOutputs?) ()
#90x00000001926ad49c in closure #1 in closure #1 in _ViewList_Elements.makeOneElement(at:inputs:indirectMap:body:) ()
#100x00000001926b7d58 in partial apply for thunk for @callee_guaranteed (@in_guaranteed _ViewInputs, @guaranteed @escaping @callee_guaranteed (@in_guaranteed _ViewInputs) -> (@out _ViewOutputs)) -> (@out _ViewOutputs?, @unowned Bool) ()
#110x00000001926b1e78 in closure #1 in closure #1 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#120x00000001926b7d94 in partial apply for closure #1 in closure #1 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#130x00000001926b7d58 in partial apply for thunk for @callee_guaranteed (@in_guaranteed _ViewInputs, @guaranteed @escaping @callee_guaranteed (@in_guaranteed _ViewInputs) -> (@out _ViewOutputs)) -> (@out _ViewOutputs?, @unowned Bool) ()
#140x00000001926b1e78 in closure #1 in closure #1 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#150x00000001926b7d94 in partial apply for closure #1 in closure #1 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#160x00000001926b7d58 in partial apply for thunk for @callee_guaranteed (@in_guaranteed _ViewInputs, @guaranteed @escaping @callee_guaranteed (@in_guaranteed _ViewInputs) -> (@out _ViewOutputs)) -> (@out _ViewOutputs?, @unowned Bool) ()
#170x00000001926b1e78 in closure #1 in closure #1 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#180x00000001926b7d94 in partial apply for closure #1 in closure #1 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#190x00000001926afe78 in UnaryElements.makeElements(from:inputs:indirectMap:body:) ()
#200x00000001926b3350 in SubgraphElements.makeElements(from:inputs:indirectMap:body:) ()
#210x00000001926b1d5c in closure #1 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#220x00000001926b1c28 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#230x00000001926b1d5c in closure #1 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#240x00000001926b1c28 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#250x00000001926b1d5c in closure #1 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#260x00000001926b1c28 in ModifiedElements.makeElements(from:inputs:indirectMap:body:) ()
#270x00000001926b3350 in SubgraphElements.makeElements(from:inputs:indirectMap:body:) ()
#280x00000001926ad420 in closure #1 in ViewList_Elements.makeOneElement(at:inputs:indirectMap:body:) ()
#290x00000001923fcedc in closure #1 in PlaceholderInfo.makeItem(placeholder:seed:) ()
#300x00000001923fc984 in PlaceholderInfo.updateValue() ()
#310x00000001920d83e4 in partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init
(:) ()
#320x00000001b30cc194 in AG::Graph::UpdateStack::update() ()
#330x00000001b30cc5c8 in AG::Graph::update_attribute(AG::data::ptrAG::Node, bool) ()
#340x00000001b30d5728 in AG::Subgraph::update(unsigned int) ()
#350x0000000192738af4 in GraphHost.runTransaction() ()
#360x000000019224d780 in ViewGraph.updateOutputs(at:) ()
#370x000000019269604c in closure #1 in ViewRendererHost.render(interval:updateDisplayList:) ()
#380x0000000192695274 in ViewRendererHost.render(interval:updateDisplayList:) ()
#390x000000019214d748 in closure #1 in _UIHostingView.requestImmediateUpdate() ()
#400x0000000192801ec0 in thunk for @escaping @callee_guaranteed () -> () ()
#410x00000001050f3b68 in _dispatch_call_block_and_release ()
#420x00000001050f55f0 in _dispatch_client_callout ()
#430x0000000105104890 in dispatch_main_queue_callback_4CF ()
#440x000000018b9731e4 in CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE ()
#450x000000018b96d3b4 in __CFRunLoopRun ()
#460x000000018b96c4bc in CFRunLoopRunSpecific ()
#470x00000001a23f1820 in GSEventRunModal ()
#480x000000018e310734 in -[UIApplication run] ()
#490x000000018e315e10 in UIApplicationMain ()
#500x00000001926cd32c in closure #1 in KitRendererCommon(
:) ()
#510x00000001926cd2b8 in runApp(
:) ()
#520x0000000192246b08 in static App.main() ()
#530x0000000104c130b4 in static SDWebImageTestCrashApp.$main() ()
#540x0000000104c13154 in main ()
#550x000000018b633e60 in start ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions