Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.2.0 Alpha, 5.2.0 Beta1 , 5.2.0 RC1, 5.2.0, 5.2.1
-
None
-
Windows 7 SP1 x64, VS2008 SP1
-
c453571d753160313a8dcb3f3aa4667c34616a8f
Description
The problem was probably caused by commit bacbf1fcf35afcece74270fda5521d43b039ee48 in which qBinaryFind() was substituted with std::lower_bound() in qcssparser.cpp. The QCssKnownValue array passed to findKnownValue() in bool Parser::parsePseudo(Pseudo *pseudo) is not fully initialized. The 'pseudos' array have only 44 values defined but the array is declared to be with size = NumPseudos - 1, where NumPseudos = 46. So the array is declared with size 45 and only 44 values are initialized. Changind the declaration of NumPseudos to 'const int NumPseudos = 45;' in qcssparser_p.h fixes the assert. The assert happens on the word 'vertical' probably because it is declared at the end of the pseudos array. For example 'horizontal' doesn't force std::lower_bound to go to the end and the assert doesn't get hit.