marcisme / sketch-preview

Sketch plugin to preview mockups in Skala Preview
MIT License
611 stars 37 forks source link

Crashing with Auto Preview #37

Closed marcisme closed 8 years ago

marcisme commented 8 years ago

Kévin on Twitter reported:

Awesome plugin but since live updates Sketch crash a lot… :(

Can you answer any of the questions below? This will help me reproduce the problem.

marcisme commented 8 years ago

I spent some time trying to reproduce a crash tonight with a Sketch 3.8.3 document. I added tons of layers and artboards, but I was unable to get it to crash.

humanator commented 8 years ago
marcisme commented 8 years ago

@humanator Thanks for the information. This will give me some more test cases to try.

The crash logs would be great too. You can drop them at https://www.dropbox.com/request/6oBfTbiq0OweyS9K8I8c or email them to preview at marcis.me.

kevinbaes commented 8 years ago

Hello @marcisme

I tried the plugin today and unfortunately sketch crash again.

I may have found a partial solution ! :)

After the crash of sketch I consulted the console app and I noticed that the script below was looping while sketch was off:

• 24/06/2016 12:34:11,574 Preview (Sketch Plugin)[1004]: DEBUG: config loaded from: file:///Users/SUPK187/Library/Caches/com.marcisme.sketch-preview/config.plist

• 24/06/2016 12:34:11,581 Preview (Sketch Plugin)[1004]: DEBUG: writing preview image to: /Users/SUPK187/Library/Caches/com.marcisme.sketch-preview/preview.png

• Version 3.8.3 (29802) • OS X Yosemite, version 10.10.5

Thank you for your help

marcisme commented 8 years ago

@humanator I still can't reproduce the crash, but I'll keep trying. For now I've removed document saving from the events that will trigger a preview, and I've released v0.10.1. Let me know if this fixes the issue for you.

@SUPK187 Thanks for the information and the crash log. There were nearly 2000 threads, most of which seemed to be running sketch plugin code, so I must be hitting some kind of leak. The change I mentioned above may help, but I don't know if these are the same issue yet.

marcisme commented 8 years ago

@humanator @SUPK187 I think I've fixed the thread/memory leak issues, and I've released v0.10.2. If you have a chance to try it out, please let me know if it fixes the problem.

kevinbaes commented 8 years ago

@marcisme Great news! I'll test tomorrow and I come to you.

kevinbaes commented 8 years ago

@marcisme I think you've solved the problem. Zero crash today. 👍

marcisme commented 8 years ago

@SUPK187 Awesome! Thanks for your help and feedback.

marcisme commented 8 years ago

@humanator Thanks for the crash reports. Have you tried the latest version? (v0.10.2)

marcisme commented 8 years ago

Thanks for your help with this issue.