We compute the growth of isolated gaseous giant planets for several values of the density of the protoplanetary disk, several distances from the central star and two values for the (fixed) radii of accreted planetesimals. Calculations were performed in the frame of the core instability mechanism and the solids accretion rate adopted is that corresponding to the oligarchic growth regime. We find that for massive disks and/or for protoplanets far from the star and/or for large planetesimals, the planetary growth occurs smoothly. However, notably, there are some cases for which we find an envelope instability in which the planet exchanges gas with the surrounding protoplanetary nebula. The timescale of this instability shows that it is associated with the process of planetesimals accretion. The presence of this instability makes it more difficult the formation of gaseous giant planets.