Registered Member
|
I was getting repeated "access violation reading 0x0000000000000000", but when I checked it was clear it wasn't actually trying to read 0 at all. Instead it seems like a MOVAPS instruction isn't getting aligned properly.
See the following disassembly:
The error is always on the movaps instruction, which I believe needs a 16 byte aligned pointer. However, rax = 0x00000000001B9FD8. I'm using the latest eigen from Mercurial. Am I doing something stupid, or is this a bug? Thanks, Tom |
Moderator
|
Have you tried your program in debug mode ? if not please do, and you will likely get this assertion:
[...] && "this assertion is explained here: http://eigen.tuxfamily.org/dox/Unaligne ... ssert.html READ THIS WEB PAGE !!! ****"' failed. So please have a look at this page: http://eigen.tuxfamily.org/api/Unaligne ... ssert.html If you still have this problem, then get back to us with more details (e.g., the piece of your responsible for that crash) |
Registered Member
|
That was in debug mode. And there was no assert triggered. (And I checked that ei_assert is indeed getting defined.)
The line triggering the error is:
where the types are as follows:
They're all local variables (not array members or anything). And I get the same error with both ICC and VC2008. |
Registered Member
|
Interestingly, if I rewrite the line as:
then it works fine. |
Moderator
|
indeed, a hit a very bad bug in Eigen.
a simpler code to reproduce it is:
I'll see what I can do when I'll have time... |
Moderator
|
hm... actually the problem is that you have:
A = B * A; where the size of B*A is different that A, and so Eigen first resize A, and then evaluate B * A into a temporary object T, and then does A = T. So actually we have to find a way to delay the resizing that might not be so trivial to implement... |
Registered Member
|
Ahha. Strangely I do get an assert (on the assignment) from the following very similar code:
where again:
(which again should work fine in theory). |
Moderator
|
problem fixed in both the devel and stable branches
(not tested with MSVC yet) |
Registered Member
|
Great thanks. Will test it when I get the chance.
|
Registered Member
|
FYI: I've tested your fix (Rev 1271, default) by cdash testbatch in my MSVC-setup:
Some Warning, no Errors, every test successfull. Thank you very much! |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]