yosoyubik / canvas

Peer-to-peer paint app for Urbit
MIT License
142 stars 9 forks source link

bail:meme when clicking "Save Image" #6

Closed siblex-pocnet closed 4 years ago

siblex-pocnet commented 4 years ago

Not sure if this is similar to #5, but my Urbit instance is crashing back to the command line when clicking on the "Save Image" button. It could also be something I've done, so apologies in advance if that turns out to be the case.

Steps:

  1. Go to ~canvas in landscape and select my "testing canvas"
  2. Draw a bit
  3. Click "Save Image"
  4. I'll see the "Saving.." indicator in landscape spin and I'll see http working in the dojo.
  5. After a few minutes, Urbit crashes with the following output:
siblex-pocnet:dojo> allocate: reclaim: half of 1750 entries
allocate: reclaim: half of 875 entries
allocate: reclaim: half of 437 entries
allocate: reclaim: half of 218 entries
allocate: reclaim: half of 109 entries
allocate: reclaim: half of 54 entries
allocate: reclaim: half of 27 entries
allocate: reclaim: half of 13 entries
allocate: reclaim: half of 6 entries
allocate: reclaim: half of 3 entries
allocate: reclaim: half of 1 entries
allocate: reclaim: memo cache: empty

bail: meme
bailing out
pier: work error: end of file
pier: work exit: status 0, signal 6

When I restart my Urbit instance, the canvas actually saves correctly with the changes made before the crash. I haven't noticed any other side effects.

Any thoughts? Thanks for your help!

yosoyubik commented 4 years ago

Thanks for reporting this!

Couple of questions:

Just a comment because it might not me clear: the "save image" feature exports the image as an svg/png file that will be stored on your urbit. That's needed only when you want to share it in chat. In reality, there's no need to do anything to save the drawing, that happens automatically after each stroke.

I'm going to guess that you are saving an image on the Freehand canvas (I think the mesh says "export image") If you've made a big enough drawing, there might be some issues with that. I've made a "custom" chunking to avoid sending a file too big for the JSON parser to handle, but it could be clay struggling to save something that's too big.

I'd recommend not to use the export/save feature until Ford Fusion is released.

PS: I'm planning to add support for S3 storage. That would fix any issues with saving files, although it requires to have an S3 bucket set up.

siblex-pocnet commented 4 years ago

Thanks for the response, it's a really impressive project!

No worries on not using save/export... I was honestly just going through and trying to do everything the app let me, draw what I could, and hit all the buttons available to me.

For your questions:

I just realized my base hash isn't matching too, so that could be part of the issue. I think I'll close this for now since it sounds like the feature will change and my setup is suspect anyways.

Thanks again for your work, great project!