The game has always randomly crashed, but it's usually an hour or two into playing when it happens. 40 minutes isn't long, obviously. Can't say for sure what's causing it, but I can suggest some things.
Delete cache files and thumbnails before or after playing at least every few sessions. And save frequently while playing.
Make sure your graphics card drivers are up to date.
See if the crashing is specific to the family you are playing. Sadly that can happen. If you play other families and the game doesn't crash, you'll want to avoid that family or maybe replace the neighborhood with a clean one so you can start fresh. Personally I would use SimPe and batbox to delete the offending Sims, but obviously not everyone uses third party programs. (I recently had a Sim that was causing my game to crash and that's what I did to him.)
Go into a lot, into graphics settings, and turn off shadows. This shouldn't be an issue, because shadows is something they fixed with this game (they had to be off for me in UC), but you never know.