jens-maus / yam

:mailbox_with_mail: YAM (short for 'Yet Another Mailer') is a MIME-compliant open-source Internet email client written for Amiga-based computer systems (AmigaOS4, AmigaOS3, MorphOS, AROS). It supports POP3, SMTP, TLSv1/SSLv3 connection security, multiple users, multiple identities, PGPv2/v5 encryption, unlimited hierarchical folders, an ARexx interface, etc...
https://yam.ch
GNU General Public License v2.0
62 stars 18 forks source link

Edit window left opened makes Yam lose track of the source file #578

Closed jens-maus closed 8 years ago

jens-maus commented 8 years ago

Originally by pferrucci@sfr.fr on 2014-08-23 19:29:18 +0200


Summary

I keep the edit window opened for many minutes. When I'm back, I click send. Yam can't find the email file.

Steps to reproduce

  1. Prepare an answer to an email (not tested with a new email)
  2. keep the edit window opened
  3. go to dinner
  4. click on "send"

    Expected results

Mail sent.

Actual results

Error message saying:

Couldn't read from file 'Programs:Internet/YAM/Folders/outgoing/ROy PewADocw=.001,N'.

The file doesn't seem to exist.

(23/08/2014 19h25)

Failed rename operation in the Snoopy log

Regression

Notes

Using YAM 2.10-dev 20/08/2014

jens-maus commented 8 years ago

Originally by pferrucci@sfr.fr on 2014-08-23 19:29:50 +0200


Attachment added: Snoopy_Output (130.6 KiB)

tboeckel commented 8 years ago

Originally on 2014-08-24 19:14:03 +0200


No problem here. No matter how long I wait after the last change eventually a draft mail will be created by the auto save feature. Clicking on "Send now" will move that draft mail to the Outgoing folder and send it off.

tboeckel commented 8 years ago

Originally on 2014-08-26 08:49:53 +0200


Please create a NET+MAIL debug using the debug version and try to reproduce this issue. Perhaps the log contains some valuable information.

jens-maus commented 8 years ago

Originally by trac-robot on 2014-09-12 07:31:38 +0200


This ticket was closed automatically by the system. It was previously set to a Pending status and hasn't been updated within 14 days.

jens-maus commented 8 years ago

Originally by daniel@onyxsoft.se on 2014-10-09 11:52:39 +0200


Why was this bug ignored? I get this problem every day since I'm very slow at writing e-mails.

Reproductive steps apply.

  1. Prepare an answer to an email (new or reply)
  2. keep the edit window opened
  3. go to dinner (or wait until the mail is saved as draft)
  4. click on "send"

The e-mail was moved from Outgoing to Draft and clicking send throws an error and the e-mail is not sent. The original steps and result apply.

Replace step 4 as follows:

  1. Click "Cancel" to discard the changes. YAM crashes!

Version: 2.9p1 [OS4/PPC] 2014-04-18 (GCC 4.7.1, r7798)

tboeckel commented 8 years ago

Originally on 2014-10-09 11:58:57 +0200


Replying to deniil:

Why was this bug ignored? I get this problem every day since I'm very slow at writing e-mails.

See comment [comment:4]. It was closed because the initial reporter did not supply the requested debug log within 2 weeks. We treat this kind of "inactivity" as "I don't care anymore, please close the ticket".

If YAM crashes for you then please supply the crashlog. Just stating "it crashes" it not enough. As I stated initally already I cannot reproduce this issue, so we depend on your cooperation.

Please log in before commenting the next time.

jens-maus commented 8 years ago

Originally by @raziel- on 2014-10-09 13:24:28 +0200


Reproductive steps apply.

  1. Prepare an answer to an email (new or reply)
  2. keep the edit window opened
  3. go to dinner (or wait until the mail is saved as draft)
  4. click on "send"

The e-mail was moved from Outgoing to Draft and clicking send throws an error and the e-mail is not sent.

Following your steps and clicking on "Send Now" moves the mail from Drafts to Outgoing and sends it away fine...

I'm not sure what you did to make the mail move from Outgoing to Drafts on sending? Are you sure your results aren't vice-versa?

