Anvil Community Forum

Bug report: IDE/app crash caused by adding several images to form

Hi everyone,

This is the second time within a short timespan of a month that I encounter a highly critical bug.
Because of this bug, I am unable to continue working on an app I’m developing. This causes me to lose highly valuable time and money. I don’t feel like rebuilding the entire app in another framework or language.

Whenever I change something in the code or in the editor, the app crashes. Also, my changes are not being saved when I save/commit. I cloned the application and received the same errors. In Safari I don’t get any error messages at all, except from the browser itself which indicates that it uses huge amounts of memory. In Brave I usually don’t get an error message, but when I do it indicates that I’m working on a different version of the app. There’s also a schema mismatch, another bug which I am unable to solve (even when creating and merging branches as suggested, but I found a workaround for it so for now it’s fine), which I described here: Critical error report! resulting in data loss - #5 by gabriel.duro.s.

This is what I see when running the app (Both Safari and Brave):

Sometimes, although rarely, I receive this error message (In Brave only):
You’re viewing an old version of the app - you shouldn’t be able to edit it! This page will now refresh.

And then after that, this error shows:

And this:

Do you mean the IDE crashes or the app you are working on that is running on a split or a separate window?

Often when the beta editor refuses to save, it’s enough to checkout another branch and go back to the development branch.

Have you tried editing other branches?

PS: I wouldn’t consider the other bug a critical one. Usability issues like that are the price to pay if you want to work with the beta version of any software :slight_smile:

1 Like

Both the app and the IDE crash. As shown in the screenshots, I either get no output, or a weird sequence of error messages.

Checking out other branches, (commiting on them) and switching back, doesn’t help.

It doesn’t only happen in the Beta version, I don’t know where that assumption comes from. The reason I’m calling it critical is because it results in data loss, time loss, financial loss, loads of frustration, and because it’s such a fundamental issue. I am currently unable to continue working on the app as my progress is never saved, and because the app keeps crashing! FYI, I’m not new to Anvil, I’ve built apps before with it. I know how it’s supposed to look when it does actually work.

It feels like there’s absolutely nothing I can do, sometimes it even crashes when I create a new branch.

I work in Chrome on Windows, and I have only seen this type of problems after pushing a commit from my computer. Checking out the branch always fixes it for me.

Have you tried checking out an old branch

Does this mean that it works after checking out an older branch?
And it stops working after checking out the development branch?

If this is the case, then you should be able to reset the development branch back one commit and test, two commits and test, etc, until you find the last commit that works.

Then look at the diff and figure out what broke it.

Does this mean that it works after checking out an older branch?
And it stops working after checking out the development branch?

It’s getting more and more interesting. This is what happens now when I switch back to an older branch:

Thanks for the tips but I’m actually trying to solve this problem by the core rather than using ugly workarounds. I’m trying to help this community and the developers of this platform by providing info, I’m even willing to sit down with the devs to try to reproduce it and discuss it.

For now I’ll try to work my way around the git error so I can revert the branch back to an old commit that worked as you suggested, I know which commit caused it, but this is far from the optimal solution. I also made a clone of the corrupted app as a reference for the devs.

1 Like

Update: I created a new branch from the commit before the one that caused the crash. All went fine, I was able to edit and save it. But then I encountered the error again, which I guess is good news because now I know how to reproduce it. It seems like the error comes from placing too many images in a form, in my case at around 10-12 images. So then when it was corrupted again, nothing helped, even when going back to a previous commit from that same brach which was fine, with around 5 images. The only way to get it working again is by recreating yet another branch from the commit before the one that caused the crash (as I described in the first sentence of this post).

Edit: It worked fine for a while but the errors came back again. They appear less frequently although it’s still annoying as hell. Anvil appeared to be a dream at first, but it quickly turned into a nightmare, especially when you lose days worth of work while being under pressure to pay for rent.

Update: It seems that the errors are only caused when editing a specific form. After hours of experimentation, it does really appear that the amount of images I add to the form correlates with the amount of errors I receive (I know right? Can you believe it?). Also, it is important to note that both editing the code or changing properties in the design panel cause the errors. It also appears to help to initiate the source of images in the code rather than hardcoding them in the design panel. Even though I found a workaround for it that enables me to continue working, I still think it’s a critical bug since there is data time/money loss at risk and it can cause loads of frustration when an appropriate error message is lacking.

I have read in the forum that adding large images on forms causes the app to increase in size to the point that it becomes unusable. Perhaps you stumbled on the same problem.

I have hundreds of apps and I have never added an image in a form.

I have one app with a few small images like logos in the assets and I use it as my server for static images. For example all the other apps use the url of that logo as the favicon.

All the apps that need larger images load them from a table. I didn’t decide to use a table to store images because of this problem, I didn’t even know about this problem. I do it because it’s easier to maintain. Often I use the uplink to upload the images, so it’s all managed by scripts. Embedding images in the form would require manual intervention.

If your images never change, you could upload them to a table, look at their url and hard code it.
If the images could change, then you could call a server function that returns a list with the images that you need (or their urls).


As @stefano.menci mentioned, Images are likely the issue. Something like that happened with me as well but in the Classic Editor.

To check if images and other assets are the cause behind it, just check the size of your .yaml file by downloading it. It’s best to keep it under 5MB.

Thank you for this detailed report and following up as you learn more about what is going on. I changed the title of your post to make it more informative.

I’m hearing that you have been feeling beyond exasperated and stressed by your encounter with this issue.


Hi, @mideruit, could you provide a clone link to a version of the app with the errors, so we can take a closer look?

1 Like

Yes, I will send it in a PM.