[bug] POP client crashes when an email has an attachment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[bug] POP client crashes when an email has an attachment

Stephen-71
Issue status update for
http://smalltalk.gnu.org/node/178
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/178

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    NetClients
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  swoolerton
 Updated by:   swoolerton
 Status:       active

Sample code ...


$ cat ./popTest2.st
#! /usr/bin/gst  -f
PackageLoader fileInPackages: #('NetClients')!
    | client host username password popClient |
    host := 'mailhost'.
    username := 'mailuser'.
    password := 'mailpw'.
    client := NetClients.POP.POPClient connectToHost: host.
    [client
        username: username
        password: password.
        client login.
        Transcript showCr: 'New messages: ', client newMessagesCount
printString.
        Transcript showCr: 'bytes ', client newMessagesSize
printString.
        Transcript showCr: 'ids ', client newMessagesIds printString.
        Transcript showCr: 'sizes ', client newMessages printString.
        client
            getNewMailMessages: [:mimeEntity |
               "mimeEntity inspect."]
            delete: false
    ] ensure: [client close] !


Note: In code above, the statement  
'mimeEntity inspect' has been commented out and the program still
crashes.

Program run

$ ./popTest2.st
New messages: 1
bytes 583868
ids (1 )
sizes LookupTable (
        1->583868
)
Object: POPProtocolInterpreter new "<-0x4c7f6e48>" error: Protocol
error:
NetClients.ProtocolError(Exception)>>signal
NetClients.ProtocolError(Exception)>>signal:
NetClients.POP.POPProtocolInterpreter(NetClients.NetProtocolInterpreter)>>protocolError:
[] in NetClients.POP.POPProtocolInterpreter>>checkResponse:
NetClients.POP.POPProtocolInterpreter>>checkResponse:ifError:
NetClients.POP.POPProtocolInterpreter>>checkResponse:
NetClients.POP.POPProtocolInterpreter(NetClients.NetProtocolInterpreter)>>checkResponse
NetClients.POP.POPProtocolInterpreter>>popQuit
NetClients.POP.POPClient>>logout
NetClients.POP.POPClient(NetClients.NetClient)>>close
optimized [] in UndefinedObject>>executeStatements
BlockClosure>>ensure:
UndefinedObject>>executeStatements


If it helps, I have found that I can delete messages with attachments.
The program will still crash, however the message with the attachment
does get deleted. e.g.
    client
        getNewMailMessages: [:m | ]
        delete: true
    ] ensure: [client close] !  !


Type of attachment doesn't seem to make a difference. For example, the
attachment in the example above was a .png file. Non-delivery reports
from a Postfix mail server have attachments and also cause a crash.




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk