microsoft / SEAL

Microsoft SEAL is an easy-to-use and powerful homomorphic encryption library.
https://www.microsoft.com/en-us/research/group/cryptography-research/
MIT License
3.62k stars 709 forks source link

Windows:Visual studio 2019: missing exception info #321

Closed akryeem closed 3 years ago

akryeem commented 3 years ago

Hello, I'm working on a SEAL project in Windows and Linux environments. On Linux I'm getting an exception with error info like: "what() scale out of bound" or different message for different errors, while the same code doesn't provide this piece of message (what()...) in Windows VS. In Windows I only get something like:

Exception thrown at 0x00007FFCBBD9D759 in FHE_SFHT.exe: Microsoft C++ exception: std::invalid_argument at memory location 0x00000XXXXXXXX.
Unhandled exception at 0x00007FFCBBD9D759 in FHE_SFHT.exe: Microsoft C++ exception: std::invalid_argument at memory location 0x00000XXXXXXX.

My question is: How can I get similar info or more detailed info about errors and exceptions in Windows?

Setup: SEAL 3.6.3 Windows 10 - VS2019 Ubuntu20

WeiDaiWD commented 3 years ago

Those are two different run-time errors caused by different reasons, if we designed everything correctly. Could you please run in debug mode in Visual Studio and same in Linux, then tell me where the errors are thrown? It would be helpful if you can share the stack frames. If different run-time errors were thrown on different systems, we need to fix it.

akryeem commented 3 years ago

Unfortunately that's not possible in my current situation, since in Windows debug mode some SEAL functions are x18 slower than in release mode, I don't have enough resources to work in debug mode.

WeiDaiWD commented 3 years ago

How about RelWithDebInfo mode?

akryeem commented 3 years ago

OK, when building RelWithDebInfo, things seems to work better, I can see more error info: image

I think with this 'solution', the issue could be closed. (it only works while running through VS, when running in CMD there is no info presented)