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 9846 - Work with Window's clipboard throws IllegalStateException.
Summary: Work with Window's clipboard throws IllegalStateException.
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P4 blocker (vote)
Assignee: akemr
URL:
Keywords:
: 10459 11421 11615 12400 12460 13007 13258 13640 14457 14599 14934 15303 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-02-26 14:08 UTC by Jiri Kovalsky
Modified: 2008-12-23 13:48 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IllegalStateException attachment to issue #9846. (1.04 KB, text/plain)
2001-07-20 20:47 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2001-02-26 14:08:23 UTC
I don't know the behaviour on other operating systems but each time I want to 
take snapshot of the IDE and tranfer it to some other application (e.g. MS 
Paint) after my return to IDE IllegalStateException waits there for me. This is 
not serious bug at all but it doesn't look nice. After some work with IDE it is 
not so easy to reproduce so I recommend to take the fresh build and test it 
immediatelly after its first start.

Steps to reproduce:
===================
1. Download and launch fresh build of IDE.
2. Close all initial dialogs and set focus e.g. to some node in the explorer.
3. Push "Print Screen" button to save hardcopy of the screen.
4. Launch MS Paint application through "Start | Programs | Accessories | Paint".
5. Now paste image from clipboard to MS Paint using "Edit | Paste" menu item.
6. Get back to the IDE and mentioned exception should already be thrown there.

Note: My MS Paint was always maximized if this matters :-)
=====
Comment 1 Jiri Kovalsky 2001-02-26 14:09:56 UTC
Created attachment 686 [details]
IllegalStateException attachment to issue #9846.
Comment 2 Jaroslav Tulach 2001-02-27 17:53:11 UTC
Bug in JDK. Please check whether the bug occurs in 1.3, 1.3.1 and 1.4.
Comment 3 Jiri Kovalsky 2001-03-19 15:44:49 UTC
*** Issue 10459 has been marked as a duplicate of this issue. ***
Comment 4 Jan Zajicek 2001-04-17 16:08:48 UTC
*** Issue 11421 has been marked as a duplicate of this issue. ***
Comment 5 Jan Zajicek 2001-04-23 09:29:47 UTC
*** Issue 11615 has been marked as a duplicate of this issue. ***
Comment 6 Jan Zajicek 2001-05-25 08:52:16 UTC
*** Issue 12400 has been marked as a duplicate of this issue. ***
Comment 7 Jan Zajicek 2001-05-25 08:53:29 UTC
Jirko, can you please verify this on jdk 1.3.1 and 1.4.0 beta on windows, thanks.
Comment 8 Jiri Kovalsky 2001-05-25 11:17:07 UTC
Of course :-), I have tested it against these JDKs:

Version of JDK |   1.3.0_01   |   1.3.0_02   |   1.3.1    |   1.4.0 Beta
---------------+--------------+--------------+------------+---------------
Occurrence     |      No      |      No      |    Yes     |     Yes

It doesn't depend on IDE (tested on NB #196 and FFJ 3.0 EA) and SDI/MDI.
Comment 9 Jan Zajicek 2001-05-28 11:35:16 UTC
Reopenning, the new investigation was made.

Yarda, what do you think about such that regression, can we handle this somehow?
Comment 10 Jan Zajicek 2001-05-29 15:20:24 UTC
*** Issue 12460 has been marked as a duplicate of this issue. ***
Comment 11 Jaroslav Tulach 2001-05-30 14:43:19 UTC
Ales, I'll help you, but I need windows machine.
Comment 12 akemr 2001-06-20 09:12:03 UTC
Reported to JDK team.

Result: it's no JDK bug.
In 1.3 getContents() returns null after ctrl+printscreen, since image
transfer support was introduced only in 1.4. In 1.3 getContents()
returns null if the clipboard doesn't contain data in supported
formats. In 1.3.1 and 1.4 getContents() never returns null. If there
are no supported formats, it will return empty ClipboardTransferable.
and IllegalStateException is thrown.

Fix: move calling getContents() to try-catch block.

Fixed in main trunk.

Diff:
http://www.netbeans.org/unbranded-
source/browse/core/src/org/netbeans/core/CoronaClipboard.java.diff?
r1=1.22&r2=1.23
Comment 13 Jan Zajicek 2001-06-20 09:34:03 UTC
*** Issue 13007 has been marked as a duplicate of this issue. ***
Comment 14 Jan Zajicek 2001-07-17 08:47:58 UTC
*** Issue 13640 has been marked as a duplicate of this issue. ***
Comment 15 Jiri Kovalsky 2001-08-02 16:46:56 UTC
Excellent! I am glad to announce that it was finally fixed. Verified 
on JDK 1.3.1 and JDK 1.4 (#73) together with FFJ 3.0 (#010801_1) and 
NB 3.3 (#200108020800).
Comment 16 Jan Zajicek 2001-08-16 08:15:58 UTC
*** Issue 14457 has been marked as a duplicate of this issue. ***
Comment 17 Jan Zajicek 2001-08-21 13:48:16 UTC
*** Issue 14599 has been marked as a duplicate of this issue. ***
Comment 18 Jan Zajicek 2001-09-05 09:48:09 UTC
*** Issue 14934 has been marked as a duplicate of this issue. ***
Comment 19 Jan Zajicek 2001-09-10 08:47:32 UTC
*** Issue 15303 has been marked as a duplicate of this issue. ***
Comment 20 Jan Zajicek 2001-12-05 09:57:42 UTC
*** Issue 13258 has been marked as a duplicate of this issue. ***
Comment 21 Quality Engineering 2003-07-01 16:18:26 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.