Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

free(): invalid next size (normal) #12

Closed
OrcunCanDeniz opened this issue Jan 3, 2022 · 2 comments
Closed

free(): invalid next size (normal) #12

OrcunCanDeniz opened this issue Jan 3, 2022 · 2 comments

Comments

@OrcunCanDeniz
Copy link

I observed that infer() function ends succesfully, however any of the parts coming after the execution of the infer() cant execute because of the error free(): invalid next size (normal). When I ran valgrind ;

valgrind: m_mallocfree.c:307 (get_bszB_as_is): Assertion 'bszB_lo == bszB_hi' failed. valgrind: Heap block lo/hi size mismatch: lo = 24002528, hi = 3181631744. This is probably caused by your program erroneously writing past the end of a heap block and corrupting heap metadata. If you fix any invalid writes reported by Memcheck, this assertion failure will probably go away. Please try that before reporting this as a bug.

@zhangtingyu11
Copy link

I run the program with the pcd file provided by the author,and it runs with no error.But when I run the program with my own pcd files, the error occurs.Then I debug the program with gdb,and I found that when the infer() ends, the samplesCommon::BufferManager buffers will destruct automatically,and the class member mManagedBuffers in buffers will destruct too.This causes the hostBuffer and deviceBuffer destruct, and they call their template destructor.And the error occurs when the hostBuffer automatically destruct,so I search where the program changes the hostbuffer,and I find that the function preprocess() use the multi-threading.So I think the multi-threading disrupt the buffer.I simply change the function PreprocessWorker() in preprocess.cpp from thread to process, and it works for me.

@OrcunCanDeniz
Copy link
Author

Yeah, i also "unthreaded" the preprocess and now it works. But interestingly, PreProcess Time: decreased to the half of the threaded preprocess. Did you notice such thing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants