Bug #1058
Seen message become unseen on reconnect to server
Status: | Closed | Start: | 05/22/2015 | |
Priority: | Urgent | Due date: | ||
Assigned to: | Mirco Bauer | % Done: | 100% |
|
Category: | Frontend GNOME | |||
Target version: | 1.0 | |||
Complexity: | High |
Found in Version: | 1.0~rc4 |
|
Votes: | 1 (View) |
Description
Time as of this bug report is 9:47. I have just seen all messages in smuxi, then closed the client and reopened it. Smuxi now helpfully shows me unseen messages, but there is a bug:
1. Unseen messages include some already-seen ones.
The attached screenshots display the behavior: first screenshot is smuxi right after it started, second screenshot shows that the unseen message was a part/join activity, and that it was old (as I had already seen all messages before 9:30 or so).
This is smuxi 1.0rc4 client on debian sid connecting to a smuxi engine 1.0rc4 on debian sid
On the engine computer:
% mono --version
Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-10)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
On the client computer:
% mono --version
Mono JIT compiler version 4.0.1 (tarball Tue May 12 15:39:23 UTC 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
Associated revisions
Revision 699190829e795c03c98e259eb543e72b1860a1fd
Frontend-GNOME: mark messages of current chat as seen on quit (refs: #1058)
The issue is that Smuxi only marks messages as seen when the user switches away
from the current chat. This does not happen if the user was following the
currently visible chat and then quits Smuxi. Thus Smuxi has to mark the messages
of the current chat as seen on quit.
Revision bff11a093e0e57184a54ee0860aa586036dd2746
Engine: fixed storing last seen message / highlight correctly with smuxi-servers (closes: #1058)
On Mono the DateTimeKind gets lost during serialization of .NET remoting. When
this happens we store the timestamp in local time instead. Otherwise the
timezone offset will be applied again leading to incorrect values.
Revision d10feafd4ce65f9dff79fa4739e8fbaf8c4a78d0
configure.ac: bumped minimum required Mono version to 2.8 (refs: #1058)
Mono 2.6.7 incorrectly de-serializes DateTime values sent over .NET remoting.
Smuxi frontends sending DateTime values to a smuxi-server that runs on Mono
2.6.7 will end up with a value that is off by the timezone offset. E.g.:
2015-06-12T20:03:34.7553410Z on the frontend becomes
2015-06-12T18:03:34.7553410Z on the server side if the timezone offset is +2
This change is needed to really fix bff11a093e0e57184a54ee0860aa586036dd2746
as with Mono 2.6.7 as smuxi-server still had the bug seen in #1058.
Revision 4cdc94d5b294f1df31b35f8344f5ca362e041cf4
Common: de-serialize DateTime ticks in UTC (refs: #1058)
DateTime ticks are by definition from a specified point of time in UTC [0]. The
DateTime ctor that takes tick as Int64 initializes the DateTime object though as
DateTimeKind.Unspecified leading to unexpected behavior when the time is
transformed to UTC or local time.
https://msdn.microsoft.com/en-us/library/system.datetime.ticks(v=vs.110).aspx
History
Updated by Felipe Sateler 3471 days ago
- File smuxi1.png added
- File smuxi2.png added
Updated by Mirco Bauer 3469 days ago
- Status changed from New to Feedback
Do you run different timezones between server and frontend and can you produce this issue? I can't reproduce it.
Updated by Mirco Bauer 3455 days ago
Updated by Mirco Bauer 3451 days ago
- Subject changed from Unseen message marks seen as unseen on reconnect to server to Seen message become unseen on reconnect to server
Updated by Mirco Bauer 3450 days ago
There is a bug in the way datetime values are stored in the SQLite DB. There is a 4 hours offset (UTC compared to local time) while it should be 2 for me. So I believe this is a .NET remoting serialization issue with Mono 2.6.7 <-> 3.2.8, not sure about other versions yet.
sqlite> select * from Properties; LastSeenHighlight|2015-06-12T04:09:15.6688680Z LastSeenMessage|2015-06-12T04:09:15.6688680Z ^^^^^
That should read 06:09. As my local frontend time is 08:09 and the smuxi-server also runs on 08:09 local time.
Updated by Mirco Bauer 3450 days ago
- Status changed from Feedback to Closed
- % Done changed from 0 to 100
??????? ? bff11a093e0e57184a54ee0860aa586036dd2746 ????.
Updated by Mirco Bauer 3446 days ago
- Complexity changed from Low to High
This was a really nasty bug...