views:

61

answers:

1

Hi there, my problem occurs during compiling Irrlicht3D Engine in VS 2008.

1>Error 1256: integer overflow in internal computation due to size or complexity of "irr::IReferenceCounted"

I'm currently merging a very old Softwaredriver I have written with the rest of the engine which is much newer. The main Problme is that I have tried to resolve abstract inherince problems. But now I get this error and it is the only one. "irr::IReferenceCounted" is one of the base classes used by other classes which have been inherinced from. What does that mean? I know that an integer overflow can be a normal overflow, but why is this shown during compilation?

Any help appreciated!

-db

A: 

The compiler itself has to execute some integer math. For instance, the calculation of sizeof(irr::IReferenceCounted) is likely needed when irr::IReferenceCounted is used as a base class. This could overflow if the type is larger than 4 GB.

MSalters
Thx for this hint, I have checked the IReferenceCounted and it is the basic interface for every class so it is used very often BUT:the driver is the same as several driver which are also in the engine so it does not use more objects than the others. And it will never reach 4GB. I don't know the size at all, but the engine itself just uses between 4-16MB. Is it possible that this error is shown because some abstract methods have not been implemented correctly?
odbb
The behavior is probably due to undefined behavior, but I wouldn't assume it's related to abstract methods. They don't affect `sizeof`, and the error seems related to that.
MSalters
Ok thanks, I have tried several things but didn't solve the issue yet, once I find and solution I will post it :)
odbb