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 236213 - Warning dialog "file seems to be to large" won't go away
Summary: Warning dialog "file seems to be to large" won't go away
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 236935 238404 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-21 08:56 UTC by MackSix
Modified: 2014-01-09 02:56 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (291.61 KB, image/png)
2013-09-21 08:56 UTC, MackSix
Details
Log file (246.47 KB, text/plain)
2013-09-21 08:56 UTC, MackSix
Details
Log file of another occurance. (95.49 KB, text/plain)
2013-09-21 13:00 UTC, MackSix
Details
thread dump (29.49 KB, text/plain)
2013-09-23 09:45 UTC, MackSix
Details
Project for reproduction. (1.80 MB, application/x-zip-compressed)
2013-09-23 10:54 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2013-09-21 08:56:15 UTC
Created attachment 140328 [details]
Screenshot

I am working on a program that writes a lot of data to a file. I have the file already open that it writes too. I run the project and create a large amount of writes to the file, overwriting it and then I close the project. A dialog pops up in NetBeans warning about the file may be to large to open. There is an OK button and Close button. I can't proceed any further pressing either button and must kill NetBeans from Windows task manager.

See screenshot.
Comment 1 MackSix 2013-09-21 08:56:47 UTC
Created attachment 140329 [details]
Log file

Product Version: NetBeans IDE 7.4 RC1 (Build 201309162201)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b48
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b106
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 2 MackSix 2013-09-21 09:12:31 UTC
When I restart NetBeans, I open the file from the File Window and get the dialog again, but this time I click OK and it works. The file opens fine. I have -J-Xmx2048m and 16GB of ram. It handles the file just fine. It has 436,000 lines with  one word on each line.


I can't reproduce it now and it never pops up the dialog now on the file when I open it.
Comment 3 MackSix 2013-09-21 09:15:37 UTC
The file is 2.03 MB in size.
Comment 4 MackSix 2013-09-21 13:00:30 UTC
Created attachment 140338 [details]
Log file of another occurance.

It happened again under the same conditions. I will have to kill NetBeans with Windows task manager to recover. Attached is another log. 

This is common in both files before it happens: 

java.io.IOException: cannot transfer non-text data as Reader
	at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1213)
Comment 5 Jaroslav Havlin 2013-09-23 07:34:26 UTC
Can you please try to reproduce the bug again, and create a thread dump while
the IDE is stuck? We need to know what's happening when the IDE is unresponsive.
Thank you.
Comment 6 MackSix 2013-09-23 09:45:36 UTC
Created attachment 140368 [details]
thread dump

Here is a thread dump. I think I can reproduce now.
Comment 7 Jaroslav Havlin 2013-09-23 09:56:57 UTC
Thank you very much for the thread dump. Unfortunately, I cannot find the cause
of the problem in it, no deadlock occurred.

I tried to to reproduce the bug, but it works fine for me.
Are these steps correct?

1. Open the big file (in editor tab).
2. Modify it externally.
3. Close the project.
4. Dialog pops up, IDE freezes?
Comment 8 MackSix 2013-09-23 10:16:56 UTC
(In reply to Jaroslav Havlin from comment #7)
> Thank you very much for the thread dump. Unfortunately, I cannot find the
> cause
> of the problem in it, no deadlock occurred.
> 
> I tried to to reproduce the bug, but it works fine for me.
> Are these steps correct?
> 
> 1. Open the big file (in editor tab).
> 2. Modify it externally.
> 3. Close the project.
> 4. Dialog pops up, IDE freezes?

Not exactly, apparently it involves diff view open and find bar open too.  hold on I am working on reproducing it again and get exact steps for you.
Comment 9 MackSix 2013-09-23 10:54:08 UTC
Created attachment 140371 [details]
Project for reproduction.

I have an SSD drive, so I don't know how much longer you have to wait for the file to be written to your drive if you have regular hard drive.

1. Set -J-Xms128m -J-Xmx2048m in netbeans.conf
2. Open attached project in NetBeans.
3. Run Project and open file "98.txt" located in the project directory.
4. Click the yellow highlight button and wait about 20 seconds. 
5. Once you see yellow highlighing, close the running project. 
6. Open "FindAndHighlightWords.java" file in editor.
7. Go to the Files tab and in the project directory and file "string-search-out.txt" was created. Open this file.
8. Open "test-search-out.txt" and right click on the editor tab and choose "Diff To..." and choose "string-search-out.txt" to compare too.
9. Wait about 25 seconds for the Visual Compare to finish calculating and updating the view. 
10. View will show a differnce at line 67504 in "string-search-out.txt".
11. Click on the "string-search-out.txt" tab in the editor and press Ctrl+F to open Find Bar. Enter the[^\w] and click the Regex button.
12. Click on the other text file tab and view it, then click on "FindAndHighlightWordsModel.java" to view it.
13. Run the project again and open up "2600.txt" located in project directory.
14. Click the yellow highlight button and wait 50 seconds. After yellow highlighting appears, close running project.

Results: Dialog pops-up saying "The file string-search-out.txt seems to be too large (1Mb) to safely open..." and clicking the Yes
or No button does nothing, the dialog box keeps reappearing and I have to kill NetBeans with Task Manager.
Comment 10 Jaroslav Havlin 2013-09-24 08:15:55 UTC
Great, I was able to reproduce the bug.
Thank you very much for sharing the project and formulating the steps to reproduce!

The problem seems to be in class org.openide.text.DocumentOpenClose.DocumentLoad.
The UserQuestionExceptionHandler in method reloadUQEThrown calls 
"activeReloadTask.schedule(0)" after any of the buttons is clicked.

So if an originally small document is modified externally so that it's size
exceeds the limit, the question ("Open big file?") will be asked infinitely.

Reassigning to platform/Text. Please evaluate, thank you.
Comment 11 Marian Mirilovic 2013-10-17 08:15:17 UTC
*** Bug 236935 has been marked as a duplicate of this bug. ***
Comment 12 markiewb 2013-11-15 22:20:57 UTC
*** Bug 238404 has been marked as a duplicate of this bug. ***
Comment 13 Miloslav Metelka 2014-01-07 14:27:55 UTC
http://hg.netbeans.org/jet-main/rev/ad88d9a8202b
Comment 14 Quality Engineering 2014-01-09 02:56:48 UTC
Integrated into 'main-silver', will be available in build *201401090002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ad88d9a8202b
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #236213 - Warning dialog "file seems to be to large" won't go away.