App crashing when Device::vibrate() call inserted

One of my alpha testers suggested I use vibrate in my working game so I inserted one line of code:

Device::vibrate(0.4); 

in my menu button callback code and I keep getting a:

A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)

error. This appears to be happening in the director after I return from my callback.

In my callback I call pushScene() with a transition but even if I comment this out it still crashes with this SIGSEGV error.

Any ideas?

OK, I had forgotten the VIBRATE permission (it would be nice if we didn’t get a SIGSEV though)

Added:

<uses-permission android:name="android.permission.VIBRATE" />

to the bottom of my AndroidManifest.xml file and this cleared up the problem.

1 Like