org.apache.james.mime4j.io.MaxLineLimitException

Bug #675133 reported by Adrian Gruntkowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Groundhog Usenet Reader
In Progress
Undecided
Unassigned

Bug Description

When I'm trying to fetch new messages from comp.lang.python (at least at this moment),
somewhere in the middle of the operation application reports the error with exception
mentioned in the summary.

- Groundhog 1.20.2
- Android 2.1
- Samsung Galaxy i5800

Revision history for this message
juanjux (juanjux) wrote : Re: [Bug 675133] [NEW] org.apache.james.mime4j.io.MaxLineLimitException

Should be fixed on 1.20.3, thanks for the report. It the version doesn't fix
this for you please report again.

On Sun, Nov 14, 2010 at 11:36 AM, Adrian Gruntkowski <
<email address hidden>> wrote:

> Public bug reported:
>
> When I'm trying to fetch new messages from comp.lang.python (at least at
> this moment),
> somewhere in the middle of the operation application reports the error with
> exception
> mentioned in the summary.
>
> - Groundhog 1.20.2
> - Android 2.1
> - Samsung Galaxy i5800
>
> ** Affects: groundhog
> Importance: Undecided
> Status: New
>
> --
> org.apache.james.mime4j.io.MaxLineLimitException
> https://bugs.launchpad.net/bugs/675133
> You received this bug notification because you are the registrant for
> Groundhog Usenet Reader.
>
> Status in Groundhog Usenet Reader: New
>
> Bug description:
> When I'm trying to fetch new messages from comp.lang.python (at least at
> this moment),
> somewhere in the middle of the operation application reports the error with
> exception
> mentioned in the summary.
>
> - Groundhog 1.20.2
> - Android 2.1
> - Samsung Galaxy i5800
>
>
>

Revision history for this message
Adrian Gruntkowski (adrian-gruntkowski) wrote :

I'm sorry, but even after the update, the exception is still thrown.

Revision history for this message
juanjux (juanjux) wrote : Re: [Bug 675133] Re: org.apache.james.mime4j.io.MaxLineLimitException

Hi,

Could you click on the send button when you receive the force close so I can
get a full traceback? If not, you can use alogcat to send me a log to
juanjux @ gmail . com after the crash.

On Sun, Nov 14, 2010 at 4:43 PM, Adrian Gruntkowski <
<email address hidden>> wrote:

> I'm sorry, but even after the update, the exception is still thrown.
>
> --
> org.apache.james.mime4j.io.MaxLineLimitException
> https://bugs.launchpad.net/bugs/675133
> You received this bug notification because you are the registrant for
> Groundhog Usenet Reader.
>
> Status in Groundhog Usenet Reader: New
>
> Bug description:
> When I'm trying to fetch new messages from comp.lang.python (at least at
> this moment),
> somewhere in the middle of the operation application reports the error with
> exception
> mentioned in the summary.
>
> - Groundhog 1.20.2
> - Android 2.1
> - Samsung Galaxy i5800
>
>
>

Changed in groundhog:
status: New → In Progress
Revision history for this message
Adrian Gruntkowski (adrian-gruntkowski) wrote :

Today, when I made another attempt to fetch new messages from that group, everything went ok this time.
So I think that this bug may be closed for now. (BTW: I've tried to set max article fetch from 100 to 300.
When I've pushed "Get new articles" the status shown at first 0/100, as if the limit hadn't changed. Restart
didn't help. Maybe it's my misunderstanding, and this cap has only effect on newly susbscribed group.
If not, then maybe it's worth opening new ticket.

Revision history for this message
juanjux (juanjux) wrote :

No, it should change instantly, it that happens again and you can confirm
that the new limit is 300 in the settings please open a new report.

On Mon, Nov 15, 2010 at 12:43 PM, Adrian Gruntkowski <
<email address hidden>> wrote:

> Today, when I made another attempt to fetch new messages from that group,
> everything went ok this time.
> So I think that this bug may be closed for now. (BTW: I've tried to set max
> article fetch from 100 to 300.
> When I've pushed "Get new articles" the status shown at first 0/100, as if
> the limit hadn't changed. Restart
> didn't help. Maybe it's my misunderstanding, and this cap has only effect
> on newly susbscribed group.
> If not, then maybe it's worth opening new ticket.
>
> --
> org.apache.james.mime4j.io.MaxLineLimitException
> https://bugs.launchpad.net/bugs/675133
> You received this bug notification because you are the registrant for
> Groundhog Usenet Reader.
>
> Status in Groundhog Usenet Reader: In Progress
>
> Bug description:
> When I'm trying to fetch new messages from comp.lang.python (at least at
> this moment),
> somewhere in the middle of the operation application reports the error with
> exception
> mentioned in the summary.
>
> - Groundhog 1.20.2
> - Android 2.1
> - Samsung Galaxy i5800
>
>
>

Revision history for this message
Adrian Gruntkowski (adrian-gruntkowski) wrote :

The problem showed up again.

I took a look into the code, and I think I know the source of the problem.
Here's the backtrace (relevant part):

W/System.err( 2154): org.apache.james.mime4j.io.MaxLineLimitException: Maximum line length limit exceeded
W/System.err( 2154): at org.apache.james.mime4j.parser.AbstractEntity.fillFieldBuffer(AbstractEntity.java:138)
W/System.err( 2154): at org.apache.james.mime4j.parser.AbstractEntity.parseField(AbstractEntity.java:184)
W/System.err( 2154): at org.apache.james.mime4j.parser.MimeEntity.advance(MimeEntity.java:130)
W/System.err( 2154): at org.apache.james.mime4j.parser.MimeTokenStream.next(MimeTokenStream.java:356)
W/System.err( 2154): at org.apache.james.mime4j.parser.MimeStreamParser.parse(MimeStreamParser.java:144)
W/System.err( 2154): at org.apache.james.mime4j.message.Header.<init>(Header.java:89)
W/System.err( 2154): at com.almarsoft.GroundhogReader.lib.ServerManager.getArticleInfoAndHeaderFromHEAD(ServerManager.java:361)
W/System.err( 2154): at com.almarsoft.GroundhogReader.lib.ServerMessageGetter$ServerMessageGetterTask.doInBackground(ServerMessageGetter.java:222)
W/System.err( 2154): at com.almarsoft.GroundhogReader.lib.ServerMessageGetter$ServerMessageGetterTask.doInBackground(ServerMessageGetter.java:1)

The problem is that org.apache.james.mime4j.message.Header class has no constructor that accepts external MimeEntityConfig instance, so when it instantiates MimeStreamParser, it uses default values (maxLines included).

One way around this could be extending Header class and adding constructor accepting stream AND config object, which would be then passed to MimeStreamParser constructor. Then all it's occurences in Groundhog's code could be substituted with that improved version, and proper, altered version of config could be passed along.

I don't have Android SDK installed, so I can't test such change, but I think that this could correct that problem.

Revision history for this message
juanjux (juanjux) wrote :

Since I've already forker mime4j I'll probably just changue the default limit to "unlimited" in the next version.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.