I have a problem like the one shown in this thread:
I can reproduce every time with these steps:
- Open SQL Developer
- Double-click my SCOTT connection to connect to my database - it connects and opens a worksheet
- Drag a file “test_type.tps” onto the worksheet - it opens the file in a new PL/SQL object editor (because the file extension is registered as PL/SQL)
- Click the “two toothed wheels”-button to compile the PL/SQL
- SQL Developer is now frozen and has to be killed from Windows Task Manager
When I check the database session, it is inactive (no locks or anything) and the last SQL it had executed was:
SELECT LINE, POSITION, REPLACE(TEXT, CHR(10), ' '), attribute
FROM SYS.ALL_ERRORS A
WHERE A.NAME = :NAME AND A.TYPE = :TYPE AND A.OWNER = :OWNER
ORDER BY ATTRIBUTE, LINE, POSITION -- errors first
The object type from the file has been successfully compiled and exists in the database - no issues in the DB with either the type or the session.
But SQL Developer is just frozen after it has performed the compilation and queried for errors.
In the test above I opened the file via drag/drop to a worksheet in an open connection, I have also tried first opening the file via File menu and then choosing/opening a connection via the dropdown in the editor - same result: frozen SQL Developer.
For this repeatable test case I used a type (.tps), but it is happening for me with packages too.
The problem is only in the PL/SQL object editor opened from source file when compiling via the wheel icon. If I copy the same code to a worksheet and execute via F5 or F9, there is no problem.
If I open the PL/SQL type from the object browser, so I get the object in the PL/SQL object editor directly from the database (rather than a source file), there is also no problem when I compile via the wheel icon.
My guess could be related to code in SQL Developer that tries to “link” the newly compiled PL/SQL object with the source file open in the editor? But that's just a guess…
My SQL Developer is Version 23.1.0.097 Build 097.1607
I'm attaching my test file with which I can reproduce every time. (The forum seems not to allow files named .tps, so I named the file test_type.tps.sql for uploading - it should be renamed to test_type.tps for testing. But probably could use any file with an extension that is registered in SQL Developer as type PL/SQL.)