Variable from TWI Interrupt to Timer Interrupt

Using two Arduino DUEs, I read data from slave to master by using wire.requestFrom method. Here is the code:

void readPositions() // Requests coordinates (x and y) and the heading angle (theta) from the slave.
    {
      if (Wire.requestFrom(slaveAddress, dataCount) == dataCount)
      {
        for (i = 0; i < dataCount; i++)
        {
          T.b[i] = Wire.read();
          X.b[i] = Wire.read();
          Y.b[i] = Wire.read();
        }
          t = T.d;
          x = X.d;
          y = Y.d;
          Serial.print(x); Serial.print(",");
          Serial.print(y); Serial.println();
      }
    }

Its output is, say, 12.34,56.78 as expected. t, x, y variables are defined as volatile doubles at the beginning of the sketch like this:

volatile double t, x, y;

However, when I try to use those values in an other interrupt, which is the timer interrupt, for some calculations, I see that they are all zero. i.e. the output of the code below is 0.00,0.00

void doTimer()
    {
      readPositions();

      Serial.print(x); Serial.print(",");
      Serial.print(y); Serial.println();
    }

I don’t know the reason why it has a behaviour like this… Any opinion would be much beneficial for me… Thank you.

I don't know the reason why it has a behaviour like this.

There is probably something wrong with your code or your assumptions. Post ALL of your code.