DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2006

    problem with drawString

    i am creating a java application in eclipse. the java framework i'm using is 1.4.2 and the version of eclipse is 3.1.2.

    the issue i'm having is with drawString. when i attempt to call drawString on a Graphics or Graphics2D object i get the error...

    *** glibc detected *** free(): invalid pointer: 0x08089250 ***

    here is a sample bit of code that produces the error:

    BufferedImage img = new BufferedImage( 100, 100, BufferedImage.TYPE_INT_RGB );
    Graphics g = img.getGraphics();
    g.drawString( "test", 0, 0 );

    i, however, do not get any error when i call drawString on the Graphics object in the overriden "paint" method of a JFrame object. for example, the following code works fine:

    public void paint( Graphics g )
    g.drawString( "test", 20, 40 );

    if someone could please help me out, i'd greatly appreciate it! i'm new to java and this problem has kept me stumped for many hours.


  2. #2
    Join Date
    Aug 2003
    This doesn't seem like a Java problem, but rather a problem with the JVM. What version of the JVM are you using?

  3. #3
    Join Date
    Jun 2006

    Talking thanks!

    i switched to a different version of the jvm and it works!

    thank you so much!


Similar Threads

  1. Problem with Search
    By Irina in forum ASP.NET
    Replies: 0
    Last Post: 11-29-2002, 10:47 PM
  2. Replies: 0
    Last Post: 12-13-2001, 12:06 PM
  3. a problem with font and language
    By Roseta in forum VB Classic
    Replies: 0
    Last Post: 11-14-2001, 03:24 AM
  4. Arabic problem view
    By Ayman in forum VB Classic
    Replies: 0
    Last Post: 04-03-2000, 01:08 AM
  5. Problem with CryptoAPI and JCE
    By Jason Bock in forum VB Classic
    Replies: 0
    Last Post: 03-21-2000, 06:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.