Program exitting with no errors when in fullscreen exclusive mode

Discussion in 'Java' started by Ashak, Aug 26, 2003.

  1. Ashak

    Ashak Guest

    Hi,

    I've been playing with fullscreen exclusive mode in Java for a few
    days, yet i've run into troubles. I simply had a single loop (no
    threads), it was simply drawing a red ball bouncing around the screen
    on a blue background. After about 690 times around my loop (move the
    object, redraw it), the program seems to exit. However, I get no
    errors and control doesn't continue through the program and execute
    the last few statements. The only thing I can think of is that i'm
    using graphics memory or something. The machine I was originally
    testing on has about 8M of memory for the graphics card, a different
    machine with 64M of ram exhibits the same problem but after a much
    larger amount of time. I don't have the code at hand, but I can post
    it tomorrow if anyone thinks it might help (there's not much too it at
    all). I'm creating a BufferStrategy with two buffers, and then getting
    a graphics context from my BufferStrategy, drawing to that, then
    swapping the buffers over.

    Anyway... anyone got any ideas where my problem might be?

    Thanks.
    Ashak, Aug 26, 2003
    #1
    1. Advertising

  2. Ashak

    S. Balk Guest

    > I've been playing with fullscreen exclusive mode in Java for a few
    > days, yet i've run into troubles. I simply had a single loop (no
    > threads), it was simply drawing a red ball bouncing around the screen
    > on a blue background. After about 690 times around my loop (move the
    > object, redraw it), the program seems to exit. However, I get no
    > errors and control doesn't continue through the program and execute
    > the last few statements.


    Very nasty bug... I have narrowed it down to:

    The moment garbage-collection starts, the app exits. Just try to put a
    System.gc()-call after 300 frames and see if it exits the same way.

    My solution: reinstalled OS (Win98) and installed the latest video-drivers.
    I only saw it on j2sdk 1.4.0.

    Good luck!
    S. Balk, Aug 27, 2003
    #2
    1. Advertising

  3. Ashak

    Ashak Guest

    >> I've been playing with fullscreen exclusive mode in Java for a few
    >> days, yet i've run into troubles. I simply had a single loop (no
    >> threads), it was simply drawing a red ball bouncing around the screen
    >> on a blue background. After about 690 times around my loop (move the
    >> object, redraw it), the program seems to exit. However, I get no
    >> errors and control doesn't continue through the program and execute
    >> the last few statements.

    >
    >Very nasty bug... I have narrowed it down to:
    >
    >The moment garbage-collection starts, the app exits. Just try to put a
    >System.gc()-call after 300 frames and see if it exits the same way.
    >
    >My solution: reinstalled OS (Win98) and installed the latest video-drivers.
    >I only saw it on j2sdk 1.4.0.
    >
    >Good luck!
    >


    Thanks, I'll check which version of the j2sdk i'm using, I have a
    strange feeling i'm using 1.4.0 ....

    I'l let you know how I get on.

    Again, thanks.
    Ashak, Aug 27, 2003
    #3
  4. Ashak

    Ashak Guest

    On Wed, 27 Aug 2003 15:13:24 +0100, Ashak <> wrote:

    >>> I've been playing with fullscreen exclusive mode in Java for a few
    >>> days, yet i've run into troubles. I simply had a single loop (no
    >>> threads), it was simply drawing a red ball bouncing around the screen
    >>> on a blue background. After about 690 times around my loop (move the
    >>> object, redraw it), the program seems to exit. However, I get no
    >>> errors and control doesn't continue through the program and execute
    >>> the last few statements.

    >>
    >>Very nasty bug... I have narrowed it down to:
    >>
    >>The moment garbage-collection starts, the app exits. Just try to put a
    >>System.gc()-call after 300 frames and see if it exits the same way.
    >>
    >>My solution: reinstalled OS (Win98) and installed the latest video-drivers.
    >>I only saw it on j2sdk 1.4.0.
    >>
    >>Good luck!
    >>

    >
    >Thanks, I'll check which version of the j2sdk i'm using, I have a
    >strange feeling i'm using 1.4.0 ....
    >
    >I'l let you know how I get on.
    >
    >Again, thanks.



    Ok, I was using 1.4.1_rc3 on windows and that exhibited the problem
    that I discussed. I just upgraded to 1.4.2_01 and my application works
    fine.

    In response to your other ideas, I did put a System.gc() call after
    300 frames and yes, it did cause the exact same problem, until I
    upgraded the j2sdk of course.

    Thanks for the help, I can now continue playing with this stuff :)

    Ashak
    Ashak, Aug 28, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Sm9obiBCYW5raGVhZA==?=

    Fullscreen Mode

    =?Utf-8?B?Sm9obiBCYW5raGVhZA==?=, Apr 15, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    547
    =?Utf-8?B?Sm9obiBCYW5raGVhZA==?=
    Apr 18, 2005
  2. Abs

    About fullscreen mode

    Abs, May 2, 2004, in forum: Java
    Replies:
    3
    Views:
    421
    Marco Schmidt
    May 9, 2004
  3. sebastien maraux

    mfc dialogs in fullscreen exclusive apps

    sebastien maraux, Oct 28, 2003, in forum: C++
    Replies:
    1
    Views:
    472
    Thomas Matthews
    Oct 28, 2003
  4. rohankataria26

    Exitting A Program-help Needed

    rohankataria26, May 14, 2007, in forum: C Programming
    Replies:
    0
    Views:
    275
    rohankataria26
    May 14, 2007
  5. Replies:
    2
    Views:
    88
    Tom Cole
    Aug 24, 2006
Loading...

Share This Page