I recently have experienced crash using glm::lookAt function. I'm not sure what is wrong, but it occurs only when I pass camera location and target both with the same Z value. For example camera location to be (0, 0, 4) and target (0, -1, 4) and to have every argument, the up vector is also (0, 1, 0).
Is it me doing something wrong, or it's just the glm's bug? In either case, what should be done to avoid the crash?
The error message is:
Thanks.Terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_$_construct null not valid