Appinventor crashes my phone when tinydb stores image

Hey, i'm doing a project for college using appinventor and my app opens the users phone camera and takes a picture to then set the avatar as that picture when he taps on the avatar icon.
When I use my phone to test the app and click the button with the image it works fine. But when i click the check mark to validate the photo, the app closes and the connection resets.
It's my first time using tinydb, am I doing something wrong?

Hello Gabriel

Well, you cannot save an image in TinyDb, in image format. What you can do is convert the Image to Base64 which is a text representation that can be saved in TinyDb and can be converted back to the original image format on retrieval from TinyDb. However, a further snag is that TinyDb may lag if it becomes very large. The only way to see if it is suitable for your Project is to test it.

Base64 extension:

what exactly means "when i click the check mark to validate the photo"?
can you elaborate?

it is perfectly fine to store the path to the taken image in TinyDB...
the only thing which looks strange is your valueIfTagNotThere of 123... this value does not make sense and should be an empty text block
and there should be some blocks to display the taken image again next time after starting your app... usually during Screen.Initialize... did you think about that?


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

I tested your blocks, as shown, no crashes for me. What other blocks/code/setup do you have that may be causing the issue?