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

double free or corruption (out) #3

Closed
Guoc0529 opened this issue Apr 12, 2024 · 7 comments
Closed

double free or corruption (out) #3

Guoc0529 opened this issue Apr 12, 2024 · 7 comments

Comments

@Guoc0529
Copy link

“Bro, I successfully compiled RIVER and RIS-CALIB in Docker, but encountered the same issue for both: 'double free or corruption (out)'. Hope you can provide some guidance!”
2024-04-12 14-25-27屏幕截图

@Unsigned-Long
Copy link
Owner

Can you point out the specific location of this error? I saw a warning above the error message in the picture that shouldn't appear: "Framebuffer with requested attributes not available, Using available framebuffer...". This warning does not come from our library.

I searched and found that it comes from the visualization library Pangolin. And this problem is also explained in its readme. Hope this helps!

image

@Guoc0529
Copy link
Author

I've identified that the error occurred here
Uploading 2024-04-12 17-09-06屏幕截图.png…

@Guoc0529
Copy link
Author

image
I've identified that the error occurred here

@Unsigned-Long
Copy link
Owner

This doesn't seem to make sense. We don't have any problems with our computer at all. What do you think is the problem? 😭

@YXT-yang
Copy link

"Hi bro, I had a similar problem once. I solved the problem by modifying the CMakeLists.txt file. Modify lines 10 and 11 as follows:"
Before modification

set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=native")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native")

After modification

set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")

@Guoc0529
Copy link
Author

“嗨兄弟,我曾经遇到过类似的问题。我通过修改CMakeLists.txt文件解决了该问题。修改第10行和第11行如下:” 修改前

set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=native")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native")

修改后

set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")

Bro, you're really talented!"

@Unsigned-Long
Copy link
Owner

Awesome, problem solved 😃 .

The -march=native option in GCC compiler is used to automatically set compilation flags based on the features supported by your CPU. If you're using an Intel or AMD CPU and a GCC version 4.2.3 or higher, it's recommended to use -march=native.

This option adjusts the compilation settings according to your CPU architecture and instruction set extensions, optimizing the generated machine code. It selects the best instruction set based on your CPU's capabilities, which can improve program performance.

In summary, -march=native is a convenient option that automatically optimizes compilation results based on your hardware environment .

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

3 participants