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.

Bug 201450 - IllegalArgumentException: Contents must be presorted - added value 79041 is less than preceding value 79756
Summary: IllegalArgumentException: Contents must be presorted - added value 79041 is l...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Output Window (show other bugs)
Version: 7.1.1
Hardware: All All
: P2 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
: 208579 213859 222973 223140 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-30 17:08 UTC by luislobo
Modified: 2013-06-13 01:15 UTC (History)
23 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 180817


Attachments
stacktrace (1.28 KB, text/plain)
2011-08-30 17:08 UTC, luislobo
Details
Debug log with finest logging enabled (102.68 KB, application/octet-stream)
2013-05-25 01:23 UTC, lowjoel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description luislobo 2011-08-30 17:08:18 UTC
Build: NetBeans IDE Dev (Build 201108220601)
VM: Java HotSpot(TM) Client VM, 20.1-b02, Java(TM) SE Runtime Environment, 1.6.0_26-b03
OS: Linux

User Comments:
luislobo: starting an xdebug php session




Stacktrace: 
java.lang.IllegalArgumentException: Contents must be presorted - added value 79041 is less than preceding value 79756
   at org.netbeans.core.output2.IntList.add(IntList.java:76)
   at org.netbeans.core.output2.AbstractLines.addTabAt(AbstractLines.java:1082)
   at org.netbeans.core.output2.OutWriter.doWrite(OutWriter.java:424)
   at org.netbeans.core.output2.OutWriter.println(OutWriter.java:319)
   at org.netbeans.core.output2.NbWriter.println(NbWriter.java:165)
   at org.netbeans.modules.php.dbgp.packets.DbgpStream.process(DbgpStream.java:93)
Comment 1 luislobo 2011-08-30 17:08:22 UTC
Created attachment 110285 [details]
stacktrace
Comment 2 Jaroslav Havlin 2011-10-17 12:28:44 UTC
I am sorry, I am not able to reproduce this problem. Could you please describe steps that lead to this exception. Thank you in advance.
Comment 3 Exceptions Reporter 2011-10-31 22:29:52 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=180817
Comment 4 Jaroslav Havlin 2012-05-09 15:16:30 UTC
*** Bug 208579 has been marked as a duplicate of this bug. ***
Comment 5 naitsirch 2012-05-22 06:39:52 UTC
I have started the PHP debugger (XDebug) and klicked on a link on my website. Then this exception occurs.

Environment:
Win 7
Apache 2.4
PHP Version 5.3.10, TS, VC9
Xdebug Version 2.1.4
Comment 6 naitsirch 2012-05-22 06:41:18 UTC
(In reply to comment #5)
> I have started the PHP debugger (XDebug) and klicked on a link on my website.
> Then this exception occurs.
> 
> Environment:
> Win 7
> Apache 2.4
> PHP Version 5.3.10, TS, VC9
> Xdebug Version 2.1.4

I forgot to mention that I have installed nightly build NetBeans IDE Build 201205200400
Comment 7 Jaroslav Havlin 2012-05-22 12:48:11 UTC
Thank you for your comments, but still cannot reproduce, neither manually nor with a test case (using several systems, JVM versions and PHP versions).
Does the problem occur often when you debug PHP project, or only seldom?
Please, it would be great if you can describe some steps to reproduce.
Comment 8 naitsirch 2012-05-24 20:12:51 UTC
No, it is happens like randomly...
But the daily build version has some more bugs, so it is hard to use in productive. The autocomplete did not work properly and so on... maybe I start to try the latest nightly build tomorow.
Comment 9 Jaroslav Havlin 2012-06-11 08:15:13 UTC
*** Bug 213859 has been marked as a duplicate of this bug. ***
Comment 10 erisler 2012-06-25 21:13:33 UTC
I get this everytime I try to run an interactive debug session with xdebug and netbeans.

Netbeans 7.1.1
XDEBUG 2.2.0
Comment 11 naitsirch 2012-09-19 18:53:28 UTC
Maybe this bug has been fixed already. Because since I am using NB 7.2 (right from the release date) I never got this error again ;-)

@erisler: Have you already tried NetBeans 7.2 ?
Comment 12 Marian Mirilovic 2012-09-20 13:14:34 UTC
132 dups ... at least P2
Comment 13 Jaroslav Havlin 2012-09-25 12:54:34 UTC
(In reply to comment #11)
> Maybe this bug has been fixed already. Because since I am using NB 7.2 (right
> from the release date) I never got this error again ;-)
Unfortunately, there is a new report comming from version 7.2.

Most of reported exceptions are related to XDebug.
Maybe there is problematic sequence of characters in some pages.

Please, can you provide a page that causes this problem when it is debugged?
Thanks.
Comment 14 Jaroslav Havlin 2012-10-15 15:50:11 UTC
I'm trying to reproduce, but with no success.
Please, can someone provide exact steps to reproduce, or a PHP file which causes the exception while it is debugged?
Comment 15 Jaroslav Havlin 2012-10-26 16:14:43 UTC
I'm sorry, I haven't been able to reproduce the bug yet.
Closing as incomplete.
Please reopen if you can attach PHP script that causes the exception when it is debugged, or if you can provide more information.
Thank you in advance.
Comment 16 Tomas Mysik 2012-10-29 10:20:13 UTC
Adding Ondra to CC, he is owner of PHP debugger.

