Vibration crashes, causes (?) lags when activating an app's top menu

REPRODUCIBILITY: happens reliably after using the phone for a while after a reboot
OS VERSION: 5.0.0.21
HARDWARE: c2
UI LANGUAGE: English
REGRESSION:

DESCRIPTION:

After using the phone for a while, vibration (e.g. when typing, when activating an option in the top menu) seems to crash. At the same time (?) newly started apps appear stuck for ca 10 secs after activating an option in the top menu. Subsequent activations show no delay. Right after a reboot vibration works and these delays do not happen.

PRECONDITIONS:

The device has not been rebooted recently.

STEPS TO REPRODUCE:

  1. Reboot
  2. Use the phone for a while
  3. start an app
  4. activate an option in the app’s top menu

EXPECTED RESULT:

the phone vibrates and the option is selected, no delay

ACTUAL RESULT:

the app is stuck for ca 10 seconds

MODIFICATIONS:

no modifications

ADDITIONAL INFORMATION:

8 Likes

Also reported here:

As mentioned there, journal has this:

file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:523  file:///usr/lib64/qt5/qml/Sailfish/Silica/private/P
ulleyMenuBase.qml:523: TypeError: Cannot call method 'earlyClick' of null

This appears to affect every (Silica) application, exactly once after it has been started.

Once the freeze is over, the app continues to work normally, including pulleys and page transitions.

1 Like

Added some debug prints to PulleyMenuBase:

102     property bool quickSelect
103
104     onMenuItemChanged: {
105             console.assert(menuItem !== null, "MenuItem is null")
106             console.assert(menuItem === null, "menuItem not null: " + menuItem.objectName)
107     }
108
109     property real _inactiveHeight       // Height to show when the menu is inactive

gives (while the app is frozen):

file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:106  menuItem not null:
onMenuItemChanged (file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:106)
_highlightMenuItem (file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:374)
onMenuContentYChanged (file:///usr/lib64/qt5/qml/Sailfish/Silica/PullDownMenu.qml:153)
file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:105  MenuItem is null
onMenuItemChanged (file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:105)
onActiveChanged (file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:270)
_forceReposition (file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:688)
close (file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:440)
onVisibleChanged (file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:235)
file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:106  file:///usr/lib64/qt5/qml/Sailfish/Silica/private/P
ulleyMenuBase.qml:106: TypeError: Cannot read property 'objectName' of null

file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:528  file:///usr/lib64/qt5/qml/Sailfish/Silica/private/P
ulleyMenuBase.qml:528: TypeError: Cannot call method 'earlyClick' of null

It seems to coincide with process ngfd hugging one processor at 100%, killing that (with -9) causes everything to work normally and smoothly except vibrations/tactile feedback being gone until restart

1 Like

Can confirm. I also had a phone stuck on constant vibration when SMS arrived as the screen was off. When I pressed the button to wake it up, it stopped and I got notification that SMS arrived. Happened only twice so far as I was sending/receiving some messages.

1 Like

Seems to be mostly when more than one app is running.

Funny, I just came across this bass from the past.

Last updated 2015 :smiley:

If ngfd is stuck, the app’s first attempt to use it will make the app also stuck until d-bus timeout.

I made some changes there to avoid app getting stuck: Avoid blocking d-bus by pvuorela ¡ Pull Request #10 ¡ sailfishos/libngf-qt ¡ GitHub

Though the root problem in ngfd remains. So far I haven’t been able to trigger that myself. Backtraces welcome if anyone is able to get it stuck or running at 100%.

3 Likes

Not a professional coder here :confused:. Can you please give us a CLI command for that?

BTW: Thx for a improvement PR.

Getting backtraces is a bit more coder oriented, though per se doesn’t require that much coding abilities.

Requires first gdb, mentioned there for example:

After that I’d check the pid of ngfd and do ‘gdb -p <the_pid>’, in gdb ‘thread apply all bt’ followed by lots of stuff. There should be some hints about installing debugging symbols which will enhance the output, not all are needed but the ngfd related ones should be the most important.

2 Likes

Hello @pvuorela , I got backtraces of ngfd being stuck, but was never able to reproduce at will, or understand what caused the wait condition, see [4.1.0.23][4.0.1.48][4.4.0.64][4.5.0.16] No notification sounds (ringing, SMS, alarm) - #42 by dcaliste

1 Like

As also someone on the c2 feedback feed has written, time seems to have solved this issue. While it happened all the time during the first two days of admittedly heavy use, I have not had this problem for three days of normal use now. As if something has settled down?

If you search the forum for ngfd, you will find that one of the ways it can get stuck is when/after/by playing certain .ogg files from the default sound sets.

If the offending one is by chance not being played it may explain why the issue is sometimes there, sometimes not.

For context, follow dcaliste’s link.

Too early, it just happened again. No idea what I did differently now. Result is the same: no vibration and every newly started app hangs when the top menu is activated.

Often, after using Android apps, the pulley menu of native apps freezes and the entire app freezes. Ringtones and notification sounds are also muted. A reboot or killing ngfd process helps.

One workaround that we just shared @ Helsinki support session is to disable some common vibra places. So from Settings → Sounds and feedback

For the top Vibration combo box select “Never”

Disable “Touch screen vibration” from “Feedback” section.

2 Likes

Thanks for the link. Looks like gstreamer internal handling of its audio pipeline. That might be the most probably problem here too. Gstreamer side might also have some device specific android bits doing decoding and ending up somehow wrong.

In other words, something like ringtone or some other alarm tone playing something that ends up being stuck, then the next feedback attempt on pulley menu getting also the app stuck.

I tried the Asan stuff as attempted there, no results. With valgrind I fixed some uninitialized data sent to vibra device, but I doubt it has an effect for this.

Ogg files might be related on some devices by the decoding gstreamer elements, not sure if that’s the case here.

2 Likes

IIRC, ASAN only helped in transforming the deadlock into a crash, so very indirectly…

L.E what I haven’t tried regarding Android is HYBRIS_ENABLE_LINKER_DEBUG_MAP=1 gdb…