JPanel receives no width or height, but only when run as part of applet

Applet: http://mazz0.com/drawing/index.html
JAR: http://mazz0.com/drawing/DrawingGame.jar
Source: http://mazz0.com/drawing/060107/DrawingGame.java
This java applet I have written works fine as a standalone application, but when I run it as an applet I randomly, about half the time, get the following error at runtime:
java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999)
at sun.awt.Win32GraphicsConfig.createAcceleratedImage(Win32GraphicsConfig.java:313)
at sun.awt.windows.WComponentPeer.createImage(WComponentPeer.java:565)
at java.awt.Component.createImage(Component.java:3179)
at java.awt.Component.createImage(Component.java:3176)
at java.awt.Component.createImage(Component.java:3176)
at java.awt.Component.createImage(Component.java:3176)
at java.awt.Component.createImage(Component.java:3176)
at DrawingGame$DrawingPanel.init(DrawingGame.java:96)
at DrawingGame.init(DrawingGame.java:38)
at sun.applet.AppletPanel.run(AppletPanel.java:417)
at java.lang.Thread.run(Thread.java:619)
To get around this I've added line 25:
drawingPanel.setBounds(0, 0, getWidth(), getHeight()-20);Can anyone tell me why I need to do this, and if there's a better way of avoiding this problem?

Im not a pro, so alot of that in jibberish to me, but i did try encoding it with a lower bit rate (around 10,000 i think) and it successfully played via QT. what is the difference between a 79,000 bitrate and a 10,000 bitrate??
Basically, the Profile and Level define the combination of settings/limitations that adhere to a particular "standard." As previously mentioned, Main Profile Level 3.1 is very common for Apple software and hardware products which appear to come close to the settings for your "working" file. This combination for instance would allow data rates up to 14 Mbps (14,000 Kbps) with 1280x720 @ 30.0 fps while a Main Profile Level 3.2 file would allow a data rates up to 20 Mbps (20,000 Kbps) with 1280x1024 @ 42.2 fps. From this and the fact that your stats did not include the frame rate and/or whether or not the file was encoded anamorphically, I "guestimated" that you might have a "standards" issue in the Level 3.1 to Level 3.2 range for any Baseline, Extended, Main, or High Profile H.264 encode. Your results for the re-encoded file seem to confirm that the data rate was the problem here—i.e., that the video data rate at 80 Mbps was beyond the range of the Profile and Level designation for the file while 10 Mbps was not. Your ability to encode using non-standard settings is one of the reasons that Apple has moved more and more toward the use of device "presets" which prevent novice users from making such relatively simple mistakes when creating files in any of the QT based apps.  Hope this helps you to understand the problem better.

