-
Notifications
You must be signed in to change notification settings - Fork 322
ScratchJr crashes when exporting a project #241
Comments
Hi @chrisgarrity , since those resources are saved in files on user devices, how about rewrite the compress functionality with native methods (ie: iOS writing with OC and Android with java) ? |
@yueyuzhao that's probably the approach that we'd take. However, it would be good to confirm that the crash is due to running out of resources by causing it while debugging. Right now, it's still just our best guess. |
This is also related to #31 . I'm working on this and here is the approach :
|
Hi @chrisgarrity , one more thing: if we switch zip to native code, we also need switch unzip to native code. |
@yueyuzhao that sounds like a good approach. Does it make sense to have a step remove the temp folder as well? |
Good question! The temp folder will be removed right after the zip file is created and the zip files shall be removed before creating a new one. Another approach is we can remove the zip file after sharing done. But on one hand, on Android we will not be notified when sharing is done, on the other hand, if the user kill the app before sharing, we will lost the opportunity to clean it up. |
Related to #140
Exporting a project requires duplicating all the resources to generate the zip (.sjr) file. If they run out of resources (memory or storage) the app crashes. Happens frequently with projects containing many sound recordings.
The text was updated successfully, but these errors were encountered: