close
Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Opened 21 months ago

Closed 20 months ago

Last modified 20 months ago

#342 closed bug (fixed)

YAM crashes on OS4 when sending E-Mails

Reported by: colinward Owned by:
Priority: undecided Milestone: YAM 2.8
Component: user interface Version: nightly build
Severity: major Keywords:
Cc: OS Platform:
Blocked By: Blocking:
Release Notes:

Description

Summary

I see on the YAM mailing list there is already a thread about this, but I cannot reply to it as YAM crashes when I try to do so! For me YAM crashes when I try to write a new E-Mail or to forward any E-Mail and it happens for all addresses.

I am on the OS4 beta testing list and recently updated all components after a long absense from testing. At some point during the updating YAM started crashing when sending E-Mails. It could be due to YAM, an OS4 beta component or one of the MUI classes such as NList etc.

Steps to reproduce

  1. Try to send an E-Mail to any address and it crashes when you hit "send"

Expected results

This is obvious. :-)

Actual results

A crash every time. I have a Grim Reaper crash report that I have added to this ticket.

Notes

All OS4 beta components are up to date and I have the version of YAM that was released on 23.07.2012. However, it happens with all recent (ie. In the last month) versions of YAM.

Versions of libraries and classes installed (I think I have the latest of everything):

muimaster.library 20.5722
BetterString.mcc 11.22 [OS4/PPC] (12.05.2012)
BetterString.mcp 11.22 [OS4/PPC] (12.05.2012)
HotkeyString.mcc 12.18 [OS4/PPC] (12.05.2012)
NBalance.mcc 15.12 [OS4/PPC] (12.05.2012)
NBitmap.mcc 15.16 [OS4/PPC] (12.05.2012)
NFloattext.mcc 19.67 [OS4/PPC] (12.05.2012)
NList.mcc 20.131 [OS4/PPC] (12.05.2012)
NListtree.mcc 18.38 [OS4/PPC] (12.05.2012)
NListtree.mcp 18.26 [OS4/PPC] (12.05.2012)
NListview.mcc 19.86 [OS4/PPC] (12.05.2012)
NListviews.mcp 19.82 [OS4/PPC] (12.05.2012)
TextEditor.mcc 15.38 [OS4/PPC] (12.05.2012)
TextEditor.mcp 15.38 [OS4/PPC] (12.05.2012)
TheBar.mcc 26.9 [OS4/PPC] (12.05.2012)
TheBar.mcp 26.9 [OS4/PPC] (12.05.2012)
TheBarVirt.mcc 26.9 [OS4/PPC] (12.05.2012)
TheButton.mcc 26.9 [OS4/PPC] (12.05.2012)

If you need any further information then don't hesitate to ask. I can also run custom builds for you if you wish and I'm a developer so no worries with technical questions. :-)

Unfortunately I have only one NG Amiga and it has only two partitions and no CD-ROM drive, so I cannot install an older version of OS4 to try to determine when this crash started to happen. Looks like we'll have to debug it from the callstack. :-(

Attachments (5)

Crashlog_YAM_2012-07-23_07-01-43.txt (27.0 KB) - added by colinward 21 months ago.
Grim Reaper crash dump from sending E-Mail
yam_debug.lha (16.8 KB) - added by colinward 21 months ago.
Debug log from running debug version of YAM
yam_high_debug.lha (53.4 KB) - added by colinward 21 months ago.
Debug log from running debug version of YAM with higher debug level
yam_15_08_2012_debug.lha (174.8 KB) - added by colinward 20 months ago.
Debug log from running 15.08.2012 debug version of YAM with high debug level
Crashlog_YAM_2012-08-17_06-12-28.txt (24.5 KB) - added by colinward 20 months ago.
New crash at shutdown now initial forwarding bug is fixed

Download all attachments as: .zip

Change History (24)

Changed 21 months ago by colinward

Grim Reaper crash dump from sending E-Mail

comment:1 Changed 21 months ago by tboeckel

  • Milestone set to YAM 2.8
  • Status changed from new to accepted

comment:2 Changed 21 months ago by tboeckel

