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: | IndexOutOfBoundsException: index=1 >= size()=1 | ||
---|---|---|---|
Product: | editor | Reporter: | mmolda |
Component: | Lexer | Assignee: | Miloslav Metelka <mmetelka> |
Status: | REOPENED --- | ||
Severity: | normal | CC: | Alniks, amobilia, angel_mora, Avo.Azatyan, basil, BauGG, CarusoGabriel, cjcat, csmithg, damianociarla, Ercinee, Ernest001, everflux, garymize, geoB, harunaga, hrza, jaras2678, Jenselme, jruiz077, jun_shiromoto, kganfield, khaperets, mahmuddinnf, Mangesh123, maxroby, mcinp, merlindiavova, mfarahat, mircea273, mmikeyy, ndwolf, pvidal, saidbakr, socheata.suy, wissenstein, zeloras |
Priority: | P1 | ||
Version: | 7.4 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 201022 |
Attachments: |
stacktrace
stacktrace stacktrace stacktrace stacktrace HTML file, which cannot be edited through IndexOfBoundException |
Description
mmolda
2013-06-26 12:56:26 UTC
Created attachment 136337 [details]
stacktrace
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=201022 Created attachment 137989 [details]
stacktrace
Twig file does not work
Created attachment 138424 [details]
stacktrace
I got IndexOutOfBounds in middle of writting twig template... It was very strange, and this is first time i encouter this exception in editor. I reproduce it by opening block tag and pressing ctrl + f combination...
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=201022 This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=201022 This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=201022 Created attachment 143470 [details]
stacktrace
editing twig template
Created attachment 143947 [details]
stacktrace
typing in twig file in editor
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss I just managed to reproduce this expection on a HTML file on Angular project. See: http://statistics.netbeans.org/exceptions/exception.do?id=829447 This happens on angular project after typing {{ at line 12. It also happens if I open an HTML file with two opening {{ but no matching }} to close the tag. HTML Code: <!doctype html> <html ng-app> <head> <script src="http://code.angularjs.org/1.0.6/angular.min.js"></script> <script src="script.js"></script> </head> <body> <div ng-controller="SettingsController"> <h1>{{name}}</h1>{{lastName}} Name: <input type="text" ng-model="name"/> [ <a href="" ng-click="greet()">greet</a> ]<br/> Contact: {{ <ul> <li ng-repeat="contact in contacts"> <select ng-model="contact.type" class="{{cssColor}}"> <option>phone</option> <option>email</option> </select> <input type="text" ng-model="contact.value"/> [ <a href="" ng-click="clearContact(contact)">clear</a> Strangely this doesn't happen on line 15. Full HTML Code: <!doctype html> <html ng-app> <head> <script src="http://code.angularjs.org/1.0.6/angular.min.js"></script> <script src="script.js"></script> </head> <body> <div ng-controller="SettingsController"> <h1>{{name}}</h1>{{lastName}} Name: <input type="text" ng-model="name"/> [ <a href="" ng-click="greet()">greet</a> ]<br/> Contact: <ul> <li ng-repeat="contact in contacts"> <select ng-model="contact.type" class="{{cssColor}}"> <option>phone</option> <option>email</option> </select> <input type="text" ng-model="contact.value"/> [ <a href="" ng-click="clearContact(contact)">clear</a> | <a href="" ng-click="removeContact(contact)">X</a> ] </li> <li>[ <a href="" ng-dblclick="" ng-click="addContact()">add</a> ]</li> </ul> <div ng-controller="Ctrl"> {{foo}} <div ng-click="print()"></div> </div> </div> <div ng-controller="Ctrl2"> {{foo}} </div> </body> </html> Full JS Code: function SettingsController($scope) { $scope.name = "John Smith"; $scope.cssColor = "blue"; $scope.contacts = [ {type: 'phone', value: '408 555 1212'}, {type: 'email', value: 'john.smith@example.org'}]; $scope.greet = function() { alert(this.name); }; $scope.addContact = function() { this.contacts.push({type: 'email', value: 'yourname@example.org'}); }; $scope.removeContact = function(contactToRemove) { var index = this.contacts.indexOf(contactToRemove); this.contacts.splice(index, 1); }; $scope.clearContact = function(contact) { contact.type = 'phone'; contact.value = ''; }; $scope.foo = 1; } function Ctrl($scope) { $scope.page = 1; $scope.printAttempt = { number: 1, total: 2 } $scope.print = function() { }; } function Ctrl2($scope) { $scope.foo = 1; } Created attachment 162650 [details]
HTML file, which cannot be edited through IndexOfBoundException
Create a Maven Java Web Application.
Put file component.html (attached) into the project.
Open file component.html in the editor.
Put cursor into line 182 and press Enter.
ACTUAL RESULT
IndexOfBoundException is thrown.
EXPECTED RESULT
A new line appears in the file and no exception is thrown.
(In reply to wissenstein from comment #13) Product Version = NetBeans IDE Dev (Build 201610260002) Operating System = Windows 10 version 10.0 running on amd64 Java; VM; Vendor = 1.8.0_102 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.102-b14 |