facebook

Javascript warning: Bad number

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #250691 Reply

    Hi!

    I have been trying to find some pointers about this warning in the forum, but couldn’t find anything. I see a few Javascript warning of the type: “Bad number: ‘='” upon my JS scripts. I have identified that they are displayed for the following type of scripts:

    
    var MySomething = {
        myFunction = function() {
        }
    }
    

    The warning is reported on line 1, for the = sign. I am wondering what is the meaning of this warning message.

    Environment:
    MyEclipse 4.1.1
    Eclipse 3.1.2
    JVM: SUN 1.5.0_06 or JRockit 26.3.0-1.5.0_06

    TIA,

    ./alex

    .w( the_mindstorm )p.

    #250768 Reply

    Riyad Kalla
    Member

    I just copy and pasted this into a new test.js file and the <script> section of a new html file, and neither of them got marked with errors. Can you duplicate this on your end?

    Can you paste an entire file where you have the error or a shortened version of it?

    #250847 Reply

    Here is one:

    
    FCKConfig.ToolbarSets["ContentToolbar"] = [
            ['Cut','Copy','Paste','PasteText'],
            ['Undo','Redo','-','Bold','Italic','Underline','StrikeThrough'],
            ['OrderedList','UnorderedList','-','Outdent','Indent'],
            ['Link','Unlink','Anchor'],
            ['Image','Rule','SpecialChar', '-','Source']
    ] ;
    
    FCKConfig.Debug = true ;
    FCKConfig.LinkBrowser = false ;
    FCKConfig.ImageBrowser = false ;
    FCKConfig.ImageUpload = false ;
    
    var CUSTOMLINK_PLUGIN_PATH = '/../../../';
    FCKConfig.Plugins.Add( 'fckcustomlink', null, FCKConfig.BasePath + CUSTOMLINK_PLUGIN_PATH) ;
    

    In the problems view:

    Description: Bad number: ‘=’.
    On resource: custom_fckeditor.js
    Location: line 1

    On the gutter I have a warn sign and the following message:
    Multiple annotations found at this line:
    – Bad number: ‘=’.
    – 16 changed lines

    hth,

    ./alex

    .w( the_mindstorm )p.

    #250857 Reply

    Riyad Kalla
    Member

    Alex,
    Right click on your project and go to MyEclipse > Remove All Validation Markers. Then rebuild your project… I can’t reproduce this problem.

    Can you copy paste your result from MyEclipse > About > Configuration Summary for me?

    #250873 Reply

    Hi Riyad!

    Here it is:

    
    *** Date: Fri Apr 21 17:09:19 EEST 2006
    
    *** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_06
    
    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    
    Version: 4.1.1 GA
    Build id: 20060228-4.1.1-GA
    
    *** Eclipse details:
    Eclipse SDK
    
    Version: 3.1.2
    Build id: M20060118-1600
    
    Eclipse Platform
    
    Version: 3.1.2
    Build id: M20060118-1600
    
    Eclipse RCP
    
    Version: 3.1.2
    Build id: M20060118-1600
    
    Eclipse Java Development Tools
    
    Version: 3.1.2
    Build id: M20060118-1600
    
    Eclipse Plug-in Development Environment
    
    Version: 3.1.2
    Build id: M20060118-1600
    
    Eclipse Project SDK
    
    Version: 3.1.2
    Build id: M20060118-1600
    
    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    d:\java\jed\myeclipse4.1.1\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    1fc_7b8
    -clean
    -showLocation
    -vm
    c:\java\jdks\jrockit-R26.3.0-jdk1.5.0_06\bin\java.exe
    

    I can reproduce it without any problems :-(.

    ./alex

    .w( the_mindstorm )p.

    #250881 Reply

    Riyad Kalla
    Member

    Hmm. What happens ifyou switch to using the “javaw” executable from the Sun JDK and not JRockit?

    #250901 Reply

    Weird enough, I am getting a completely new set of warnings on other files 🙂

    ./alex

    .w( the_mindstorm )p.

    #250903 Reply

    Riyad Kalla
    Member

    Hrrm, that’s officially strange.

    Sun’s JDK is what we test and develop with. What other kinds of warnings are you getting? Did you try and right click on the project, go to MyEclipse > Remove Validation Markers” then clean it just to make sure they aren’t stale?

    #250991 Reply

    Sure. I cleaned the project, removed all validation markers and build. This resulted in different warnings, including for example: “use !== null”. I finally got to switch back to JRockit, because with SUN JVM I am getting PermGen OutOfMemory exceptions, and so far I couldn’t identify what is wrong.

    ./alex

    .w( the_mindstorm )p.

    #250998 Reply

    Riyad Kalla
    Member

    Flip back to sun’s and just use this tip: http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-10087.html

    the permSize issue is just a matter of different JVM defaults.

    #251022 Reply

    Unfortunately, things are not so simple. Here are a set of different options that more or less are finally resulting in the OOM:

    
     -Xms320m -Xmx640m -Xverify:none -XX:+UseParNewGC -XX:+UseConcMarkSweepGC
    
    
     -Xms320m -Xmx640m -Xverify:none -XX:PermSize=64m -XX:MaxPermSize=96m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC
    
    
    -Xms256m -J-Xmx512m -XX:PermSize=64m -XX:MaxPermSize=96m -Xverify:none -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
    

    I have some few more on my list. Once again, unfortunately I haven’t been able till now to figure out what is the problem.

    ./alex

    .w( the_mindstorm )p.

    #251027 Reply

    Riyad Kalla
    Member

    If your 2nd or last one are still running out of perm space, I have to ask what do you have installed? You’d really need a full install of Eclipse + MyEclipse + lots more plugins to do that.

    #251129 Reply

    Yes they go from time to time in OOM. And indeed a have a full install of Eclipse + MyEclipse (is there any other way?). As for additional plugins, I don’t have too many: AJDT, SVN, TestNG.

    ./alex

    .w( the_mindstorm )p.

    #251151 Reply

    Riyad Kalla
    Member

    Weird you shouldn’t be getting out of perm space with that stuff… were you able to narrow down the errors? it sounded like they were pretty random depending on the VM used.

    #251359 Reply

    Here is a link to an open issue for Eclipse that tries to track this problem: https://bugs.eclipse.org/bugs/show_bug.cgi?id=129490

    hth,

    ./alex

    .w( the_mindstorm )p.

Viewing 15 posts - 1 through 15 (of 16 total)
Reply To: Javascript warning: Bad number

You must be logged in to post in the forum log in