It is quite unlikely that AmigaOS4 is guilty, but YAM itself.

Please download the debug version of the next nightly build of YAM and produce a "mail" debug log with it. Details about YAM's debug facilities can be found in the FAQ. Pleast add the log as an attachment here.

Last edited 21 months ago by tboeckel (previous) (diff)

comment:3 Changed 21 months ago by tboeckel

  • Component changed from undefined to user interface
  • Resolution set to fixed
  • Status changed from accepted to closed

(In [6180]) * mui/FilterChooser.c, mui/IdentityChooser.c, mui/MailServerChooser.c: added a workaround for a bug in MUI4 of MorphOS which occurs when no entries are available for selection. MorphOS uses a local and non-static variable as replacement in this case, which of course ceased to live as soon as the object's constructor is left. As consequence random memory was accessed.

comment:4 follow-up: Changed 21 months ago by tboeckel

  • Resolution fixed deleted
  • Status changed from closed to reopened

Sorry, I closed the wrong ticket by accident.

Anyway, we still need this log to be able to fix this issue.

Changed 21 months ago by colinward

Debug log from running debug version of YAM

comment:5 in reply to: ↑ 4 ; follow-up: Changed 21 months ago by colinward

Replying to thboeckel:

Sorry, I closed the wrong ticket by accident.

Anyway, we still need this log to be able to fix this issue.

Ok, please find attached a log file generated by using the debug version of YAM and the option:

setenv yamdebug all,file:ram:yam_debug.txt

If you need another run performed, please don't hesitate to ask!

comment:6 in reply to: ↑ 5 Changed 21 months ago by tboeckel

Replying to colinward:

Replying to thboeckel:

setenv yamdebug all,file:ram:yam_debug.txt

Please extend this to
setenv yamdebug @all,all,file:ram:yam_debug.txt

This will produce a huge log (several MB!), but we need this one to know in which function YAM really crashes. Although there is something in the crashlog already this does not yet point to the really last bit within YAM due to compiler optimizations.

comment:7 follow-up: Changed 21 months ago by tboeckel

Bump!

Changed 21 months ago by colinward

Debug log from running debug version of YAM with higher debug level

comment:8 in reply to: ↑ 7 ; follow-up: Changed 21 months ago by colinward

Replying to thboeckel:

Bump!

Oops! Sorry, I missed your last message somehow. Ok, please find attached the requested log file.

comment:9 in reply to: ↑ 8 Changed 21 months ago by tboeckel

Replying to colinward:

Ok, please find attached the requested log file.

Unfortunately the log is truncated, most probably because of the buffered file I/O which did not yet write out the last lines when the crash happened.

Could you please produce the same log again with the next nightly build? That will flush all lines immediately to ensure the log really always contains all debug output.

Alternatively you can capture the output by using Sashimi with the current nightly build already. Just set ENV:yamdebug to "@all,all" (no file:... stuff) and then run YAM. When YAM eventually crashes quit Sashimi to ensure it has written all captured text to the log file as explained in the FAQ.

comment:10 follow-up: Changed 20 months ago by tboeckel

Bump bump!

comment:11 in reply to: ↑ 10 Changed 20 months ago by colinward

Replying to thboeckel:

Bump bump!

Sorry, been away! Please find attached the latest trace from the 15.08.2012 nightly build. Any more traces are required I should be more available now. :-)

Changed 20 months ago by colinward

Debug log from running 15.08.2012 debug version of YAM with high debug level

comment:12 Changed 20 months ago by tboeckel

It seems you have no valid SMTP server configured for the identity you are composing the mail with. Please check the SMTP server in your Identity settings (Config -> Identities -> Mail server (SMTP)).

comment:13 Changed 20 months ago by damato

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [6241]) * src/YAM.c: moved the method stack init¿alization somewhat more up to make sure

everything is properly initialized. This should close #342.

comment:14 follow-up: Changed 20 months ago by colinward

Good and bad news on this bug!

The good news is that it is now fixed and I am able to send E-Mails without it crashing. The bad news is that after sending E-Mail, it now crashes at shutdown. I am not sure if this is a related bug or a new one. I tried increasing the stack to 64k but it still crashes and it is entirely reproducible, at least for forwarding E-Mails.

