This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 10071 - Autoupdate crashing IDE
Summary: Autoupdate crashing IDE
Status: CLOSED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: -FFJ-
Hardware: PC Linux
: P1 blocker (vote)
Assignee: issues@platform
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-08 04:42 UTC by glz
Modified: 2003-06-30 13:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description glz 2001-03-08 04:42:44 UTC
Auto Update downloads updates, verifies the updates, and then proceeds to crash
the IDE without doing the update.  This happens as any user, and as root (trying
to update the "shared installation"

Details:

-- System info ----------------------------------------------------------------
  Product Version          = Forte(tm) for Java(tm), release 2.0, Internet
Edition (Build 1160)
  IDE Versioning           = IDE/1 spec=1.1.0.1 impl=Build 1160
  Operating System         = Linux Version 2.4.1-lpp-0.3.0-R2 Running on i386
  Java Version             = 1.3.0_02
  Java VM Version          = Java HotSpot(TM) Client VM 1.3.0_02
  Java Vendor              = Sun Microsystems Inc.
  Java Vendor URL          = http://java.sun.com/
  Java Home                = /usr/local/jdk1.3.0_02/jre
  Java Class Version       = 47.0
  System Locale            = en_US
  JIT                      = unknown or not used
  Home Dir                 = /root
  Current Directory        = /usr/local/forte4j/bin
  Forte for Java Home      = /usr/local/forte4j
  Forte for Java User Home = /usr/local/forte4j
  System Directory         = /usr/local/forte4j/system
Comment 1 Antonin Nebuzelsky 2001-03-08 09:01:04 UTC
I assume the "crash" is in fact a correct behaviour of autoupdate, because after
clicking on "Finish" in the autoupdate wizard IDE has to restart itself. The
first step is shutdown of the IDE and then the IDE starts again automatically.
BUT:
I assume you are running Redhat 7.0 because other versions (to my knowledge) are
OK. So, there is a known issue on Redhat 7.0: IDE only shuts down and does not
start again. If you have a look in runide.sh, at the end of the file there are
these commands:

   if [ $rc -ne 66 ] ; then
       exit $rc
   fi

   # runs updater
   eval $jdkhome/bin/java $thread_flag $jargs -classpath "\"$cp\"" $updater

Because the IDE does not return exit code 66 on Redhat 7.0, the updater is not
started.

There is one possible workaround - after you click Finish in the autoupdate
wizard and the IDE shuts down, you could try running this command by hand (copy
runide.sh to foo.sh and modify foo.sh to run this command).
Comment 2 Antonin Nebuzelsky 2001-03-28 15:15:16 UTC
A better workaround comes from Tom Shields. He "hacked" the script to check for
existance of updates rather than return code 66, as follows, to get around this
problem:

*** runide.sh   Fri Dec 29 20:15:22 2000
--- new-runide.sh       Fri Dec 29 20:15:55 2000
***************
*** 362,370 ****
      # AutoUpdate exit?

      rc=$?
!     if [ $rc -ne 66 ] ; then
!         exit $rc
!     fi

      # runs updater

--- 362,370 ----
      # AutoUpdate exit?

      rc=$?
!     for file in ${idehome}/update/download/*.nbm ; do
!         if [ ! -e "$file" ] ; then exit $rc ; fi
!     done

      # runs updater
Comment 3 mslama 2001-04-18 13:24:32 UTC
Note: Use userdir instead of idehome for multiuser instalation (currently
multiuser is default).
Comment 4 pfelenda 2001-05-18 15:24:53 UTC
I have the same problem on Linux Redhat 6.2.
Better workaround for both single and multiuser mode is descipted below.
Do change in runide.sh script .

this is the original code :

    if [ $rc -ne 66 ] ; then
         rm $nbenvfile
         exit $rc
    fi

and this is my fix :

    # Multi user mode
    if [ ! -z "$userdir" ]; then
        for file in ${userdir}/update/download/*.nbm ; do
          if [ ! -e "$file" ] ; then
              rm $nbenvfile
              exit $rc ;
          fi
        done
    # Single user mode
    else
       for file in ${idehome}/update/download/*.nbm ; do
         if [ ! -e "$file" ] ; then
             rm $nbenvfile
             exit $rc ;
         fi
       done
    fi
Comment 5 Jan Chalupa 2001-05-21 14:14:52 UTC
The problem is in the Linux' libpthread-0.9 library (shipped with glibc-2.2 -
default for RedHat 7.0).

For more information see

http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=23758
or 
http://developer.java.sun.com/developer/bugParade/bugs/4388732.html
Comment 6 Jaromir Uhrik 2001-05-21 17:55:43 UTC
The workaround from Petr Felenda (2001-05-18 07:24) performs incorrect behaviour
of IDE in case that the update of some module(s) was canceled. Then after the
begin of IDE closing the Update of module(s) will continue and the IDE will
start again. This is because the nbm file(s) remain in the download folder.
Comment 7 Jesse Glick 2001-07-17 18:09:37 UTC
By the way communication with the updater will be done differently in
NB 3.3 and the exit status will no longer matter.
Comment 8 Jaromir Uhrik 2001-08-08 10:15:39 UTC
Verified.
Comment 9 Quality Engineering 2003-06-30 13:49:40 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.