The original steps and result apply.

Replace step 4 as follows:

  1. Click "Cancel" to discard the changes. YAM crashes!

Nothing crashes here...clicking cancel brings up a Confirmation Request window asking me if i really want to discard all modifications...discarding them does exactly that.

Version: 2.9p1 [OS4/PPC] 2014-04-18 (GCC 4.7.1, r7798)

Same version here

Not sure whats wrong for you, but maybe re-installing YAM on a different partition and trying the fresh install will help? It sounds like something else is messing with your installation...

jens-maus commented 8 years ago

Originally by daniel@onyxsoft.se on 2014-10-09 15:43:14 +0200


It does not appear to be reproducable without waiting for a long time, which is wierd.

I set the auto save interval to 1 minute. I was not able to reproduce it if I did something quickly, like after 2-3 minutes. But I waited over halv an hour without editing a reply. I saw that a draft was saved after one minute as it should. Halv an hour later I clicked "Send now" and I got this error and the message is left in draft unmodified.

I believe the crash also only happens after this long wait when send would also have failed. I will continue to try to create a solid reproductive case here, since obvoiusly waiting only until the draft is saved is not enough.

jens-maus commented 8 years ago

Originally by daniel@onyxsoft.se on 2014-10-09 16:03:49 +0200


Attachment added: Crashlog_YAM_2014-10-09_16-03-26.txt (46.7 KiB) Reply-change-one-line-wait-30mins-Cancel-Discard

jens-maus commented 8 years ago

Originally by daniel@onyxsoft.se on 2014-10-09 18:21:44 +0200


It seems the hash code has changed when the bug appears such that YAM looks for a different file than what was created. The crash is probably the same bug, the error is just not handled in the Cancel case as it is in the Send now case.

See here (Send now after 1:15h): Couldn't read from file 'YAM:Folders/outgoing/RSpzLwAGjcU=.001,N'.

The file doesn't seem to exist.

(2014-10-09 18.05.03)

DH3:YAM/Folders/drafts/.fconfig DH3:YAM/Folders/drafts/.index DH3:YAM/Folders/drafts/RSpcLwAMaE0=.001,N DH3:YAM/Folders/drafts/RSpGhQAAXw0=.001,N DH3:YAM/Folders/drafts/RSpQmQABLH8=.001,N

DH3:YAM/Folders/outgoing/.fconfig

Is the hash generator dependent on time?

jens-maus commented 8 years ago

Originally on 2014-10-09 18:32:47 +0200


Replying to deniil:

Is the hash generator dependent on time?

Yes, partly. However, this should not happen. So again, please generate a debug log using a debug version of yam an executing the following command:

setenv yam debug net,mail,stdout

And then run YAM from the command-line and it will output some debug information on the command-line as well. Or use "file:ram:yamlog.log" instead of "stdio" and it will output the debug information in a file. See here for more information on generating debug information which you can send to us or attach to this ticket:

https://yam.ch/wiki/FAQ/Debugging#BasicsaboutYAMsdebuggingfacilities

We really need detailed debug information showing this problem or otherwise we cannot investigate the issue any further.

jens-maus commented 8 years ago

Originally by daniel@onyxsoft.se on 2014-10-09 18:34:38 +0200


Attachment added: Crashlog_YAM_2014-10-09_18-33-18.txt (40.4 KiB) Clicked on Send now after waiting about 15 mins.

jens-maus commented 8 years ago

Originally by daniel@onyxsoft.se on 2014-10-09 18:36:41 +0200


Ignoring DSI on both my crashes made YAM hang in a waitsem. System seemed otherwise stable.

tboeckel commented 8 years ago

Originally on 2014-10-09 19:55:58 +0200


Replying to damato:

setenv yam debug net,mail,stdout

The ENV variable is named yamdebug, not yam debug.

setenv yamdebug net,mail,stdout
tboeckel commented 8 years ago

Originally on 2014-10-10 10:11:37 +0200


I tried to reproduce this issue with both YAM 2.9p1 and YAM 2.10-dev and let lots of time (>=30 minutes) pass between the last change to the mail and sending it off. Everything was done correctly.

