Ticket #909 (closed defect: fixed)
Assertion failure on allocating 0 bytes from pool when rendering terrain
| Reported by: | iznogood | Owned by: | |
|---|---|---|---|
| Priority: | Should Have | Milestone: | Alpha 7 |
| Component: | Core engine | Keywords: | |
| Cc: | jan |
Description
Hi. When I start the game I can see the menu, but when I try to start to play on a map I got an error at the end of the loading.
Attachments
Change History
comment:2 Changed 22 months ago by iznogood
Don't worry about the animation or xml file that are not found, they are not the problem.
Obviously an assert in pool_alloc fails. But I can't say why.
comment:4 Changed 22 months ago by Philip
- Summary changed from Crash load to Assertion failure on allocating 0 bytes from pool when rendering terrain
#7 0x08335a67 in pool_alloc (p=0xbfec72e0, size=0) at ../../../source/lib/allocators/pool.cpp:96
The size=0 seems to trigger that assertion failure. Not sure why it's allocating 0 bytes, but I suppose there's no reason why the STL implementation shouldn't be allowed to do that.
I assume the solution is to handle size=0 correctly, i.e. return a unique pointer, by clamping size to 1 or something. Should that clamping happen in pool_alloc, or in RawPoolAllocator, or in pool_allocator?
Note: See
TracTickets for help on using
tickets.
