Registered Member
|
My whole code is here: https://github.com/alkamid/QCLD/blob/ma ... ce/QCL.cpp
Line #591 reads:
It works fine on Linux, compiled with g++ 4.7.2. However, on Windows (mingw gcc 4.7.1), I get an error on that line. The debugger says:
Then, a window appears with "QCLD.exe has stopped working. Windows is checking for a solution to the problem", i.e. I get a segmentation fault. Any idea what may cause this error? |
Moderator
|
I guess this is a problem of non aligned stack. Could you try with the devel branch, I fixed a similar issue yesterday.
|
Registered Member
|
Same thing happens:
|
Moderator
|
hm, it seems your matrix is pretty big: 72 x 4420255. Is it the expected dimension? Does it fail with a smaller problem?
|
Registered Member
|
That's strange. POISSON_M.size() = 751x751 = 564001 and DENSITY_VECTOR.size() = 751. |
Moderator
|
Yes, there must be some memory errors. You could first check that the linux version is not hiding memory problem using valgrind, and then try with a similar tool on the windows version (http://stackoverflow.com/questions/4134 ... or-windows)
|
Registered Member
|
Valgrind says:
Is it possible that on Windows there are memory leaks nevertheless? |
Moderator
|
I'm not thinking about memory leaks, but not initialized variable or out-of-bound access and the likes because the matrix dimensions seems to go wrong...
|
Registered Member
|
Is there a way I could check this with valgrind?
|
Moderator
|
yes, valgrind does this kind of checks, however, the memory issue might only show up on windows so you need a similar tool as valgrind for windows (see previous link).
|
Registered Member
|
I tried another version of mingw32-gcc (4.8.1) and it works fine now. Possibly a bug in the old compiler?
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]