Thanks.
Comment 17 Ondrej Brejla 2012-10-29 10:45:09 UTC
I've never seen that before :/ PHP Debugger support prints some lines into the Output window and the string, which is printed, is acquired from XML sent by PHP XDebug. So maybe it returns some really strange sequence of characters (it wouldn't be a first time there is a problem with strange char sequences returned by XDebug ;), which are somehow handled incorrectly in the deeper infrastructure? Maybe in some wrong encoding? I don't know...it's hard to reproduce if you don't have an exact file with an exact content in exact encoding and such. It never happened to me.
Comment 18 Ondrej Brejla 2012-10-29 12:40:03 UTC
I bet on some encoding problem, but really don't know what to do :) Maybe some extra logging in OutWriter and related classes can help you?
Comment 19 Jaroslav Havlin 2012-10-29 13:10:17 UTC
> I bet on some encoding problem, but really don't know what to do :) Maybe some
> extra logging in OutWriter and related classes can help you?
Indeed, encoding problems could cause this error. I'll test it more deeply and unless I discover something I'll add some logging.

I've already tried to create some PHP scripts that output sequence of characters that could be problematic, but everything worked well. I wasn't able to find any suspicious places when I debugged the Output Window code.

I still hope that someone will attach a problematic PHP script or add some useful information.

Thank you for your help, Ondra.
Comment 20 Jaroslav Havlin 2012-11-29 14:38:05 UTC
*** Bug 222973 has been marked as a duplicate of this bug. ***
Comment 21 Jaroslav Havlin 2012-11-29 14:43:35 UTC
http://hg.netbeans.org/core-main/rev/97c0832f57a1
Some extra logging added. If you can reproduce the bug, please run (after the changeset gets into the development build) NetBeans with parameter -J-Dorg.netbeans.core.output2.level=FINEST and try it again. The IDE Log should contain new information. Thank you.
Comment 22 Quality Engineering 2012-12-02 03:06:03 UTC
Integrated into 'main-golden', will be available in build *201212020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/97c0832f57a1
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #201450: Log invocations of AbstractLines.addTabAt(int, int)
Comment 23 spookee 2012-12-16 17:59:57 UTC
Reopening this bug based on new exception report: http://statistics.netbeans.org/exceptions/exception.do?id=640314
Comment 24 Jaroslav Havlin 2012-12-17 09:06:54 UTC
(In reply to comment #23)
> Reopening this bug based on new exception report:
> http://statistics.netbeans.org/exceptions/exception.do?id=640314
Thanks for the report, but I cannot find much more useful info than in older reports.

Please try this:
> Some extra logging added. If you can reproduce the bug, please run NetBeans 
> with parameter -J-Dorg.netbeans.core.output2.level=FINEST and try it again. 
> The IDE Log should contain new information. Thank you.

Or this:
> Please reopen if you can attach PHP script that causes the exception when it is
> debugged.

Thank you.
Comment 25 Jaroslav Havlin 2012-12-18 10:08:52 UTC
*** Bug 223140 has been marked as a duplicate of this bug. ***
Comment 26 javydreamercsw 2013-01-21 22:16:16 UTC
Reopening this bug based on new exception report: http://statistics.netbeans.org/exceptions/exception.do?id=650795
Comment 27 Jaroslav Havlin 2013-01-22 14:42:20 UTC
(In reply to comment #26)
> Reopening this bug based on new exception report:
> http://statistics.netbeans.org/exceptions/exception.do?id=650795
More information is needed to reproduce and fix this bug.
Please see comment #21. Thanks.
Comment 28 lowjoel 2013-05-25 01:23:32 UTC
Created attachment 134886 [details]
Debug log with finest logging enabled
Comment 29 lowjoel 2013-05-25 01:24:47 UTC
It seems to still be happening using the latest nightly. I can't pin it down either. The same code path yesterday was debugging fine, but it throws that exception today.
Comment 30 Jaroslav Havlin 2013-06-11 08:44:09 UTC
(In reply to comment #28)
> Created attachment 134886 [details]
> Debug log with finest logging enabled
Thank you very much for the long-awaited log with FINEST messages.

It seems that PHP debugger prints 10MB text to the Output Window at once.
Do you generate HTML document, or some other data?
Comment 31 lowjoel 2013-06-11 09:47:42 UTC
It's been a while, but I don't think so. It could be I was debugging a Drupal application, and Drupal has huge document arrays before it's rendered to HTML.

Also, it could also be a potential recursive structure. I'm not sure how xdebug or NetBeans handles structures with recursion in it (i.e. object member points to another object, other object might point back to original object)

Recently I've not had it, but I thought it might be good to squash this once and for all.
Comment 32 Jaroslav Havlin 2013-06-11 15:50:53 UTC
(In reply to comment #31)
> Recently I've not had it, but I thought it might be good to squash this once
> and for all.
Should be fixed in http://hg.netbeans.org/core-main/rev/fd60f5d0ea60

Thank you for the log again, it helped a lot!
Comment 33 Quality Engineering 2013-06-13 01:15:48 UTC
Integrated into 'main-golden', will be available in build *201306122301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/fd60f5d0ea60
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #201450: IllegalArgumentException: Contents must be presorted - added value 79041 < preceding 79756