Java 1.5.0 causes most other PC tasks including the mouse on my Win2000 box to pause for some seconds regularly, whenever Java performs some CPU or IO intensive task. (Can't tell the exact reason so far).In such cases, read: frequently, the taskmanager's CPU load icon on the systray goes 100% and most other PC tasks are being paused for 1-3 seconds. Even the mouse pointer can't be moved!This happens oftently, for example every time I compile (with JBuilder), start a Java app like JEdit or my own projects, etc.

Older JVMs (inlcuding 1.42) don't do this on the same PC.Also other native tasks don't pause the PC.So I'm wondering how Java 1.5 can hog the system that much?

What tasks would it be?.. looking at the description its impossible to guess whats going on...

When I start JEdit, for example.Or when I start JBuilder.Or when I hit the compile button in any JBuilder project.Or when I start my OpenGL game project which loads and binds many textures.

In all the cases the CPU load goes 100% and the mouse pauses for 1/2/3 secs (like most native tasks, too), after that you can move the mouse for some seconds, then again it pauses, etc, until the Java 1.5 app is completely loaded or running for several secs.

The system doesn't hang: you can still toggle Num lock, Alt-Tab switch apps, etc, and also the Java app causing all this is running happily, but several native tasks (including the mouse) "pauses"...

{Edit} "java -Xincgc" to use the incremental gc, improves the situation for JEdit and my own task somewhat, but the pause effect is still there. Just for JBuilder either it doesn't make any difference or JBuilder doesn't accept this switch.

I am beginning to suspect that something is happening in DirectDraw and the current crop of drivers. If Java grabs some kind of DD handle at an inopportune moment and then decides to do something lengthy it may prevent anyone else getting it, and hence the system feels like it's hung. I may be wrong. But it's quite serious.

The -Xincgc switch so far makes the pauses at startup and JB-compile-time mildly. If I am correct the CPU load never reaches 100% then.{Edit} When Java 1.5 (re-) allocates memory on my PC it looks like it pauses most of the other PC tasks for a moment. Accordingly, when I start my app with -Xms128M -Xmx128M (to prevent allocating as long as possible) the app runs practically smooth for a long time...

As said, with Java prior to 1.5 on the same PC there are no pauses. Also with other memory hungry native apps (OO for example) I don't see any pauses.

As an aside we have just discovered that ddraw can use a lot of address space --- 256MB. Even worse the area used reduced the size of the largest free space from over 500MB to less than 250MB, which caused us grief when requesting a mapping of that size.

My suspicions also fall on GDI drivers... which I am beginning to think might just be using DDraw under the hood now...

...perhaps you could try using the OpenGL pipeline and see if it gets any better? (Assuming that the GL pipeline entirely takes over the entire 2D window rendering pipeline). Turn off native decorations on the window to be sure as well.

I notice Eclipse does it a *lot*, and that's all GDI based widgets. Hmm.

Eclipse with Java 1.5 does cause a lot of these mentioned "pauses" on your PC ?That's interesting. So does JBuilder (as I said) any my Jogl app when loading textures... However JBuilder is Swing based.

Now if we could find out what behaviour these "pausing" applications share...I start to dislike the pauses a lot. :-(

Yeah, now I think about it, Super Elvis seems to exhibit this behaviour too on occasion. Something the VM does is causing some system-wide interruption, and it's new in 1.5. Maybe Azeem could find out if anything's changed under the hood? I consider it to be a pretty serious problem as it affects the entire system, not just making the Java apps jerky...

Super Elvis seems to exhibit this behaviour too on occasion. Something the VM does is causing some system-wide interruption, and it's new in 1.5. (..)I consider it to be a pretty serious problem as it affects the entire system, not just making the Java apps jerky...

Ok, so now we've got two cases describing exactly the same behaviour: the "pause" effect. So it's not my PC which is being weird or such, I guess.

I see it on all machines using 1.5 and Windows XP and diverse video cards.

Ok, good to know, so it's hardly some exotic combination of hardware component A with B and some software component C...

I've just rebooted the Win2K box (which I do rarely) and currently the pause effect is very mild: the mouse doesn't pause currently, a few native apps do - when there's some Java 1.5 CPU intensive task.Strange. I'll try to find out when it goes in "always pause" mode again.

The ONLY thing that can slow the mouse pointer down in NT is contention for either graphics card or interrupt whilst in kernel mode. This means that something in Java is grabbing exclusive access for a lengthy period in kernel mode. Not good.

The ONLY thing that can slow the mouse pointer down in NT is contention for either graphics card or interrupt whilst in kernel mode. This means that something in Java is grabbing exclusive access for a lengthy period in kernel mode. Not good.

Cas

Historically the worst offender for that sort of thing has been graphics drivers. But i didn't think they were dearly as bad these days. Unless you have a crappy old Matrox card in there (they were quite bad as I recall).

The mouse pointer is very high priority on NT. And make sure you never choose an animated pointer or you will have even bigger problems - since the pointer animation will run at such a high priority it is impossible for a user process to match it.

That said, I haven't noticed this pausing problem (yet) on my systems.

I still don't know what's going on but finally I can reproduce the effect now:The Win2000 PC here is a multi-user system which means I login with name and passwort.I boot the PC and login for the first time: Java 1.5 runs OK - no mouse pausing (but it still takes nearly 100% for some tasks, so multi-tasking isn't fine).However, when I log-off and re-login another time, then Java 1.5 regularly pauses the mouse on many occasions.

So... I can use Java 1.5 until I've to log-off and re-login: then just a re-boot solves the pausing mouse etc.

I'm not sure if this is related but I've reverted to running NetBeans 4.0 (betas or RC) on jdk 1.4.2 because when it was running on 1.5 iTunes would glitch in the background whenever NetBeans was busy. This is on a Win2K box with 640Mb and an Athlon 2500. I've tried various gc and mem size options to no avail :-(

Task manager icon? And how looks a task manager graph? Red and green values. Is it purely Java, or system tasks are under load as well.How do you have setuped processor planning? CPU time for all processes, or for foreground applications.What graphic drivers, GPU card, and DirectX do you have installed. Size of windoze / linux swap file. And of course, do it happen on Linux as well? Is there possiblity to test it by some weird program? I used jEdit and only problems I noticed was occasional neccesity to doubleclick on file again, I thought I clicked too fast... From my graphic attempts, roguelike based 3D engine on modified version of JOGL, I seen 100% CPU load, and 5% CPU load exactly as expected. Ken Paul Dolan program (Traveller) is running well as well.

Try to reproduce this when you'd set java on low priority. (Only possible way how to run KPD Traveller and music on background because he doesn't do Thread.yield(), or Windoze XP have severally broken Thread sheduling.)

BTW what about antialiasing bug? Has it been corrected?

Just for refference I'm running Windoze XP pro service pack2 on Celeron D 325 underclocked to 1.89 GHz. 512 MB Kingston dual chanel memory. DirectX 9.0b, or 9.0c. OS is setuped to make an equal amount of work in foreground and background processes, with reduced disk caching. (reduced means under Windoze XP 128MB to 220 MB for data cache, I wonder how much would it take when non reduced.)

Tested, seen an one mouse drag (0.1 - 0.24s) every approx 25 sec, when the KPD Traveller was in background on low priority. It didn't look like it has something to do with the KPD's GUI updates, it appeared at 100 of 500, and IIRC a young generation GC is collecting more offten. And of course could be very unrelated to current problem, when you'd like to find something, you are often succesfull (in finding something unrelated).So recommendaton for next testing is -reduced system signal switch-Xcompile (Xcompile and Eclipse is very funny be prepared)- disable vm sharing.-try interpreted mode

Quote

I boot the PC and login for the first time: Java 1.5 runs OK - no mouse pausing (but it still takes nearly 100% for some tasks, so multi-tasking isn't fine). However, when I log-off and re-login another time, then Java 1.5 regularly pauses the mouse on many occasions.

If logging off terminates all running programs, you have serious problem. Weird interactions between program and OS state are hard to find.

If logging off terminates all running programs, you have serious problem. Weird interactions between program and OS state are hard to find.

Probably my bad English... I meant "log-out" via this Windows start menu entry called, well, don't know the English word since I use a localized version.No shut-down, just log-out and re-login with another user(name).

@Jeff: I didn't file a BR. I'd prefer if some native English speaker with more Java and OS experience did do it. :-)

You could also try to minimize your application then do some work, then maximize them again. If this could create the same effect as user switching. I expect your programs would continue running when you loggin as different user.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org