Belle and sending message attachment
Not sure if anyone can help but I have run out of ideas.
Just updated to Carbide 3.2 (then auto update to 3.3) and Bell SDK 1.0 in order to develop on Symbian Belle. Was previously using Carbide 2.7 and Symbian3 SDK 1.0 and all was OK.
My application uses SendAs to send an SMTP email with file attachment. When I compile using SBSv2 and GCCE (was previously SBSv1) and run on an N8 device (updated to the latest Belle) I get an "Application Closed: Main KERN-EXEC3" error and the SendAs RunL returns an error -15 (Server Terminated).
Now, Main is the not the name of my application and my application continues to run so I am not sure what routine exactly has terminated. Presumably it is the SendAs server(?) Note I have used a zero ErrRd file to ensure the panic is displayed.
Here is where it gets strange: If I run using on device debugging (via CODA) it runs fine! No crashes, attachment is attached and email is sent and received.
Needless to say this makes debugging that much harder. Can anyone point me in a positive direction? Help appreciated
For reference the Belle SDK gives numerous warnings...and it would be nice to clear these...
[HTML]C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/mw/extendedconnpref.h:334: warning: extra tokens at end of #endif directive
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/e32des8.h:230: note: the mangling of 'va_list' has changed in GCC 4.4
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/platform/d32locd.h:219: warning: invalid access to non-static data member 'TLocalDriveCaps::iSize' of NULL object
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/platform/d32locd.h:219: warning: (perhaps the 'offsetof' macro was used incorrectly)
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/platform/d32locd.h:220: warning: invalid access to non-static data member 'TLocalDriveCapsV3::iFormatInfo' of NULL object
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/platform/d32locd.h:220: warning: (perhaps the 'offsetof' macro was used incorrectly)
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/e32event.h:271: warning: dereferencing type-punned pointer will break strict-aliasing rules
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/e32event.h:437: warning: dereferencing type-punned pointer will break strict-aliasing rules
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/f32file.h:2284: warning: invalid access to non-static data member 'TVolFormatParam::iUId' of NULL object
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/f32file.h:2284: warning: (perhaps the 'offsetof' macro was used incorrectly)
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/mw/msvstd.inl:424: warning: suggest parentheses around arithmetic in operand of '|'
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/openfont.h:2463: warning: invalid access to non-static data member 'CShaperFactory::iDtor_ID_Key' of NULL object
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/openfont.h:2463: warning: (perhaps the 'offsetof' macro was used incorrectly)
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/biditext.h:25: warning: declaration 'enum CGraphicsContext::TTextAlign' does not declare anything
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/s32stor.inl:81: instantiated from here
C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/include/e32cmn.inl:2645: warning: dereferencing type-punned pointer will break strict-aliasing rules
c:/progra~1/codeso~1/source~1/bin/../lib/gcc/arm-none-symbianelf/4.4.1/../../../../arm-none-symbianelf/bin/ld.exe: warning: C:/Nokia/devices/Nokia_Symbian_Belle_SDK_v1.0/epoc32/release/armv5/urel/usrt3_1.lib(ucppinit.o) uses variable-size enums yet the output is to use 32-bit enums; use of enum values across objects may fail[/HTML]
I can also add, if I disable the line that adds the attachment the email, it sends fine without crashing. The attachment is a linked file and I know this exists prior to sending as it is deleted after a successful send.
Re: Belle and sending message attachment
Ok after much more investigation I discovered more....
1. It was not the SendAs server that was crashing but rather when my same application attempted to open the USB serial port around the same time my first SMTP message was being sent.
2. It was crashing when the USB open comm port call attempt failed because access was denied
3. Access to the comm port was denied because CODA was running on the device and had locked the port.
It then took me a long time to get CODA working over WiFi. I eventually worked out I had to go into the Windows settings and unblock port 1534. Once this was done the USB comm port was released and my application would run properly.
Hope this may help someone else.
Re: Belle and sending message attachment
Ok I am back to this problem again as I have not actually solved it. Sometimes it compiles and runs ok, other times not but I have definitely isolated it to this line;
If I comment it out it works fine (minus sending an attachment that is), leave it in and I get a panic so I need some help to step through this to make sure I understand what is going on.
When the line is in I get an "Application Closed: Main KERN-EXEC3" error and the SendAs RunL iStatus returns an error -15 (Client/server send/receive operation cannot run, because the server has terminated.).
I have an ErrRd file so the panics should be enunciated so firstly whose "Main" is being referred to - my application or an internal client/server application eg message server? Note my application appears to continue to run....