Return-Path: X-Original-To: apmail-poi-dev-archive@www.apache.org Delivered-To: apmail-poi-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 293418C2C for ; Mon, 22 Aug 2011 13:02:33 +0000 (UTC) Received: (qmail 80172 invoked by uid 500); 22 Aug 2011 13:02:32 -0000 Delivered-To: apmail-poi-dev-archive@poi.apache.org Received: (qmail 80038 invoked by uid 500); 22 Aug 2011 13:02:31 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 80023 invoked by uid 99); 22 Aug 2011 13:02:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2011 13:02:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2011 13:02:30 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id B558C3CA17; Mon, 22 Aug 2011 13:02:09 +0000 (UTC) From: bugzilla@apache.org To: dev@poi.apache.org Subject: DO NOT REPLY [Bug 51703] New: IllegalArgumentException when applying font Date: Mon, 22 Aug 2011 13:02:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: POI X-Bugzilla-Component: HSSF X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: jan.stette@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@poi.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=51703 Bug #: 51703 Summary: IllegalArgumentException when applying font Product: POI Version: 3.8-dev Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: HSSF AssignedTo: dev@poi.apache.org ReportedBy: jan.stette@gmail.com Classification: Unclassified I have seen POI failing to read several spreadsheets, with the following stack trace: Caused by: java.lang.IllegalArgumentException: Start index must be less than end index. at org.apache.poi.hssf.usermodel.HSSFRichTextString.applyFont(HSSFRichTextString.java:139) at org.apache.poi.hssf.record.TextObjectRecord.processFontRuns(TextObjectRecord.java:157) at org.apache.poi.hssf.record.TextObjectRecord.(TextObjectRecord.java:133) at sun.reflect.GeneratedConstructorAccessor45.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.apache.poi.hssf.record.RecordFactory$ReflectionConstructorRecordCreator.create(RecordFactory.java:57) ... 20 more Debugging it, it looks like there's a text record which has a font applied, where the length of the text string is 42 characters (in one of the examples), but the index for where to apply the font is 60. The cases I've seen this being a problem all seem related to a floating graphic containing a formatted string only, but I don't know if that's definitely the cause of it as I haven't been able to reproduce this in a simple spreadsheet that I've created myself. I'm afraid the spreadsheets I have that produce this problem can't be provided as they contain confidential data. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org For additional commands, e-mail: dev-help@poi.apache.org