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 175093 - Big document cannot be opened
Summary: Big document cannot be opened
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: mslama
URL:
Keywords: REGRESSION, THREAD
: 175466 175476 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-21 11:49 UTC by Alexander Simon
Modified: 2009-10-29 09:49 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump (16.23 KB, text/plain)
2009-10-21 11:50 UTC, Alexander Simon
Details
another dead lock if you ansver NO on restarting IDE with openrd file (16.83 KB, text/plain)
2009-10-21 11:55 UTC, Alexander Simon
Details
example of application with big header "sldworks.h" (730.78 KB, application/x-gzip)
2009-10-21 12:43 UTC, Alexander Simon
Details
same for java (18.95 KB, text/plain)
2009-10-21 13:07 UTC, Alexander Simon
Details
message log for first scenario (30.88 KB, text/plain)
2009-10-21 15:06 UTC, Alexander Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2009-10-21 11:49:33 UTC
If document size is big and IDE asks "The file seems to be too large to safely open..." the document cannot be open by
hyperlink.
Comment 1 Alexander Simon 2009-10-21 11:50:49 UTC
Created attachment 89848 [details]
thread dump
Comment 2 Alexander Simon 2009-10-21 11:55:52 UTC
Created attachment 89849 [details]
another dead lock if you ansver NO on restarting IDE with openrd file
Comment 3 Alexander Simon 2009-10-21 12:43:42 UTC
Created attachment 89853 [details]
example of application with big header "sldworks.h"
Comment 4 Vladimir Voskresensky 2009-10-21 12:51:57 UTC
Editor team, please, evaluate.
Looks like deadlock due to thrown UserConfirmationException which is caught somewhere and trying to show dialog, but AWT
is blocked by waiting for notification of finished initialization
Comment 5 Vladimir Voskresensky 2009-10-21 13:05:08 UTC
If you create big *.java file => the same issue - Deadlock on opening, restarting IDE with previously opened big file
Comment 6 Alexander Simon 2009-10-21 13:07:34 UTC
Created attachment 89855 [details]
same for java
Comment 7 Vitezslav Stejskal 2009-10-21 14:29:01 UTC
Can you attach here the messages.log file? Were there any exceptions? Thanks
Comment 8 Alexander Simon 2009-10-21 15:06:21 UTC
Created attachment 89871 [details]
message log for first scenario
Comment 9 Alexander Simon 2009-10-21 15:16:44 UTC
P1 because:
- IDE cannot be closed only be killed
- IDE cannot be opened (work around: clear user dir)
- Dialog do not have alternative (both "yes" and "no: result in IDE hanging)
- issue has 100% repeatability
So, please, remove "RANDOM" and restore priority
Comment 10 Vitezslav Stejskal 2009-10-21 15:22:15 UTC
I can reproduce this in 6.8beta. Steps are simple:

1. start the IDE
2. open any *.java file that is larger than 1MB, confirm the dialog, let the IDE open the file in the editor
3. restart the IDE

The IDE asks the same question as in step #2, which it should not. After confirming the question by pressing 'yes' the
IDE will freeze.
Comment 11 Vitezslav Stejskal 2009-10-21 15:24:28 UTC
Threading issues, deadlocks, regressions, etc are generally P2. If this problem is considered a showstopper for 6.8beta
we will change its priority to P1.
Comment 12 Alexander Simon 2009-10-21 15:27:06 UTC
Data lost in unsaved editors pane is P2?
Comment 13 mslama 2009-10-21 15:43:29 UTC
If necessary to fix for beta easy fix is to return false from overriden CloneableEditorSupport.asynchronousOpen. For
trunk I will prepare better fix. There is code to test if AWT is blocked. But if AWT is blocked by waiting on initVisual
special handling must be done - continue without need to confirm. Jarda this is more common and happen even on IDE
restart. Then UserQuestionException becomes useless because it is quite common that someone calls
CloneableEditor.getEditorPane before CE initialization is finished.
Comment 14 mslama 2009-10-21 16:03:32 UTC
BTW what files was opened in IDE? UserQuestionException should not be thrown during IDE start. When DataEditorSupport is
used UQE is not thrown. It would be good to identify what subclass of CloneableEditorSupport does not handle it
correctly. I can also add logging to find out more. I will let you more as I will add it. Of course it does not mean
this issue should not be fixed.
Comment 15 Marian Mirilovic 2009-10-21 16:17:17 UTC
this is NOT a stopper for NB 6.8 Beta : too risky and user is warned before - so she continuous on his own risk, this is
Beta not FCS ... should be solved for NB 6.8 final
Comment 16 Vitezslav Stejskal 2009-10-21 16:36:05 UTC
"BTW what files was opened in IDE?" - Marku, this regularly happens with java files. I've also seen it with *.txt files
and cnd guys reported it with *.h files.
Comment 17 Vladimir Voskresensky 2009-10-21 16:37:26 UTC
please, fix it in trunk like it is P1 bug. 
This issue blocks our QA automatic testing (=> blocks development => should be considered as P1), but I think it is OK
not to consider as showstopper for Beta
Thanks,
Vladimir
Comment 18 Alexander Simon 2009-10-21 18:18:35 UTC
>"BTW what files was opened in IDE?"
- configuration.xml (for huge project it can be several Mb)
Comment 19 mslama 2009-10-21 18:41:50 UTC
Unfortunately it is another problem introduced by CloneableEditorSupport.asynchronousOpen. We will need adjust API to
support handling UQE in CloneableEditor.DoInitialize.initNonVisual. Current code does not work when we need cancel
opening (ie. user selects No in query dialog).

If we want to fix this quickly we can return false from all CloneableEditorSupport.asynchronousOpen overrides.
Comment 20 mslama 2009-10-21 19:02:25 UTC
Fixing Yes selection and fixing blocked AWT by call of CE.getEditorPane is possible without API change. I will prepare
at least this part of fix.

Fixing No selection requires API change so we need to discuss it.
Comment 21 Vladimir Voskresensky 2009-10-24 14:48:10 UTC
rising to P1. QA tests are blocked on projects with big documents
Comment 22 mslama 2009-10-26 13:45:04 UTC
core-main #481670dcdf35
Comment 23 Quality Engineering 2009-10-27 11:00:00 UTC
Integrated into 'main-golden', will be available in build *200910270201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/481670dcdf35
User: Marek Slama <mslama@netbeans.org>
Log: #175093: Fix handling of UserQuestionException.
Comment 24 Vitezslav Stejskal 2009-10-27 11:36:15 UTC
*** Issue 175466 has been marked as a duplicate of this issue. ***
Comment 25 mslama 2009-10-27 16:15:08 UTC
There is issue #175528 I am working on. If you are influenced by issue #175528 and need quick fix let me know. I will
change JavaEditorSupport.asynchronousOpen to false to fix this.
Comment 26 mslama 2009-10-29 09:49:41 UTC
*** Issue 175476 has been marked as a duplicate of this issue. ***