It's caused by `FileUtils::getContents` is invoked in different threads and we use EventDispatcher::dispatchCustomEvent in `FileUtilsAndroid::getContents` to send an event to EngineDataManager.
Since EngineDataManager class is only for internal use and EventDispatcher isn't thread-safe, we make `EngineDataManager::onBeforeReadFile` public and invoke it `FileUtilsAndroid::getContents`.
* remove APP_SHORT_COMMANDS setting (#17722)
some developers report it will cause error on Windows though i can not reproduce it. It is strange, the setting is used to resolve command length limitation on Windows.
* Particle font size should be a const value (#17676)
* Particle font size should be a const value
* Minor fix: CCStencilStateManager.hpp -> CCStencilStateManager.h in xcode project.
* JSB SocketIO.connect supports to pass a CA cert file (#17736)
* JSB SocketIO.connect supports to pass a CA cert file
* The second parameter of SocketIO.connect function is probably a `option` object. JSB just ignores it.
* The optimization for huawei. (#17832)
* The optimization for huawei.
* setAnimationInterval fix for all platforms.
* disable debug
* include fix.
* Uses better configuration for huawei optimization (#17838)
* Uses better configuration for huawei optimization
* Updates jar file and uncomment fps controlling code
* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17840)
* update release not and version (#17845)
* [android] Removes an unused variable sRegistered in Cocos2dxActvity.java. (#17861)
* Updates jar to resolve warning while packaging APK file. (#17863)
* update release date (#17870)
* fix compiling error
* Changing CCAsyncTaskPool and CCScheduler to better leverage move semantics, to avoid several lambda copy constructor calls. Chaning call sites in the cocos engine to better leverage move semantics.
* Editing binding generator to not generate bindings for AsyncTaskPool::enqueue. Bindings were not previously generated for this function due to it's type signature involving a template parameter.
* Adding missing std::move call in AsyncTaskPool to skip a copy constructor call.
* fix reschedule issue
* correct code formatting
* Fix isScheduled
* improve a bit performance of executing functions in cocos thread
* added test to verify reschedule issue
* re-init timer in schedule if timer exists and alive
* Added function for calculating md5 hash from Data.
getFileMD5Hash now use getDataMD5Hash.
For example, AssetsManagerEx VerifyCallback.
Get Data from file, check equal size, if equal to get md5 hash.
* Data::isNull check size equal 0
* Build on linux and android.
* Adds libmd5-rfc library since the functions in <openssl/md5.h> aren’t exported in win10, plus <openssl/md5.h> seems to be private header.
* Adds libmd5-rfc library for win32 and win10.
* Removes json/msinttypes folder from xcode since it’s only needed for win32 | win10.
* Should not use fread to read file from assets, uses FileUtils::getDataFromFile instead.
* Client socket should not be closed immediatelly after ::send. Otherwise, sever may will receive “Connection reset by peer - Errno 104” error on some platforms. It could be 100% reproduced on Android.
* [libcocos2d.vcxproj, libcocos2d.vcxproj.filters] Removed entries for non-existent files that were causing "Build is out of date" issues in Visual Studio
[project.pbxproj] Removed entries for non-existent file
* [libcocos2d.vcxproj.filters] Renamed CCStencilStateManager.h extension to .hpp.
* [libcocos2d.vcxproj, libcocos2d.vcxproj.filters] Removed entry for file CCDownloaderImpl.h which does not exist.
* Changed extension of CCStencilStateManager.hpp to .h
If the delta time dt passed to cocos2d::Timer::update(float) is longer than the
interval of the timer, then the timer will be triggered several times even if
the selector is unscheduled during the call.
This commit adds a flag in cocos2d::Timer stop the update loop if the selector
has been unscheduled.
* 17357: Better encapsulate the definition of mouse buttons
Move definition of buttons from a list of #define's to an enum class and
make appropriate updates for successful compilation.
* 17357: Better encapsulate the definition of mouse buttons
Updates from code review:
* Removed changes to automatically generated files
* Removed std::ostream& convenience operator
* 17357: Fix mouse tests
* Fix various compilation issues.
Mostly errors on field initialization order but also missing files
in CMakeLists and missing include directives.
* Fix compilations issues with GCC 6.2
* Fix gitignore libs/ entry to not ignore the Android external libraries.
* Add EventDispatcher#hasEventListener (sync from creator)
* Fix function wrapper using js object during its gc
* Support more system languages
* Direct log/error for better understanding problems & add sys.now
* Synchronize Editbox APIs
* Synchronize Scheduler.PRIORITY_NON_SYSTEM const
* Upgrade web engine
* Upgrade test cases
* Manually bind EventDispatcher::addCustomEventListener to avoid memory issue
* Manual bind EventListeners’ create to avoid memory issue
* Fix compilation issue when COCOS_DEBUG = 2
* Unify function name of Texture2D::releaseTexture
* Fix compilation issues and update web & bindings-generator
* Fix lua compilation issue
* Use %ld instead of %zd
* Fixing issue where Scheduler::unscheduleAll() would not unschedule functions scheduled with Scheduler::performFunctionInCocosThread.
* Removing clear of _functionsToPerform from unscheduleAll, based on code review feedback. Adding a function removeAllFunctionsToBePerfomedInCocosThread, which will remove all pending functions scheduled with performFunctionOnCocosThread.
* Adding test case for Scheduler::removeAllFunctionsToBePerformedInCocosThread
* Adding proper cleanup code to Scheduler test for SchedulerRemoveAllFunctionsToBePerformedInCocosThread
* initialize Director::_invalid on first init
* fix: Setting the GLView should be done after creating the RootViewController
* restore 2016 copyright on templates/cpp-template-default/proj.ios_mac/ios/AppController
* remove old iOS js and lua templates
* copy actual iOS templates from cpp to js and lua
* Added -Wno-unused-parameter and removed all uses of the CC_UNUSED_PARAM macro
* Commented unused parameter names in .cpp files which previously used CC_UNUSED_PARAM
* Reverted -Wno-unused-param flag.
Moved deprecated touch methods definitions to .cpp file.
Commented more unused parameter names.
* Fixed some errors and warnings caused by the previous commit.
* Commented remaining unused parameter names in .cpp files.
* Fixed unused parameter warnings in headers.
* Fixed some more unused parameter warnings.
* Fixed some more unused parameters warnings.
* Fixed mistake in previous commit, missing ComAudioReader:: in method. Other warnings.
* Fixed build errors.
* Added missing file to CMakeLists