I just got this:
alias set_filename_of_bitmap initialize
# Associate the bitmap with the filename of the graphic; empty string otherwise
@filename = args.size == 1 ? File.basename(args, '.*') : ''
set_filename_of_bitmap(*args) # <---------- this line
I've done easily over a 100-150 map switches before this happened so I'm not sure how you could reproduce it. In any case, I definitely think it's some sort of edge case.
EDIT: I found another issue. I have a map about 40x40-50x50 and it's filled with autotiles. When I'm in the upper half, it's all fine, but while I'm in the lower half of the map, it lags a lot. The FPS probably drops to 10 or so.
EDIT: I also just found a crash, but at least I have a 100% reproduction rate. I don't really know why it happens, but it happens basically as soon as the carpet autotile gets out of focus. I'll PM you my build so you can investigate.