thats not a bug its just not a feature in java
does this also happen with newly created worlds too or just your old ones?
if its only old ones then they are probably corrupted and i dont know how to help with that.
if the newly created worlds also crash then reinstalling minecraft should help.
thanks