How many dungeon levels are there? What is a typical character level to be of you win? What happens if you took only trees with 3 ranks each and then leveled 15 times? Does the game crash when you level up but all skills are maxed?
The game does not crash. you can actually even not skill up right away when you level up and instead store them up (no idea why you would want to).
You get your full HP back upon leveling, so you can save it for that if the skill you are about to level is not that important (eg. smithing 3 on the way to smithing 4). My character was lvl 14 on moderate, but I played without permadeath and had to reload several times to kill the Lord.
Milaha is correct. I have a level 29 character now and I just have lots of skill points just sitting around doing nothing.