no-comment / SlideButton

SwiftUI package that provides a customizable slide button that can be swiped to unlock or perform an action
MIT License
23 stars 6 forks source link

Crash with an EXC_BAD_ACCESS error #8

Open softcleandev opened 2 months ago

softcleandev commented 2 months ago

Hello there!

I've added the SlideButton package to my iOS app project.

import SlideButton
import SwiftUI

struct TestButton: View {
    private let styling = SlideButton.Styling(
        indicatorSize: 60,
        indicatorSpacing: 5,
        indicatorColor: .accentColor,
        backgroundColor: .accentColor.opacity(0.3),
        textColor: .secondary,
        indicatorSystemName: "chevron.right",
        indicatorDisabledSystemName: "xmark",
        textAlignment: .center,
        textFadesOpacity: true,
        textHiddenBehindIndicator: true,
        textShimmers: false
    )

    var body: some View {
        SlideButton("Slide it!", styling: styling, action: {
            print("Nice day for coding, ain't it? Huha")
        })
        .padding()
    }
}

If the button is not used (not sliding) -> nothing happens, but if the button is used, then after a few seconds after several sliding actions the app crashes with "Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)" error.

Also a

suspiciously large function size: 131140 count: 6557

message is logged.

The memory usage of the app is ca. 250 MB, when it crashes.

Xcode: 15.4 runs on MacBook Pro M1 32 GB macOS: 14.4.1 Tested on iPhone 13 Pro with iOS 17.5.1

mikakruschel commented 2 months ago

Hey 👋, unfortunately, I can't reproduce this issue, but we'll gladly accept a PR if you figure it out.