So if you want to get this issue fixed for you then we really need that debug log. Otherwise we cannot do anything.

jens-maus commented 8 years ago

Originally by @raziel- on 2014-10-10 14:43:25 +0200


Attachment added: Crashlog_YAM.debug_2014-10-10_14-34-12.txt (40.9 KiB) Happened after having the Edit window open for ~1.5 hours

jens-maus commented 8 years ago

Originally by @raziel- on 2014-10-10 14:43:56 +0200


Attachment added: YAM_Waiting_on_a_Draft_before_sending_Crash.txt (5.1 KiB) The debug output log

jens-maus commented 8 years ago

Originally by @raziel- on 2014-10-10 14:44:54 +0200


Ok, i was just now able to recreate a crash, (not sure if it's the same, looks different judging from the already posted crash logs), but following the above steps and waiting with the open Edit window for about 1.5 hours brought it up on sending.

Sorry for the log being so small, i missed to redirect it to a file, but the last few lines are important anyway.

I hope that helps

jens-maus commented 8 years ago

Originally by @raziel- on 2014-10-10 14:48:24 +0200


I need to add that after a reboot the mail was in Drafts and in Outgoing, but not sent.

And i also don't know where that "@bounces.amazon.de" comes from :-?

jens-maus commented 8 years ago

Originally by daniel@onyxsoft.se on 2014-10-10 16:40:03 +0200


Yes, with 2.10dev I get the same mail in both draft and outgoing but with different hash after the crash: DH3:YAM/Folders/drafts/RStyDAAKdKw=.001,N DH3:YAM/Folders/outgoing/RSuhuAAFsd4=.001,N

I'll try to reproduce it without getting the crash so we can get a log instead. I have logs from a send mail fail case and a crash.

jens-maus commented 8 years ago

Originally by daniel@onyxsoft.se on 2014-10-10 17:10:44 +0200


Finally!

Added logs.lha where 'complete-log-with-send-fail.txt' is a successful send fail case without crash.

Couldn't read from file 'YAM:Folders/outgoing/RSu26gAKquc=.001,N'.

The file doesn't seem to exist.

(2014-10-10 17.06.18)

DH3:YAM/Folders/drafts/RSuxbwADJag=.001,N

jens-maus commented 8 years ago

Originally by daniel@onyxsoft.se on 2014-10-10 17:11:16 +0200


Attachment added: logs.lha (57.5 KiB) Logs of crash and send fail.

jens-maus commented 8 years ago

Originally by anonymous on 2014-10-10 19:27:53 +0200


That's great. Thanks for taking the time to test this and submit a log. I couldn't get a log myself.

tboeckel commented 8 years ago

Originally on 2014-10-14 10:20:21 +0200


I think I found the reason for the strange crashes. The automatic index expunge mechanism would also expunge the index of the Drafts folder. However, if there is an active draft mail this will pull the rug from under the mail's feet and leave the write window with a possibly no longer mail pointer. Please check if this issue is fixed with the next nightly build of YAM 2.10-dev.

tboeckel commented 8 years ago

Originally on 2014-10-14 10:21:39 +0200


In (ac0ee82):

tboeckel commented 8 years ago

Originally on 2014-10-14 16:00:46 +0200


In (3da0ef4):

tboeckel commented 8 years ago

Originally on 2014-10-14 16:04:42 +0200


@raziel-

I need to add that after a reboot the mail was in Drafts and in Outgoing, but not sent.

And i also don't know where that "@bounces.amazon.de" comes from :-?

This most probably happened due to corrupted pointers. That's nothing to worry about. In the meantime I was able to reproduce the bug and I am very certain that it is fixed now.

tboeckel commented 8 years ago

Originally on 2014-10-14 16:05:46 +0200


Everybody please try the next nightly build. I am sure this issue will be fixed then. If not then please reopen this ticket and provide new crash logs, debug logs, etc.

jens-maus commented 8 years ago

Originally by daniel@onyxsoft.se on 2014-10-17 13:58:36 +0200


Have not been able to reproduce the bug.