Comments in For loop causes hang.

bcarter

Member
for v_rec in /* some comments go here
this line causes the problem*/
(select 'broken' col1
from dual) loop
null;
end loop;

The above code will cause PL/SQL dev to hang indefinitely when compiling a package. If you remove the second line of comments it will compile just fine.

It will compile using other tools, TOAD for example or when just running it as a script in SQL Plus.
 
Works fine for me. Do you have the "Automatically Beautify before compiling" option enabled? If so, does a beautify also cause a hang-up?
 
Yes I do have auto beautify on.

But I can manually run beautify with no problems.

I also get another problem, I don't know if they are related.

If I do not save before I compile I have about a 50/50 chance of getting the same hang.

The code window will go blank and it never comes back. Turning on save before compile solves that problem.

Not sure if these two things are related but they both hang the same way.
 
What happens if you disable "auto beautify"?

There is nothing else in PL/SQL Developer that would be affected by the source in such a way that it could cause a hangup (as far as I can imagine). It is simply sent to the server for compilation.
 
This error will also happen in a cursor definition, not just a for loop cursor. (Verified on multiple computers)

If I disable Auto beautify before compiling it will compile and not hang. The other 3 options do not cause a problem.
 
Back
Top