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 240477 - Limit number of warning dialogs for missing disk space
Summary: Limit number of warning dialogs for missing disk space
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.4
Hardware: PC Linux
: P4 normal (vote)
Assignee: Jaroslav Havlin
Depends on:
Reported: 2014-01-14 22:35 UTC by kalle1
Modified: 2014-01-22 15:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

screenshot of fresh 7.4 installation after opening geotools-git with 20 MB free disk space (211.25 KB, application/octet-stream)
2014-01-15 12:59 UTC, kalle1
Patch (Draft) (2.03 KB, patch)
2014-01-22 15:53 UTC, Jaroslav Havlin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kalle1 2014-01-14 22:35:43 UTC
When running out of disk space and running background scanning, the IDE opens a lot of/seemingly infinite number of warning dialogs. I couldn't see what the warning is about because I have to kill the JVM in order to make my system usable again. It would be useful if the IDE could check whether another dialog is already display notifying about the issue.
Comment 1 Stanislav Aubrecht 2014-01-15 09:55:20 UTC
Please attach a screen shot of that warning dialog and reopen, thanks.
Comment 2 kalle1 2014-01-15 12:59:14 UTC
Created attachment 143979 [details]
screenshot of fresh 7.4 installation after opening geotools-git with 20 MB free disk space

I attach a screenshot of fresh 7.4 installation after opening all required projects of geotools-git ( with 20 MB free disk space

I provide the following script to set the disk space to desired size in a linux VM (ajust the avail_result_kb parameter of the function):

import re
import subprocess as sp
import tempfile as tmp

def netbeans(avail_result_kb=20000):
        o = sp.check_output(["df", "/dev/sda1"])
        avail_kb = int(re.split("[\\s]+", o.split("\n")[1])[3])
	print("%d KB available, limiting to %d KB" % (avail_kb, avail_result_kb))
	tmp_file_path = tmp.mkstemp()[1]
	tmp_file = open(tmp_file_path, "rw+")
	i = 0
        while i < avail_kb-avail_result_kb:
		tmp_file.write(1024*"a") # write 2048 bytes as utf-8 string
		i = i+1

if __name__ == "__main__":
The result is sometimes only 5 dialogs (which is also bad because it should be just one), but the worst has been opening dialogs for a minute (I can only imagine #dialogs > 10000)
Comment 3 Jaroslav Havlin 2014-01-16 09:25:25 UTC
thank you for the screenshot. Unfortunately, I still don't know what module creates these dialogs (maybe filesystem or indexing).
Can you please also attach your IDE Log?
Comment 4 Jaroslav Havlin 2014-01-22 15:53:03 UTC
The dialogs are created in org.netbeans.core.NotifyExcPanel.notify().
(A dialog is created for every localized exception).

It might be better to use NotificationDisplayer instead of DialogDisplayer.
Attaching draft of a patch that might be applied in the future. Further evaluation and testing is needed.
(But, in the case of a insufficient disk space, the IDE was unusable anyway.)

Thank you for reporting.
Comment 5 Jaroslav Havlin 2014-01-22 15:53:36 UTC
Created attachment 144254 [details]
Patch (Draft)