Aha…
On ARIES_101v2 android 4.4.2 :
Being build with 3.12, my app freeze the whole device sometimes on the lines:
Size visibleSize = Director::getInstance()->getVisibleSize(); Vec2 origin = Director::getInstance()->getVisibleOrigin(); // actually, on this one, even if another is commented;
After few hours of testing, creating the empty new projects with different cocos2dx versions::
Director * d2 = 0; d2->getVisibleOrigin(); // app nicely closes if build with 3.10; but 3.12 or 3.13.1 - freezes the device.
//by the way, this is absolutely not allowed in c++, so VS-2015 app closes.
this->addChild(0); // app nicely closes if build with 3.10 or 3.12; but 3.13.1- freezes the device.
Looks like:
- I have a bad and ugly device, not suitable for newer Cocos version; (but most apps works ok on it);
- Newer Cocos versions was not tested on ugly, bad devices.
- Maybe someone has turned off some checks, to get faster performance in every next version?
I tried to count, how many times Director::getInstance()
returns null - zero times. Confused.
I will try to make my app more safety, wasting time to adding more checking before using all pointers.