I will attach a new crash log for you to look at - would you like me to open a whole new bug?

Changed 20 months ago by colinward

New crash at shutdown now initial forwarding bug is fixed

comment:15 in reply to: ↑ 14 ; follow-up: Changed 20 months ago by tboeckel

Replying to colinward:

The good news is that it is now fixed and I am able to send E-Mails without it crashing. The bad news is that after sending E-Mail, it now crashes at shutdown. I am not sure if this is a related bug or a new one. I tried increasing the stack to 64k but it still crashes and it is entirely reproducible, at least for forwarding E-Mails.

I will attach a new crash log for you to look at - would you like me to open a whole new bug?

No need for a new ticket. I just fixed this bug. The application's destructor accessed the global configuration which had been freed microseconds before. The next nightly build should not crash anymore.

To add, this crash only happened if the list of cached EMail addresses was modifies, i.e. new addresses were added. Without such a change everything went fine.

comment:16 in reply to: ↑ 15 ; follow-up: Changed 20 months ago by colinward

Replying to thboeckel:

No need for a new ticket. I just fixed this bug. The application's destructor accessed the global configuration which had been freed microseconds before. The next nightly build should not crash anymore.

To add, this crash only happened if the list of cached EMail addresses was modifies, i.e. new addresses were added. Without such a change everything went fine.

Thanks for the quick response!

Interestingly, when I tried to forward the E-Mail I tried forwarding it to my Yahoo address. I have often forwarded E-Mails to that address in the past and so when I start typing the address in the to: field it automatically fills out the address. However, this time this did not happen - it was as though it had forgotten the cached list of addresses. This explains why the address was considered "new" in the cache. Has something changed recently that would cause YAM to discard the cache? ie. A cache format change?

comment:17 in reply to: ↑ 16 ; follow-up: Changed 20 months ago by damato

Replying to colinward:

Thanks for the quick response!

Interestingly, when I tried to forward the E-Mail I tried forwarding it to my Yahoo address. I have often forwarded E-Mails to that address in the past and so when I start typing the address in the to: field it automatically fills out the address. However, this time this did not happen - it was as though it had forgotten the cached list of addresses. This explains why the address was considered "new" in the cache. Has something changed recently that would cause YAM to discard the cache? ie. A cache format change?

Well, the email cache is implemented as a buffer with a maximum length. That means it will only carry a certain amount of mail addresses. And as soon as it overflows it removes mail addresses which haven't been used for a while. So if you haven't used your yahoo mail address for a while it will be automatically removed from the email cache in case you have sent mails to various other mail addresses exceeding the currently set amount of max addresses in the cache. Beside that nothing has change in the email cache format for a while.

comment:18 in reply to: ↑ 17 ; follow-up: Changed 20 months ago by tboeckel

Replying to damato:

Well, the email cache is implemented as a buffer with a maximum length. That means it will only carry a certain amount of mail addresses. And as soon as it overflows it removes mail addresses which haven't been used for a while. So if you haven't used your yahoo mail address for a while it will be automatically removed from the email cache in case you have sent mails to various other mail addresses exceeding the currently set amount of max addresses in the cache. Beside that nothing has change in the email cache format for a while.

The most obvious explanation is even more simple. Due to the crash the .emailcache file was not written completely and hence did not contain certain addresses anymore. Thus these were "new" again for YAM.

comment:19 in reply to: ↑ 18 Changed 20 months ago by colinward

Replying to damato:

The most obvious explanation is even more simple. Due to the crash the .emailcache file was not written completely and hence did not contain certain addresses anymore. Thus these were "new" again for YAM.

I have checked and yes, it turns out that this is indeed the case! The .emailcache file was zero bytes. After sending an E-Mail and exiting cleanly with last night's build that has the bugs fixed, the .emailcache file has the target address added correctly to it, and then YAM works as expected again.

Thanks very much in helping to sort out this problem - I was a bit lost without YAM!

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber

  • Colin Ward(Reporter, Participant)