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

"Attempt to use a deleted function thread" error at the Xcode #71

Open
eewano opened this issue Oct 26, 2017 · 8 comments
Open

"Attempt to use a deleted function thread" error at the Xcode #71

eewano opened this issue Oct 26, 2017 · 8 comments

Comments

@eewano
Copy link

eewano commented Oct 26, 2017

I want to play this game at the Xcode 9.0.1 (macOS high sierra)

So, I have tried to build this project and finished to prepare all codes, textures, blocks and fonts.

But, 1 error ocurred.

"Attempt to use a deleted function thread"

The place of thread is

template <class _TSp, class _Fp, class ..._Args, size_t ..._Indices> inline _LIBCPP_INLINE_VISIBILITY void __thread_execute(tuple<_TSp, _Fp, _Args...>& __t, __tuple_indices<_Indices...>) { __invoke(_VSTD::move(_VSTD::get<1>(__t)), _VSTD::move(_VSTD::get<_Indices>(__t))...); }

The location of this error is below.

__invoke(_VSTD::move(_VSTD::get<1>(__t)), _VSTD::move(_VSTD::get<_Indices>(__t))...);

Did anyone encounter a same error like it ?

I have no idea how to solve this...
If it is good, please give me some advices.

@IridescentRose
Copy link
Contributor

IridescentRose commented Oct 26, 2017

I wouldn't know because I don't use XCode. MacOSX is only confirmed working using homebrew and the make file.

AD-Vega/rtl-power-fftw#9

@bypie5
Copy link

bypie5 commented Oct 27, 2017

I tried to compile the game on my Mac Mini (Sierra). I used homebrew to install sfml, glew and glm however I was still getting errors. I stumbled upon this solution on Stack Overflow. It might help you out.

@eewano
Copy link
Author

eewano commented Oct 27, 2017

NT-Bourgeois-Iridescence-Technologies
bypie5

Thank for your replies.
I installed sfml, glew and glm using homebrew, too.
So I'll check the Stack Overflow. If I could solve this error, I'll report a detail soon.

@IridescentRose
Copy link
Contributor

Also, sometimes homebrew messes up symlinks to libjpeg, libpng, libgif, and others... so if you get that error use: https://stackoverflow.com/questions/17643509/conflict-between-dynamic-linking-priority-in-osx/35070568#35070568

@eewano
Copy link
Author

eewano commented Oct 28, 2017

NT-Bourgeois-Iridescence-Technologies

I tried to change the link. But error didn't disappear.

I've checked all codes that might be related this error. So, 1 sentence was a mistake...
In the "PlayingState.cpp" line 28,

The correct is
m_tickThread = std::make_unique<std::thread>(std::bind(&TickManager::run, m_tickManager.get()));

My code was
m_tickThread = std::make_unique<std::thread>(std::bind(&TickManager::run, m_tickManager.get_deleter()));

I've used "get_deleter()" function. So, I solved this error of fixing this line.

It was my mistake. I'm so sorry...
Thank for your kindness.

@IridescentRose
Copy link
Contributor

Its fine, I need to catch up on some of the newer C++11+ stuffs too.

@eewano
Copy link
Author

eewano commented Nov 1, 2017

NT-Bourgeois-Iridescence-Technologies

sshot

I could build successfully this project in Xcode 9.0.1. (mac os High Sierra)
But now, Texts and FPS aren't drawn in display. So, if I won't be able to solve this problem, I will request some issue again.

Thanks.

@DreamHollow
Copy link
Contributor

I didn't get a chance to see the SFML FPS counter in action, but it looks as if it was commented out with a lot of SFML features on the master branch.
The program still outputs the relative FPS, but it uses console and doesn't explain that it's showing the user the FPS.

(I realize this thread is ancient but I still wanted to point this out.)

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

4 participants