mym0404 / flutter-pencilkit

Flutter plugin for iOS PencilKit
MIT License
47 stars 13 forks source link

PencilKit crashes when adding small taps to screen #22

Closed EricPHassey closed 7 months ago

EricPHassey commented 7 months ago

Description

Not sure what's happening, but I deleted everything but the PencilKit in the example. If I add many small taps/dashes/etc to the screen eventually after 20 or so, it crashes. GPU FPS Pre all seem "good" so not sure what's happening.

I'm using the latest version of the 6th gen iPad Pro 12.9"

I get a "Pencil Kit 9000+ ms" and it freezes.

Steps to reproduce

  1. Add multiple small dashes to screen

Snack or a link to a repository

none

package version

2.0.0

Flutter Doctor Output

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.19.6, on macOS 14.2 23C64 darwin-x64, locale en-US) [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, please use flutter config --android-sdk to update to that location.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3) [✓] Chrome - develop for the web [!] Android Studio (not installed) [✓] IntelliJ IDEA Ultimate Edition (version 2024.1) [✓] IntelliJ IDEA Ultimate Edition (version 2023.3) [✓] Connected device (3 available) [✓] Network resources

! Doctor found issues in 2 categories.

Build type

Debug mode

Device

iPad Readl device

Device model

iPad Pro 12.9" 6th gen

Acknowledgements

Yes

EricPHassey commented 7 months ago

Seems like others have experienced this with PencilKit a few years ago, but apparently not enough to cause too many waves. Just curious if any developers have ran through this issue. Essentially makes this next to unusable on my iPad.

mym0404 commented 7 months ago

This is a View porting package means it works transitively. So if that would be observed in the other situations by not this package, then it should be unrelated to with this package.

EricPHassey commented 7 months ago

This is a View porting package means it works transitively. So if that would be observed in the other situations by not this package, then it should be unrelated to with this package.

I'm certainly not sure if it's happening in other packages. If it was, I would imagine it would be significantly much more complained about it. I saw someone talking about it 3 years ago assuming it got "fixed".

Do any of the developers/users have this issue? I'm just running the example on a 6th gen iPad Pro 12.9".

mym0404 commented 7 months ago

If you think that occurs from this package, can you provide crash log? or not, it seems a problem of PencilKit itself. Also Pencilkit SDK has been changed by iOS Version because it is a dynamic lib.

EricPHassey commented 7 months ago

If you think that occurs from this package, can you provide crash log? or not, it seems a problem of PencilKit itself. Also Pencilkit SDK has been changed by iOS Version because it is a dynamic lib.

The crash logs are all memory based. Very little information about it crashing. No logs from Flutter or anything. How can I update the version of Pencilkit (either newer or older?).

mym0404 commented 7 months ago

you cannot. it is managed by apple in OS

EricPHassey commented 7 months ago

What's making me question things is....Apple's Freeform app works flawlessly and doesn't experience that issue. They're certainly using the PencilKit library and I'm assuming near similar to what you have amazingly have done. Not sure what gives :/

mym0404 commented 7 months ago

Well, I'll investigate more when I free. thank you

EricPHassey commented 7 months ago

Sorry about that. Looks like the issue was actually a weird bug. I turned on "Graphics HUD" on the developer menu in the iPad and think that was causing issues with Flutter for some reason. Shut it off and works flawless now. Will update if I see any issues again.

Can't wait to use this now. Thanks!

mym0404 commented 7 months ago

Good News! I'll add your solution in our troubleshooting guide.