this post was submitted on 02 Jan 2026
92 points (98.9% liked)
Programming
24348 readers
218 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Win32 MFC desktop application, should be able to run continuously unsupervised for days or weeks. When I log in via RDP it crashed. Yes, just in that moment. In the end I figured it out.
MFC supports multiple visual styles, such as classic Windows, few Office versions and few more. We used feature for loading (possibly translated) strings (resource) from various DLLs. First from a currently active plug-in DLL, if the string was not there, then from a sub-system DLL, if it was not there then from main EXE. Plus there was some logic about translation and fallback to English in case of missing or not up-to-date translation. The cause was in one of the MFC visual styles, it changed a global variable related to that string loading thing for a short duration of time, then changed it back. It was only in one of the styles and there was no need to change it, the code could just load the value and use it as a parameter to a function that needed it. Our code in a different thread failed to load a string and threw an exception. Cross a COM interface boundary. Every COM method is decorated by a bunch of macros our senior engineer didn't understand and was not willing to learn. One of the macros was noexcept. Thus an exception being thrown cross an noexcept boundary crashed our app.
The main language of the app was English. The user could change it to German, French, Russian, Chinese, Spanish, etc. But sometimes the translation was not complete. Sometimes some plug-in was not translated. We used string IDs to identify various texts. Sometimes the ID pointed to the translated text, sometimes not, thus English version of that text was used instead.
Also I reported the bug in the visual style to Microsoft. They refused to fix it and said something like "don't do that".
If you don't mind answering, what was the primary language if not English?
But COM interfaces can't pass exceptions, only HRESULTs. I don't know how it was working in the first place if the setup was this janky.
Yes, that is correct. We were using C++ and COM and didn't protect ourselves against accidental exception being thrown across the COM boundary. But it never happened. Except the one case CString::Load (or whatever the function name was) failed because of Office visual style had bug in it.