POP client crashes when an email has an attachment

Project:GNU Smalltalk
Component:NetClients
Category:bug
Priority:normal
Assigned:Unassigned
Status:active
Description

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.

User login