Quantcast
Channel: ImapX 2
Viewing all articles
Browse latest Browse all 1952

Commented Issue: The message.Process() go into infinite loop [1495]

$
0
0
The function Message.Process() sometime go into infinite loop.
It's hard to debug this error, my program is something like the following:

```
// try to schedule a one gmail checking
while(true)
{
-open connection
-login
foreach(var mes in Messages)
{
if(mess.Process()) => go into infinite loop after about 1.5 day ~ 400th loops, hard to debug.
{
// do something
}
}

- logout and close connection
- wait 5 minutes
}
```
Comments: ** Comment from web user: conquerorvn **

Hi Pavel,
I've found another error,
The new version passed the line which cause non-stop but, it alway throw an exception at other line: Message.Process() as following.

```
Folder folder = imapClient.Folders["INBOX"];
int justInsEmailId = -1;
for (int i = folder.Messages.Count - 1; i >= 0; i--)
{
Message mess = folder.Messages[i];
if (mess.Process()) // => always throw Exception "Object reference not set to an instance of an object."
{
// do something
} // end of 1 email
} // end of for of inbox
```
Could you please recheck the problem.


Viewing all articles
Browse latest Browse all 1952

Trending Articles