Closed supermaz closed 6 years ago
I have a similar problem, TeamViewer 13 causes(when it starts) "Notification area has quit unexpectedly" Your patch did not help though :(
mate-panel-1.18.6
Better backtrace:
(gdb) bt
#0 0x00007f2e9e87051c in g_variant_get_child_value (value=0x7ffcb05afdf8, index_=0) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/glib/gvariant-core.c:985
#1 0x00007f2e9e86ed14 in g_variant_iter_next (iter=iter@entry=0x7ffcb05afcd0, format_string=format_string@entry=0x42b585 "(ii@ay)") at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/glib/gvariant.c:5636
#2 0x00000000004121b3 in icon_pixmap_new (variant=<optimized out>) at sn-item-v0.c:444
#3 0x0000000000412472 in sn_tooltip_new (variant=<optimized out>) at sn-item-v0.c:511
#4 0x0000000000413c9c in get_all_cb (source_object=<optimized out>, res=<optimized out>, user_data=<optimized out>) at sn-item-v0.c:940
#5 0x00007f2e9edda5e3 in g_task_return_now (task=0x6a99d1) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/gio/gtask.c:1145
#6 0x00007f2e9eddb0ae in g_task_return (task=0x6a99d0, type=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/gio/gtask.c:1203
#7 0x00007f2e9ee0df2a in g_dbus_connection_call_done (source=<optimized out>, result=0x6a9830, user_data=0x6a99d0) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/gio/gdbusconnection.c:5722
#8 0x00007f2e9edda5e3 in g_task_return_now (task=0x6a9830) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/gio/gtask.c:1145
#9 0x00007f2e9edda619 in complete_in_idle_cb (task=0x6a9830) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/gio/gtask.c:1159
#10 0x00007f2e9e83378a in g_main_dispatch (context=0x67e990) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/glib/gmain.c:3234
#11 g_main_context_dispatch (context=context@entry=0x67e990) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/glib/gmain.c:3899
#12 0x00007f2e9e833b30 in g_main_context_iterate (context=0x67e990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/glib/gmain.c:3972
#13 0x00007f2e9e833e52 in g_main_loop_run (loop=0x8b1030) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/glib/gmain.c:4168
#14 0x00007f2e9fd45255 in gtk_main () from /usr/lib64/libgtk-3.so.0
#15 0x00007f2ea0a93713 in mate_panel_applet_factory_main (factory_id=factory_id@entry=0x42b164 "NotificationAreaAppletFactory", out_process=out_process@entry=1, applet_type=9112576, callback=callback@entry=0x40fa00 <applet_factory>,
user_data=user_data@entry=0x0) at mate-panel-applet.c:2321
#16 0x000000000040f43e in main (argc=1, argv=0x7ffcb05b0148) at main.c:422
(gdb) bt full
#0 0x00007f2e9e87051c in g_variant_get_child_value (value=0x7ffcb05afdf8, index_=0) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/glib/gvariant-core.c:985
child = <optimized out>
__func__ = "g_variant_get_child_value"
#1 0x00007f2e9e86ed14 in g_variant_iter_next (iter=iter@entry=0x7ffcb05afcd0, format_string=format_string@entry=0x42b585 "(ii@ay)") at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/glib/gvariant.c:5636
value = <optimized out>
__func__ = "g_variant_iter_next"
#2 0x00000000004121b3 in icon_pixmap_new (variant=<optimized out>) at sn-item-v0.c:444
array = 0x779200
iter = {x = {140723267239416, 6986192, 0, 0, 140723267239352, 17501591648142567168, 206158430240, 3579507750, 4, 139837826967600, 140723267239424, 6985776, 139838204608960, 139838200994980, 139838204608960,
17501591648142567168}}
width = -1336214024
height = 32764
value = 0xf2e224e0677b2700
#3 0x0000000000412472 in sn_tooltip_new (variant=<optimized out>) at sn-item-v0.c:511
icon_name = 0x7619a0 " Y\222"
icon_pixmap = 0x7ffcb05afdf8
title = 0x7f2e8800a830 "`\250"
text = 0x7ffcb05afe00 "p\232\205"
tooltip = 0x8dc1d0
#4 0x0000000000413c9c in get_all_cb (source_object=<optimized out>, res=<optimized out>, user_data=<optimized out>) at sn-item-v0.c:940
v0 = 0x7619a0
properties = 0x7f2e8800a830
error = 0x0
iter = 0x7f2e88004400
key = 0x8ef830 "ToolTip"
value = 0x859a70
#5 0x00007f2e9edda5e3 in g_task_return_now (task=0x6a99d1) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/gio/gtask.c:1145
No locals.
#6 0x00007f2e9eddb0ae in g_task_return (task=0x6a99d0, type=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/gio/gtask.c:1203
source = 0x7f2e88001190
#7 0x00007f2e9ee0df2a in g_dbus_connection_call_done (source=<optimized out>, result=0x6a9830, user_data=0x6a99d0) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/gio/gdbusconnection.c:5722
connection = <optimized out>
task = 0x6a99d0
state = 0x779400
error = 0x0
reply = 0x845de0
value = <optimized out>
#8 0x00007f2e9edda5e3 in g_task_return_now (task=0x6a9830) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/gio/gtask.c:1145
No locals.
#9 0x00007f2e9edda619 in complete_in_idle_cb (task=0x6a9830) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/gio/gtask.c:1159
No locals.
#10 0x00007f2e9e83378a in g_main_dispatch (context=0x67e990) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/glib/gmain.c:3234
dispatch = 0x7f2e9e8301c0 <g_idle_dispatch>
prev_source = 0x0
was_in_call = 0
user_data = 0x6a9830
callback = 0x7f2e9edda610 <complete_in_idle_cb>
cb_funcs = <optimized out>
cb_data = 0x7f2e8800a650
need_destroy = <optimized out>
source = 0x7f2e88001190
current = 0x68da80
i = 0
#11 g_main_context_dispatch (context=context@entry=0x67e990) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/glib/gmain.c:3899
No locals.
#12 0x00007f2e9e833b30 in g_main_context_iterate (context=0x67e990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/glib/gmain.c:3972
max_priority = 2147483647
timeout = 25000
some_ready = 1
nfds = <optimized out>
allocated_nfds = 2
fds = 0x8b1050
#13 0x00007f2e9e833e52 in g_main_loop_run (loop=0x8b1030) at /var/tmp/portage/dev-libs/glib-2.52.3/work/glib-2.52.3/glib/gmain.c:4168
__func__ = "g_main_loop_run"
#14 0x00007f2e9fd45255 in gtk_main () from /usr/lib64/libgtk-3.so.0
No symbol table info available.
#15 0x00007f2ea0a93713 in mate_panel_applet_factory_main (factory_id=factory_id@entry=0x42b164 "NotificationAreaAppletFactory", out_process=out_process@entry=1, applet_type=9112576, callback=callback@entry=0x40fa00 <applet_factory>,
---Type <return> to continue, or q <return> to quit---
user_data=user_data@entry=0x0) at mate-panel-applet.c:2321
factory = 0x89bf00
closure = 0x8b2a00
__func__ = "mate_panel_applet_factory_main"
#16 0x000000000040f43e in main (argc=1, argv=0x7ffcb05b0148) at main.c:422
context = 0x649f00
error = 0x0
retval = <optimized out>
@joakim-tjernlund try this setting.
[rave@mother ~]$ gsettings get org.mate.panel enable-sni-support
false
This looks related to https://github.com/mate-desktop/mate-panel/issues/686 by at least enough that fixing one fixes the other, if they are not in fact the same issue
@raveit65, enable-sni-support false did not help.
You need to run killall mate-panel or mate-panel --replace to restart the panel after disabling sni support. The backtrace shows the offending function as being the icon handling code for the status notifier, looks same as what I commented in https://github.com/mate-desktop/mate-panel/issues/686
bugger, I forgot mate-panel --replace when testing enable-sni-support false Doing that it actually survives and I see a teamviewer icon in notification area.
Icons as requested: tv-icons.tar.gz
OK, I justed tested one of the "dialog-password.png" icons by replacing the keyring icon used by mate-polkit ("password-dialog") with it, and both the icon and the indicator worked fine. I see that teamviewer installs icons in both /opt/teamviewer13 and /usr/share/icons/hicolor where they should be found just fine, no further idea what is going on on my part.
Might be distro-specific? I am on Debian Unstable
On Gentoo, but I don't think it is the icon itself(or distro). Teamviewer sends somewhat unusual input and mate misses the error and corrupts itself. Why does !SNI work and SNI not?
OK, we have reports that Teamviewer and Calibre both do something odd with the status notifier, question is what are they doing differently than most other apps?
EDIT: Teamviewer is not something I can install due to security concerns on my bare-metal, encrypted setup. This keeps me from testing it myself to get to the bottom of this issue
Teamviewer is a binary app: https://www.teamviewer.com/sv/download/linux/?_ga=2.196022572.1290475043.1513713450-605195434.1513713450&_gac=1.219834091.1513727008.CjwKCAiAjuPRBRBxEiwAeQ2QPiEZYhH1v9QFfjtsTPfrSMqnGZtZed8DrsiE3eWqeQUjDooYgyy_XRoCfoAQAvD_BwE
which uses QT, there is a debian packet too.
What I meant was that I don't trust closed binary apps(especially remote control binary apps) on the same computer as my encrypted files. Different users have different needs, in in my situation security is paramount. When working on MATE applications that are not remote connected there is little risk of opening the door to a remote attack, but installing lots of other apps for testing is another matter.
Fortunately, MATE is a team project. Can any of the other devs here try Teamviewer in a VM and see what is going on with this?
Why does !SNI work and SNI not?
SNI (status notifier) is a replacement for deprecated GtkStatusIcon, but it is quite buggy and a lot of apps which uses it causes problems with their icons. It isn't really clear if the problem is SNI itself. In fedora and other distros this gsettings key is disabled by default.
I think that my bug report here is a little bit high-jacked ;)
I don't even have that setting:
workstation ~ $ LC_ALL=C gsettings get org.mate.panel enable-sni-support No such key 'enable-sni-support'
And I also have not installed Teamviewer nor Calibre. My crash of the notification area is also immediately after logging in and I didn't have any change of getting it to work after the update from 1.16 to 1.18.
So my initial question remains: Is sn_watcher_v0_gen_dup_registered_items suppose to always output a non-null value?
@cwendling Please can you take a look at this and your implementation of SNI support again?
@monsta Otherwise we should simply disabled it as default for the moment, imo
I don't even have that setting: workstation ~ $ LC_ALL=C gsettings get org.mate.panel enable-sni-support No such key 'enable-sni-support'
This code is there since mate-panel-1.18.2... And you mentioned version is ....
Package version 1.18.3
sn_watcher_v0_gen_dup_registered_items And you mentioned version is ....
Yes, and I have 1.18.3 installed:
workstation ~ $ equery l mate-panel
- Searching for mate-panel ... [I-O] [ ] mate-base/mate-panel-1.18.3:0
The about-dialog also shows 1.18.3
weird, that you don't have this key...
@supermaz On another computer I have mate-panel 1.18.2 and it does not have SNI either. I guess you have installed 1.18.3 yourself as 1.18.2 i official Gentoo, just rename your ebuild to 1.18.6 and try that.
What do you think about my SNI implementation for MATE:-)
@rilian-la-te, no idea what you SNI impl. is? The current one in mate-1.18.x ?
Which of your projects implements SNI for MATE?
On 21 Dec 2017 08:46, "Konstantin" notifications@github.com wrote:
What do you think about my SNI implementation for MATE:-)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mate-desktop/mate-panel/issues/692#issuecomment-353292827, or mute the thread https://github.com/notifications/unsubscribe-auth/AASl_-PvpIHQVUwDKpXH5OCpGBVapAkCks5tChr_gaJpZM4RDp_U .
Le 21/12/2017 à 08:35, raveit65 a écrit :
@cwendling https://github.com/cwendling Please can you take a look at this and /your/ implementation of SNI support again?
Unfortunately cwendling is no longer in the Hypra team and I think we shouldn't expect that he will work on this.
@monsta https://github.com/monsta Otherwise we should simply disabled it as default for the moment, imo
If no one could fix those bugs for the moment I agree with you.
Best regards. -- Alex ARNAUD Visual-Impairment Project Manager Hypra - "Humanizing technology"
@lukefromdc , can I ask you to take a look at https://github.com/mate-desktop/mate-screensaver/issues/126 It has been waiting a long time and is also a security issue
I do not have that installed, as I have only single-user, encrypted machines. Really don't know much about it.
ehh, you don't have a screen locker for you important files? Do you log out as whenever leaving the computer?
I do not have any computers that are ever left running where an untrusted party could access them. An encrypted machine left running unattended means a 3ed party could do a "cold boot attack" to recover the passphrase from RAM. Thus a screenlocker cannot protect an encrypted computer and should not be used as if offers false security. Encrypted machines must be shut down all the way whenever they are left unguarded. Not suspended either, though hibernation to an encrypted file on disk is sometimes possible
So my initial question remains: Is sn_watcher_v0_gen_dup_registered_items suppose to always output a non-null value?
@supermaz No. According to auto-generated documentation it can return NULL:
Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev().
Wouldn't this only return NULL if there are no registered items at all? I got segfaults some of the time with a test install of calibre even with another status notifier item (nm-applet) showing
I strongly recommend to use one issue for one bug. Then you would not have such questions...
Read the report, @supermaz opened issue about bug / problem that he has got. At same time he provided possible fix, but he was not sure if that function should always return non-NULL value or not. He was right and that function might return NULL and then you have nothing but crash.
All other comments are unrelated to his problem and should be reported separately.
Your crashes most likely is not related to this bug report!
I can start mate-panel with no items in the status notifier by killing nm-applet and restarting the panel with no problems. Does sn_watcher_v0_gen_dup_registered_items return NULL or something else when there are no registered items at all?
We probably do need the proposed patch to catch the NULL case, even if none of the applets causing crashes relate to that.
I don't know what is meant with or %NULL if the property is not set
... I have never had this problem, but checking if returned value is not NULL is right thing to do.
https://github.com/mate-desktop/mate-panel/pull/700 applies the patch by https://github.com/supermaz https://github.com/muktupavels is right about one thing: no effect on the Calibre crashes, but should fix the NULL case. At any rate, no adverse affects observed here
sn_watcher_v0_gen_dup_registered_items
And you mentioned version is ....
Yes, and I have 1.18.3 installed:
workstation ~ $ equery l mate-panel
- Searching for mate-panel ... [I-O] [ ] mate-base/mate-panel-1.18.3:0
The about-dialog also shows 1.18.3
Little miss understanding..... I meant SNI code itself was added with 1.18.2. The gesettings key itself was merged before 1.18.5 release. So you're right, you can't have this key. For official fedora i added this key earlier with a patch.
Patch by the reporter is applied at https://github.com/mate-desktop/mate-panel/commit/e4e76688ca09448adaa152e0a757e4f0ee14cf52, and also version 1.18.7 is released with it.
@flexiondotorg sorry for late reply, but my SNI implementation is xfce4-sntray-plugin (soon will merged with appmenu)
I have a similar looking crash with mate-panel 1.18.7 (Debian's 1.18.7-1) and TeamViewer 13.
(gdb) bt #0 0x00007ffff4c33b88 in g_bit_lock (address=address@entry=0x55555557de0d, lock_bit=lock_bit@entry=0) at ../../../../glib/gbitlock.c:214 #1 0x00007ffff4c99f57 in g_variant_lock (value=0x55555557dded) at ../../../../glib/gvariant-core.c:221 #2 0x00007ffff4c99f57 in g_variant_n_children (value=0x55555557dded) at ../../../../glib/gvariant-core.c:929 #3 0x00007ffff4c95b48 in g_variant_iter_init (iter=iter@entry=0x7fffffffd9d0, value=) at ../../../../glib/gvariant.c:2976 #4 0x000055555556441d in icon_pixmap_new (variant= ) at sn-item-v0.c:451 #5 0x0000555555564732 in sn_tooltip_new (variant= ) at sn-item-v0.c:522 #6 0x000055555556601c in get_all_cb (source_object= , res= , user_data= ) at sn-item-v0.c:951 #7 0x00007ffff52061c3 in g_task_return_now (task=0x555555815a10 [GTask]) at ../../../../gio/gtask.c:1145 #8 0x00007ffff5206be6 in g_task_return (task=0x555555815a10 [GTask], type= ) at ../../../../gio/gtask.c:1203 #9 0x00007ffff5239c82 in g_dbus_connection_call_done (source= , result=0x7fffd40032e0, user_data=0x555555815a10) at ../../../../gio/gdbusconnection.c:5722 #10 0x00007ffff52061c3 in g_task_return_now (task=0x7fffd40032e0 [GTask]) at ../../../../gio/gtask.c:1145 #11 0x00007ffff52061f9 in complete_in_idle_cb (task=0x7fffd40032e0) at ../../../../gio/gtask.c:1159 #12 0x00007ffff4c5de25 in g_main_dispatch (context=0x5555557d9870) at ../../../../glib/gmain.c:3165 #13 0x00007ffff4c5de25 in g_main_context_dispatch (context=context@entry=0x5555557d9870) at ../../../../glib/gmain.c:3818 #14 0x00007ffff4c5e1f0 in g_main_context_iterate (context=0x5555557d9870, block=block@entry=1, dispatch=dispatch@entry=1, self= ) at ../../../../glib/gmain.c:3891 #15 0x00007ffff4c5e502 in g_main_loop_run (loop=0x5555559beaf0) at ../../../../glib/gmain.c:4087 ---Type to continue, or q to quit---q Quit (gdb) bt full #0 0x00007ffff4c33b88 in g_bit_lock (address=address@entry=0x55555557de0d, lock_bit=lock_bit@entry=0) at ../../../../glib/gbitlock.c:214 #1 0x00007ffff4c99f57 in g_variant_lock (value=0x55555557dded) at ../../../../glib/gvariant-core.c:221 n_children = #2 0x00007ffff4c99f57 in g_variant_n_children (value=0x55555557dded) at ../../../../glib/gvariant-core.c:929 n_children = #3 0x00007ffff4c95b48 in g_variant_iter_init (iter=iter@entry=0x7fffffffd9d0, value= ) at ../../../../glib/gvariant.c:2976 #4 0x000055555556441d in icon_pixmap_new (variant= ) at sn-item-v0.c:451 array = iter = {x = {93824992402925, 140737488345856, 140737488345768, 140737488345776, 140737488345784, 140737488345792, 206158430240, 3579507750, 140737488345632, 4013109139424017152, 140737488345840, 110608, 32, 140737299668000, 93824998359024, 140737488345856}} width = 1431821805 height = 21845 value = 0x37b16d7ffc3dfb00 #5 0x0000555555564732 in sn_tooltip_new (variant= ) at sn-item-v0.c:522 icon_name = 0x555555afb1a0 "p\242\257UUU" icon_pixmap = 0x55555557dded title = 0x7fffdc024360 "" text = 0x7fffffffdaf8 "\240T" tooltip = 0x555555ae65d0 #6 0x000055555556601c in get_all_cb (source_object= , res= , user_data= ) at sn-item-v0.c:951 v0 = 0x555555afb1a0 properties = 0x7fffdc024360 error = 0x0 iter = 0x555555b120f0 key = 0x7fffdc0054a0 "ToolTip" value = 0x7fffdc024120 #7 0x00007ffff52061c3 in g_task_return_now (task=0x555555815a10 [GTask]) at ../../../../gio/gtask.c:1145 #8 0x00007ffff5206be6 in g_task_return (task=0x555555815a10 [GTask], type= ) at ../../../../gio/gtask.c:1203 source = 0x7fffdc009eb0 #9 0x00007ffff5239c82 in g_dbus_connection_call_done (source= , result=0x7fffd40032e0, user_data=0x555555815a10) at ../../../../gio/gdbusconnection.c:5722 connection = task = 0x555555815a10 [GTask] state = 0x55555582d340 error = 0x0 reply = 0x7fffdc005b20 [GDBusMessage] value = #10 0x00007ffff52061c3 in g_task_return_now (task=0x7fffd40032e0 [GTask]) at ../../../../gio/gtask.c:1145 #11 0x00007ffff52061f9 in complete_in_idle_cb (task=0x7fffd40032e0) at ../../../../gio/gtask.c:1159 #12 0x00007ffff4c5de25 in g_main_dispatch (context=0x5555557d9870) at ../../../../glib/gmain.c:3165 dispatch = 0x7ffff4c5a770 prev_source = 0x0 was_in_call = 0 user_data = 0x7fffd40032e0 callback = 0x7ffff52061f0 cb_funcs = 0x7ffff4f25280 cb_data = 0x7fffdc00b1b0 need_destroy = source = 0x7fffdc009eb0 current = 0x5555557db940 i = 0 #13 0x00007ffff4c5de25 in g_main_context_dispatch (context=context@entry=0x5555557d9870) at ../../../../glib/gmain.c:3818 #14 0x00007ffff4c5e1f0 in g_main_context_iterate (context=0x5555557d9870, block=block@entry=1, dispatch=dispatch@entry=1, self= ) at ../../../../glib/gmain.c:3891 max_priority = 0 timeout = 0 some_ready = 1 nfds = allocated_nfds = 3 fds = 0x5555559beb10 #15 0x00007ffff4c5e502 in g_main_loop_run (loop=0x5555559beaf0) at ../../../../glib/gmain.c:4087 __func__ = "g_main_loop_run" #16 0x00007ffff6805345 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 #17 0x00007ffff7bd2744 in mate_panel_applet_factory_main () at /usr/lib/x86_64-linux-gnu/libmate-panel-applet-4.so.1 #18 0x00005555555615d8 in main (argc= , argv= ) at main.c:422 context = 0x55555579df90
Yes, the same thing. It has been fixed not to crash but only in 1.19 @monsta , maybe applied all 1.19 fixes to 1.18 branch too(and release it)
Meanwhile you can turn off SNI via dconf-editor to avoid the crash
@cschramm: it's a different crash, mentioned in https://github.com/mate-desktop/mate-panel/issues/686 and fixed by https://github.com/mate-desktop/mate-panel/commit/dfd529dfae32edfb9949e6afb89c2eb631893ea3. We'll make a new 1.18.x release later
Expected behaviour
notification-area-applet can be added to panel
Actual behaviour
crashes when added to panel
Steps to reproduce the behaviour
add to panel
MATE general version
1.18
Package version
1.18.3
Linux Distribution
Gentoo
I just did a bit of debugging and the segfault is in line 226 in file applets/notification_area/status-notifier/sn-host-v0.c
The items from line 224 are actually 0 here.
I made a small patch which at least lets me add the notification-area to my panel:
But I'm not sure if this is a valid fix or if items really should be 0 at any time.