Similar Messages

  • ECC / Parity errors but 'only' when running qmaster / Compressor ?!!

    I have a Mac Pro that came with 4GB of (Apple) Ram. I recently installed 4 addiitonal (to fill both risers to 8GB total), of branded, supposedly apple-certified Ram from one of the major vendors we all have come to love and trust.
    Anyway, all seems fine - but now I am running QMASTER/Compressor which in fact wires (or at least pages) so much ram as to make good use of my 8: I have only 80MB free- but hey that's good, the memory is being used.
    Here's the odd thing, when doing compressor / qmaster tasks (this is both the cluster server and a service node) I now get ECC Parity errors:
    - Of my 8 chips, 3 have trown ECC Parity errors (all corrected), ranging from 1 on one chip to now 35 on another. This is in a 24h period
    - THis is on the APPLE ORIGINAL RAM - none of the 'new' chips have any errors ?!!!
    - Errors show up in 'about system' as well as the console log- but I ran EXTENDED Hardware test twice - and both times the memory (whole system) comes up clean!
    - ECC errors don't show up - as far as I can tell, if I don't 'extremely' tax the system - i.e. running email, Safari, iTunes and, maybe WoW keep it 'clean'! but also leave between 3-6GB memory 'free'
    - The errors occur on 2 seperate risers
    So, here's my dilemman - I can replicate this everytime i use compressor/qmaster. However, I never (yet) had a related crash or issues.
    It started with 'just' one chip, now it's 3 - again, all the original apple ram.
    My memory is installed correctly (i.e. both apple pairs together and both OWC together).
    I would LOVE to get some suggestions. Logic would say this is related to the new memory BUT I also never ran a compressor/qmaster renderfarm before now. I already opened a case with Apple and they are sending me one new chip (I opened at the time only one chip was having the errors).
    So - normal? Low enough at high volume I shouldn't worry? Routine with compressor and qmaster Or time to panic?
    THANKS!
    Dan

    This is very interesting. We, too, recently experienced a hard RAM Parity Panic/Crash on a Qmaster/Compressor encoder node. About two weeks earlier, we experienced a RAM Parity Panic/Crash on a system that has nothing to do with Qmaster.
    Both machines are dual G5 Xserves with factory-installed RAM. The encoder had six 512MB sticks while the non-encoder server had 2 1MB sticks.
    The encoder died, but when rebooted kept working by ignoring the bad RAM and working off only 2GB of the good RAM (must be in pairs).
    Apple replaced both sticks under warranty.
    As for Qmaster/Compressor causing the errors, I have no insight. If that were the case, I assume we'd see this on most if not all our encoders and cluster controllers. And that hasn't happened.
    I'd say, you got bad RAM and it needs to be fixed.
    The panic.log should give you insight into which dimm slot threw the error.
    Good luck!

  • CS4 js error on file save -- but only when run via droplet

    I have a js script that I've been using fine in PS CS. I've now upgraded to CS4 and trying to get it working. After a couple of minor tweaks, the script works fine when invoked directly from within CS4 (in an action step). But when I create a droplet from that action, the same script gives an error when it comes to saving the image to a jpeg file.
    The relevant code is here:
    jpgSaveOptions = new JPEGSaveOptions();
    jpgSaveOptions.embedColorProfile = false;
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
    jpgSaveOptions.quality = 12;
    jpgSaveOptions.matte = MatteType.NONE;
    var jpgFile = new File(outputFolderName + "/" + fullFileName + ".jpg");
    alert("Saving as " + outputFolderName + "/" + fullFileName + ".jpg");
    exists = jpgFile.open("r");
    alert("Opened");
    docRef.saveAs(jpgFile, jpgSaveOptions, false, Extension.LOWERCASE);
    alert("Saved");
    When invoked via the droplet, it gets as far as displaying "Opened", then it conks out with error:
    "EvalError: General Photoshop error occurred. This functionality may not be available in this version of Photoshop. - Could not save as "" because the file could not be found."
    Thing is, I'm not trying to save as "" -- the filename is properly populated with a proper filename, and indeed this script works fine when invoked directly and not through a droplet.
    Any ideas?
    Thanks,
    Mike

    docRef is defined quite a while back:
    // create the new document (without EXIF) to work on, with same size, resolution etc as original.
    var docRef = app.documents.add(x, y, r, originalDocName + " copy", m, DocumentFill.TRANSPARENT);
    but I do lots of things with docRef in the meantime that don't cause any error... like:
    docRef.bitsPerChannel = b
    // turn off colour management in the new document
    docRef.colorProfileType = ColorProfile.NONE;
    // paste in the original image
    docRef.paste();
    // Assign original colour profile now
    docRef.colorProfileName = originalColourProfile;
    and loads more stuff.
    Mike

  • [WAIT NOT SOLVED] Leafpad is segfaulting, but only when run as root.

    Is there ANY reason this would happen? Things have been really out of control lately it seems and I've got no idea what's up.
    [crew@myhost ~]$ leafpad
    Segmentation fault
    [crew@myhost ~]$
    Last edited by SomeGuyDude (2009-05-21 03:28:56)

    pharcyde wrote:This happened to me awhile ago. I don't know how I fixed it but it works now.
    Same here. It died when I installed SciTE, but didn't come to life when I tried removing it. Reinstallation didn't work either. If I remember correctly, there was a problem with one of the (Murrina) themes, but Leafpad didn't report it, some other program did (console output). Oddly enough, everything else worked perfectly, so I didn't think it was a big deal. But it's possible it was really magic.
    Last edited by jorpheus (2009-05-20 20:34:41)

  • I'm receiving all notifications, but only when I open my iPad, then I get them all at once...? How do I get the notifications immediately?

    I'm receiving all my notifications, but only when I open my iPad, then I get them all at once. Why am I not getting them immediatlely?

    Is this a wifi-only iPad?  If so, and unless it is plugged in, when you sleep the device, it shuts off the wifi radio to save battery power.  When you wake up the device, the wifi radio is re-activated, it connects and gets your notifications.  That is perfectly normal and simply a function of the design of the device.  The wifi will not shut off if the device is plugged into a power outlet (no need to conserve power then).
    A 3G iPad would allow for push notifications, if the 3G connection was left on all the time.
    P.S. if you do have a 3G iPad and have 3G enabled all the time, then I do not know why it is not working.

  • Using Outlook 2007 I want to receive emails on my iPhone 4 only when Outlook is NOT open on my computer, as when away from home or want to quickly check email when computer is not turned on. Either ALL emails come to my iPhone or none at all.

    Using Outlook 2007 I want to receive emails on my iPhone 4 only when Outlook is NOT open on my computer, as when away from home or want to quickly check email when computer is not turned on. Either ALL emails come to my iPhone or none at all. Is the setting I need to change in Outlook or on the iPhone or is it somewhere else?  I used to have this setting but transferring Outlook to a new laptop somehow turned it off.

    No. You really can't do that. Not easily at any rate. You would have to set them both up to use POP3, but even then there is no way to guarantee that the phone won't poll the server prior to your computer doing so, pulling down the message from the server.

  • [svn:osmf:] 10085: Fixing video width and height getting reset when there' s no true dimensional change reported by 'onMetaData'.

    Revision: 10085
    Author:   [email protected]
    Date:     2009-09-09 07:39:54 -0700 (Wed, 09 Sep 2009)
    Log Message:
    Fixing video width and height getting reset when there's no true dimensional change reported by 'onMetaData'.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/video/VideoElement.as

    hi their i have tried your last code but their is a problem with it on my pc that when i click the send video button it gives the error related to vector,
    Vector deviceList = CaptureDeviceManager.getDeviceList()
    di = (CaptureDeviceInfo)deviceList.firstElement();
    returns zero.
    please help my email address is [email protected]
    kindly send me an email regarding the solution of my problem. i am using 'creative web cam' over XP windows.

  • Hi! I work with Photoshop/Premiere Elements 10 on my snow leopard (10.6.8) without problems since years. Now I want to move over to the new MacBook Pro (and lion 10.7.5) but only Photoshop runs on it, every Premiere version (I downloaded Elements 12 and f

    Hi! I work with Photoshop/Premiere Elements 10 on my snow leopard (10.6.8) without problems since years. Now I want to move over to the new MacBook Pro (and lion 10.7.5) but only Photoshop runs on it, every Premiere version (I downloaded Elements 12 and further more) stops installation and shows Installation ERROR: ASU has quit unexpectedly, Media DB Error: 18. Please help!

    run the cleaner and retry installing per, Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • The camera app on my iphone 4S is crashing and while using the rear video cam black wavy lines are appearing but only when exposed to flurescent light in addition to the front cam... can any one please tell me what is happening???

    the camera app on my iphone 4S is crashing and while using the rear video cam black wavy lines are appearing but only when exposed to flurescent light in addition to the front cam... can any one please tell me what is happening???

    Try resetting your phone by holding down the home and off button until the apple symbol comes up. Then if still doing, restore your phone in itunes from your backup.

  • Burned Image on screen, but only when using Safari

    I have a burned image on my IPhone's screen, but only when I use Safari. Additionally, when I open Safari's multiple window viewer feature, the image is there as well. The home screen and every other app is unaffected. Turning off and on the phone does nothing to fix the problem.
    I know removing the casing and battery is an adventure, so I am trying to avoid it if I can.
    Can anyone think of a way to fix this problem?
    Thanks for the help.

    Troubleshoot Safari extensions ..
    From the Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that OFF, quit and relaunch Safari to test.
    If that helped, turn one extension on then quit and relaunch Safari to test until you find the incompatible extension then click uninstall.

  • Iphone 4 keeps rebooting... but only when plugged in

    My iphone keeps rebooting itself... but only when I have it plugged in to the wall.  When its not plugged in, it seems to work fine.
    We have two iphones in our house... and I have tried the  other wall charger... same result.
    I went through the recovery mode restore... and its still doing it.
    Any suggestions?

    If no change after restoring your iPhone with iTunes as a new iPhone or not from your iPhone's backup, when your iPhone is connected to your Mac, is it connected direct to a USB port on your computer - not connected to a USB hub?
    Since the buzzing/beeps continue when your iPhone is connected to the AC adaptor, do you have another USB dock connector cable to try to rule out a problem with your iPhone's USB cable?

  • TS3297 I keep getting this message that has some words & meaningless letters and then it has a mobile something or other.. But only when I try to buy give me everything by pitbull ... Please help!!

    I keep getting this message that has some words &amp; meaningless letters and then it has a mobile something or other.. But only when I try to buy give me everything by pitbull ... Please help!!

    I keep getting this message that has some words &amp; meaningless letters and then it has a mobile something or other.. But only when I try to buy give me everything by pitbull ... Please help!!

  • Get ORA-01031: insufficient privileges error, but only when using dbstart.

    I am getting ORA-01031: insufficient privileges error, but only when using dbstart. the listener starts but not the database. How come I can start it from SQL prompt but not from dbstart scripts as the oracle user?
    [oracle@mallard bin]$ ./dbstart
    Processing Database instance "gf44": log file /prod/oracle/10/startup.log
    [oracle@mallard bin]$
    Log file:
    Wed Aug 20 10:15:02 CDT 2008
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 20 10:15:02 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> ERROR:
    ORA-01031: insufficient privileges
    SQL> ORA-01031: insufficient privileges
    SQL>
    /prod/oracle/10/bin/dbstart: Database instance "gf44" warm started.
    >
    oratab file:
    gf44:/prod/oracle/10:Y
    dbstart file section:
    # See if it is a V6 or V7 database
    VERSION=undef
    if [ -f $ORACLE_HOME/bin/sqldba ] ; then
    SQLDBA=svrmgrl
    VERSION=`$ORACLE_HOME/bin/sqldba command=exit | awk '
    /SQL\*DBA: (Release|Version)/ {split($3, V, ".") ;
          print V[1]}'`
    case $VERSION in
    "6") ;;
    *) VERSION="internal" ;;
    esac
    else
    if [ -f $ORACLE_HOME/bin/svrmgrl ] ; then
    SQLDBA=svrmgrl
    VERSION="internal"
    else
    SQLDBA="sqlplus /nolog"
    fi
    fi
    Permissions of file:
    [oracle@mallard bin]$ ls -la dbstart
    -rwxrwxr-x 1 oracle oinstall 10407 Aug 19 12:27 dbstart
    [oracle@mallard bin]$
    User permissions:
    [root@mallard 10]# id oracle
    uid=503(oracle) gid=503(oinstall) groups=503(oinstall),504(dba)
    [root@mallard 10]#
    I can start the listener manually using "./lsnrctl start" and start the database manually from sql prompt using "SQL>startup" (as sysdba) with no problems. this only happens when using dbstart file. I am logged in as oracle user and all environment variables are set
    Thank you for any help you could provide.

    I have the same problem, but i don't want insert this string
    Connect sys/{password} as sysdbaI have deployed an Oracle 10g with os SunOS
    $ uname -a
    SunOS DB02 5.10 Generic_141444-09 sun4v sparc SUNW,Sun-Blade-T6320
    I can connect with sys/password, but I can't login with
    $ sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 7 15:19:50 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> connect / as sysdba
    ERROR:
    ORA-01031: insufficient privilegesthe the startup and dbshut don't work.
    Someone maybe help me?
    Thanks,
    Regards.
    Lain

  • Iphone 4 keeps restarting every 3 min but only when being used

    Iphone 4 keeps restarting every 3 min but only when being used, it doesn't matter what I do with it, it has to restart itself during usage, it's so annoying. I have restored but still no luck, currently trying to update the software once I've finished downloading it but I know it will keep restarting when connected to itunes.
    Anyways when I do decided to bring it to the apple store would I need to bring the receipt with me?
    because i dont have it anymore only the phone, box charger and usb
    thanks

    Anyways when I do decided to bring it to the apple store would I need to bring the receipt with me?
    No. The warranty is tied to the device, not the individual & all iphone 4's are still under warranty.

  • Every time i go on the internet the sound starts messing up but only when connected to the internet.

    1- Product name and number: Compaq CQ57 302EA 4GB
    2- Operating system installed: Google Chrome, Windows 7 (was already onlaptop when got new from store)
    3- Error Message: From bullgaurd saying I have a virus but have sorted the problem and there is no virus no longer.
    4- Any changes made to your system before the issue occurred: I have installed games and music of the internet.
    5- In the subject title, include a brief, specific description of the problem, and your product information: Compaq Laptop. Every time i go on the internet the sound starts messing up but only when connected to the internet what can i do to fix this problem?

    #You need to check your home page settings if the pages open immediately everytime you start Firefox.
    #Sometimes, things that you download and install will change your home page. When installing anything, be observant, be sure to look for check boxes during install of anything that allows you to un-check items and not install toolbars and/or make changes to your home page.
    #Firefox can have multiple home pages separated by the "|" keyboard character.
    #It sounds as though your home page setting might be: "When Firefox starts: Show my windows and tabs from last time"
    #See: http://support.mozilla.com/en-US/kb/How+to+set+the+home+page
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You need to update some plug-ins:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]

Maybe you are looking for

  • Cannot delete file from external hard drive (error code 36) in Finder, but Terminal is ok

    I have a relatively new Macbook Pro Retina 15" and have a Western Digital 1 TB Passport.  I've been using the passport for about a year now without any problems on older Macbooks in my house.  I used to be able to read and write to this drive no prob

  • Why do I have to pay to get help for Itunes?

    First off, why do I have to pay to get help? That is absolutely ridiculous when it is someone's JOB to be a "support" for this. I've had a reoccuring problem of my music not playing on my IPhone. I fixed it the first time by taking off all the music

  • Multiple objects for a Parallel Effects Object?

    I'm essentially trying to figure out how to have two object animate at the same time. My effects and parallel object are dynamically created in AS3... private function slider(_target1:mx.core.Container, _target2:mx.core.Container):void{ var slideEffe

  • Portal language is coming different

    Hi, We have backend sap system with german language when we logged into portal we are getting german language, but we need english for that we are doing personalization and changing language to english.  For that partucular session i am getting engli

  • Forms Builder error '01422'

    I am in an Oracle database class, and I am having trouble with one of my problems. When using forms builder with a sequence that automatically generates primary key values and inserts them into a text box. I use a form trigger to insert the next avai