AutoDrone
AutoDrone copied to clipboard
error crash
i dont know how to use visual studio and cmake
other project work
but on this project when reach gen (20 - 60) error appear
Unhandled exception at 0x00007FFD1CEC1D50 (msvcp140d.dll) in AutoDrone.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
Hi!
The same happened on my machine. The reason is ExecutionGroup::notifyWorkerDone(). I know it's not exactly like it is defined in the pattern for mutexes, but after the following change the problem disappeared.
swarm.hpp line 143 void notifyWorkerDone() { { std::lock_guardstd::mutex lg(m_condition_mutex); ++m_done_count; m_condition.notify_one(); } }
It seems like a race condition when m_done_count reaches m_group_size the wait statement in line 155 sometimes seems to stop waiting before m_condition.notify_one() is done. I'm not deep enough into all the code yet. Maybe you could place the notify before increasing the count. I'm mostly interested in the code for neural nets and don't want to spend more time with thread synchronization.
Many Greetings! Remo