Closed Thread
Results 1 to 6 of 6

Thread: Strange Bug

  1. #1
    Airman is offline Newbie
    Join Date
    Feb 2010
    Posts
    4
    Rep Power
    0

    Strange Bug

    I am fairly inexperienced with Java, but have done a good bit of programming. I wrote a complicated Mandelbrot Fractal Generator, but it is giving me some problems. I was writing it on a windows 7 computer, and whenever I clicked on the screen it was supposed to zoom in to the fractal at that position. The problem is that when I click on the screen it zooms in to the position I clicked, than zooms in again to the new position my mouse is at, in rapid succession, making it difficult to choose the location to zoom in to. I couldn't figure out why it was occurring so I had the drawing part of the program only work every other time it was called, which worked. Strangely, when I compiled and ran the program on my XP computer it didn't work with my fix, but did work with the original code.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,486
    Blog Entries
    75
    Rep Power
    143

    Re: Strange Bug

    Without seeing the code, we can't help you. It's probably an issue with how the two OS's are sending click events, however.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    Airman is offline Newbie
    Join Date
    Feb 2010
    Posts
    4
    Rep Power
    0

    Re: Strange Bug

    Attached is the code. Version 2 is the one that works on the XP computer. The only difference between them is that lines 141 and 148 are commented out. The code is really messy, I must apologize for that...
    Attached Files Attached Files

  5. #4
    Join Date
    Jul 2009
    Location
    Santa Clarita, CA
    Posts
    2,111
    Blog Entries
    47
    Rep Power
    31

    Re: Strange Bug

    Ahh, troubleshooting platform independent code... Well, as far as I can tell MandelbrotTest2 works fine, except for that the drawing routines clear the window then place the new drawing which causes flashing each time I click somewhere. It's not terrible for an experiment, but I figure I should bring it up. MandelbrotTest alternates between an empty screen and a drawn screen, making it difficult to figure out where it's supposed to be, but I encountered no problems with rapid-succession zooming.

    I'll look at it further and tell you if I notice anything.
    Wow I changed my sig!

  6. #5
    Airman is offline Newbie
    Join Date
    Feb 2010
    Posts
    4
    Rep Power
    0

    Re: Strange Bug

    The flash you described in MandelbrotTest2 is not the error - And your description of Mandelbrot test is what it does when I run it on my XP computer. Meaning that your computer is working the same way my XP is. What operating system and versions of Java are you running?

  7. #6
    Join Date
    Jul 2006
    Posts
    16,486
    Blog Entries
    75
    Rep Power
    143

    Re: Strange Bug

    Are you using the same JRE on both machines? MicroSoft has one, and Java has several versions. There's a chance this isn't a code issue, but an environment issue.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Hello, strange problem
    By netmanny in forum General Programming
    Replies: 1
    Last Post: 01-12-2011, 01:07 PM
  2. A Strange Query
    By nikhilkhullar in forum Technology Ramble
    Replies: 12
    Last Post: 10-24-2010, 05:34 PM
  3. Some strange errors
    By mebob in forum C and C++
    Replies: 2
    Last Post: 08-01-2010, 12:25 PM
  4. strange error in Dev C++
    By shadowhound in forum C and C++
    Replies: 1
    Last Post: 01-30-2009, 04:55 PM
  5. Strange but i need it.
    By mandriva in forum Website Design
    Replies: 4
    Last Post: 11-10-2007, 09:29 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts