Shields Communication

Hi Everyone!
I have been trying to work this out since several days ago without sucess.
Hardware:
SIM900 Shield+GPS Shield+Arduino

I am using 3 libraries GSM.TinyGPS,inetGSM each one of them have been used succesufuly and GPS + GSM succesufully as well, the problem comes when I try to integrate all 3. The code compiles and gets uploaded but then, the serial monitor doesnt do anything (white screen).

The code works if I comment following lines:
SoftwareSerial ss(5, 4);
TinyGPS gps;

but if I include them, then I get the white screen, so Im thinking it might be something with the PIN communication or memory maybe, but IDE shows size of 14,212.

code:

#include "SIM900.h"
#include <SoftwareSerial.h>
#include "inetGSM.h"
#include "sms.h"

SoftwareSerial ss(5, 4);
#include <TinyGPS.h>

InetGSM inet;
SMSGSM sms;

//TinyGPS gps;

char msg[50];
char msg2[50]="meesage:";
int numdata;
char inSerial[50];
int i=0;
boolean started=false;

char position;
char n[20];
char smsbuffer[160];


boolean getGPS=  false;
void setup()
{
     Serial.begin(2400);
     Serial.println("GSM Shield testing.");
     if (gsm.begin(2400)) {
          Serial.println("\nstatus=READY");
          started=true;
     } else Serial.println("\nstatus=IDLE");
};

void loop()
{
    if(started) {
       if(position = sms.IsSMSPresent(SMS_ALL)){
       Serial.println("Leyendo SMS");
       sms.GetSMS(position, n, smsbuffer, 160);
        sms.DeleteSMS(position);
        
       if (strcasecmp(smsbuffer, "get") == 0) {
          Serial.println("Lets get");
          if (inet.attachGPRS("internet.movistar.cr", "", ""))
               Serial.println("status=ATTACHED");
          else Serial.println("status=ERROR");
          delay(1000);
          gsm.SimpleWriteln("AT+CIFSR");
          delay(5000);
          gsm.WhileSimpleRead();
          numdata=inet.httpGET("restgps-gps9728974383324.rhcloud.com", 80, "/user/2", msg, 50);
          Serial.println("\nNumber of data received:");
          Serial.println(numdata);
          Serial.println("\nData received:");
          Serial.println(msg);	
       }
         else if (strcasecmp(smsbuffer, "km hoy") == 0) {
	sms.SendSMS(n, "Ubicacion actual: http://maps.google.com/maps?q=9.992615,-84.137229&ll=9.992615,-84.137229&z=30");
}
else if (strcasecmp(smsbuffer, "ubicar") == 0) {
   Serial.println("Lets GPS!");
started = false; 
getGPS=true;

}

       }
       else 
      Serial.println("NO hay SMS");   
    delay(2000);
    
        
     }
     
     if (getGPS)
{
  Serial.println("GPS DONEEE");
  getGPS=false;
}
};

Sounds to me like you are out of memory. http://playground.arduino.cc/Code/AvailableMemory

thats what I was thinking, I used the library and yes thats the issue. Solutions?

Can I remove part of the other libraries that are not been used?

thanks for your help!

Can I remove part of the other libraries that are not been used?

The linker only includes code that is actually used. So, no, there is nothing for you to do.

Except get an Arduino with more memory or live with less functionality.

Of course, that assumes that you are using all memory efficiently, which is not confirmed by the code you posted.

For instance, there is no need to have this string literal in SRAM, but it is there:
Serial.println(“GSM Shield testing.”);

With this small change, it is not:
Serial.println(F(“GSM Shield testing.”));

Look at the sizes of all of your arrays, too. Are they all needed? Do they need to be that big?

No is not needed, I will make it better!

Thanks for your help!