This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | IllegalArgumentException: (endOffset=19219 - startOffset=19218) < (startGuardedLength=1 + endGuardedLength=1) | ||
---|---|---|---|
Product: | php | Reporter: | padraigdoran |
Component: | Editor | Assignee: | Ondrej Brejla <obrejla> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cybersoft, drazisil, tomjnsn |
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 22969 |
Attachments: |
stacktrace
Strawman's fix of the issue stacktrace stacktrace |
Description
padraigdoran
2013-03-15 16:30:41 UTC
Created attachment 132664 [details]
stacktrace
Reproduced The root cause is that PHP reports 'code block' fold, which is defined as surrounded by 2 chars (i.e. {}), but the reported block is just 1 character long. The previous implementation had silently filtered such invalid data, hiding the error. I would prefer not hiding the error out again. Please see the attached proposed patch for a simple fix for this case. I recommend also not to create folds for single-statement if-else branches; or more precise for single-line branches as done in <= 7.3. Created attachment 132666 [details]
Strawman's fix of the issue
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=22969 Created attachment 132683 [details]
stacktrace
editing a php file.
Created attachment 132708 [details]
stacktrace
Had just typed
for ($item = 0; $item < $this->rssItemCount; $i)
Fixed in web-main #2517e6bb3263 Integrated into 'main-golden', will be available in build *201303182300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2517e6bb3263 User: Ondrej Brejla <obrejla@netbeans.org> Log: #227538 - IllegalArgumentException: (endOffset=19219 - startOffset=19218) < (startGuardedLength=1 + endGuardedLength=1) Not fixed. Still getting exceptions (reported them: "It has now been added to the database with id #665717. It has been classified as a duplicate of report #22969") I did a build from here, which is later than the fixed changeset: changeset: 248393:c36b59f8d48f tag: tip user: Ondrej Brejla <obrejla@netbeans.org> date: Tue Mar 19 07:57:26 2013 +0100 summary: Fixed failing tests. Sorry, but I'm not able to reproduce that in todays dev build with your example. Can you provide exact steps, how to do that? Thanks in advance. Then simply reopen. Product Version: NetBeans IDE Dev (Build 20130319-c36b59f8d48f) Java: 1.6.0_26; Java HotSpot(TM) Client VM 20.1-b02 Runtime: Java(TM) SE Runtime Environment 1.6.0_26-b03 System: Linux version 3.5.0-25-generic running on i386; UTF-8; cs_CZ (nb) I am also not be able to reproduce this issue in todays dev build Product Version: NetBeans IDE Dev (Build 201303182300) Java: 1.7.0_17; Java HotSpot(TM) Client VM 23.7-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02 System: Linux version 3.5.0-25-generic running on i386; UTF-8; en_US (nb) Fixed in web-main #310f68bfa393 Integrated into 'main-golden', will be available in build *201303222300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/310f68bfa393 User: Ondrej Brejla <obrejla@netbeans.org> Log: #227538 - IllegalArgumentException: (endOffset=19219 - startOffset=19218) < (startGuardedLength=1 + endGuardedLength=1) |