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 165186

Summary: Add range check in Formatting settings
Product: editor Reporter: Jiri Prox <jiriprox>
Component: Formatting & IndentationAssignee: Rastislav Komara <moonko>
Status: REOPENED ---    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Jiri Prox 2009-05-14 15:55:43 UTC
Product Version: NetBeans IDE Dev (Build 200905120201)
Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02
System: Linux version 2.6.24-23-generic running on i386; UTF-8; en_US (nb)
Userdir: /home/jp159440/.netbeans/dev

Some range checking can be implemented in Blank Lines panel in Formatting options. By accident  I've enter too big
number and IDE got unresponsive and ended in OutOfMemoryException.
Comment 1 SebastianZ 2015-09-16 06:10:15 UTC
A restriction to 10 would probably be enough.

It might help to turn the fields into spin controls, if possible.

Sebastian
Comment 2 Martin Balin 2016-07-07 07:32:05 UTC
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
Comment 3 SebastianZ 2016-08-05 10:03:33 UTC
Tested in 8.2 (Build 201608050002) and could still reproduce the issue.

Steps to reproduce:
1. Go to Tools > Options > Editor > Formatting
2. Select PHP as language and 'Blank Lines' as category
3. Enter 10000000 into the 'Before Namespace' field

=> NetBeans ran out of memory.

Instead of allowing to enter arbitrary values, the fields should be changed to numeric inputs (aka spin controls, like the one used e.g. within the 'Tabs And Indents' category) with a range restriction from 0 to 10.

Sebastian