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

iOS build OK But I null #220

Closed
zgbilltalent opened this issue Nov 29, 2021 · 10 comments
Closed

iOS build OK But I null #220

zgbilltalent opened this issue Nov 29, 2021 · 10 comments

Comments

@zgbilltalent
Copy link

When I Use the Version of 1.77.0 in my app ,It will crash ,

boost::filesystem::recursive_directory_iterator endIter;
for (boost::filesystem::recursive_directory_iterator iter(p); iter != endIter; iter++) {
if (boost::filesystem::is_directory(*iter)) {
std::cout << "key:EEEEEE " << std::endl;
std::cout << iter->path().string() << std::endl;
std::cout << "key:EEEEEE " << std::endl;
} else {
std::cout << "is a file" << std::endl;
std::cout << "key:EEEEEE " << std::endl;
std::cout << iter->path().string() << std::endl;
std::cout << "key:EEEEEE " << std::endl;
}
}

@mclow mclow transferred this issue from boostorg/boost Nov 29, 2021
@Lastique
Copy link
Member

Can you provide more details? What's the backtrace? What does the filesystem tree look like?

@zgbilltalent
Copy link
Author

What should I do next? Re compile or something with my using way ?

@Lastique
Copy link
Member

I have no idea. You still haven't provided any details. Try debugging the problem on your end.

@zgbilltalent
Copy link
Author

How Can I give you the code ?zip?

@zgbilltalent
Copy link
Author

1638271381699
please Check it pic I upload

@zgbilltalent
Copy link
Author

What shuld I give it to you ?

@zgbilltalent
Copy link
Author

https://github.com/faithfracture/Apple-Boost-BuildScript this is the shell which I used to compile
version 1.77.0

@Lastique
Copy link
Member

From the backtrace it looks like the directory iterator is located at an invalid location (or this is an invalid pointer, which is more likely). This looks like either a compiler bug (miscompiled code) or some sort of ABI mismatch between your code and Boost compiled libraries.

In your Boost build scripts you're defining BOOST_AC_USE_PTHREADS and BOOST_SP_USE_PTHREADS here. Are you defining the same macros when you're compiling your own code? These macros affect ABI of atomic reference counters in smart pointers, including intrusive_ptr that is used in directory_iterator internally, and must be defined (or not defined) consistently when building Boost and your code.

Note that you should not need to define these macros. Boost.SmartPtr should detect an use a better implementation for atomic reference counters.

@zgbilltalent
Copy link
Author

faithfracture/Apple-Boost-BuildScript#50 I think this is the problem

@Lastique
Copy link
Member

Closing as a duplicate of #147 then.

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