On further debugging, found that I'm getting an invalid tag from the raw IFD data.
I think it is expected to get this tag EXIF_TAG_EXIF_IFD_POINTER (0x8769) .. But I'm actually getting (0xFFFFFFFFFFFF8769) which messes up the whole tag extraction and gives an unknown tag which is negative -30871
Does anyone have any clue about this problem...
Strangely, it works fine on my linux machine.