Closed GoogleCodeExporter closed 9 years ago
The AccessViolationException is likely because of misaligned btVector3
allocations. SSE instructions require that data be aligned to 16 bytes. I've
added code to make sure the allocations are correct in r628. Can you try it?
Original comment by andres.traks
on 6 May 2014 at 4:17
This is related to issue #44.
Original comment by andres.traks
on 6 May 2014 at 5:21
You're really on top of things, aren't you? I don't regret having chosen
BulletSharp at all.
However, it's not fixed quite yet.
If I comment out line 261 of CollisionShape.cpp ('delete tTemp;') it runs fine,
but that of course introduces a memory leak. Replacing it with
'ALIGNED_FREE(tTemp);' fixes it as well, but whether that's proper use of the
macro is beyond me.
Original comment by shiny....@gmail.com
on 6 May 2014 at 5:54
Yep, ALIGNED_NEW needs to match ALIGNED_FREE and "new" needs to match "delete".
Fixed in r629.
ALIGNED_NEW allocates a larger "smart" block of memory to make sure that data
can be put on a 16-byte memory boundary. ALIGNED_FREE knows how to delete such
a block.
Blocks allocated with "new" often just happen to be aligned and won't cause a
crash in SSE code. So it's hard to say when ALIGNED_NEW/ALIGNED_FREE is
necessary. It's also a little slower than the simple new/delete. Now all
allocations are aligned just in case.
Original comment by andres.traks
on 6 May 2014 at 8:13
r629 is working flawlessly on my end.
Original comment by shiny....@gmail.com
on 7 May 2014 at 12:29
Cool. Thanks!
Original comment by andres.traks
on 7 May 2014 at 7:00
Original issue reported on code.google.com by
shiny....@gmail.com
on 3 May 2014 at 8:55Attachments: