Dude wrote:What. The. Hell? How do I even START to debug this problem?
set your debugger to be Just In Time so that you can break into it when the GPF occurs, and with any luck the stack isn't corrupted and can trace backwards. Sounds like a really fun one to debug though lol </sarcasm>
Never mind -- I worked it out. Turns out App A was using SetForegroundWindow_() with App B, but apparently App B's window handle was being reported bad (ie. GetForegroundWindow_() for App B was setting the wrong handle). Anyway, when I removed SetForegroundWindow_() in App A, it no longer crashes App B, so I have to fix that situation. Solved!
Yes! And it's funny how you forget what you did in one app years ago... I totally forgot it was setting the foreground window of whatever app had the focus at the time. Hence why I thought the two apps had nothing to do with each other, but in reality they were.
[Edit] BTW, this is why I love coding -- endless and tricky logic puzzles!
Dude wrote:[Edit] BTW, this is why I love coding -- endless and tricky logic puzzles!
Yes I think it's a really, really nice aspect of our job as coders that our minds are always being challenged, and not in boring ways (sorry accountants). I wonder what proportion of careers are relatively mundane on the brain? They're the ones being outsource to robots now, but that's another good thing - I can't see robots taking over programmers any time soon. I also like it how our version of 'extreme problems' is a popup window saying an app has crashed, bubblewrapped all the way. There's no way in hell I could be a crane operator! And when it's too hot or too cold outside? No problems! Best job in the world.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!Please visit my YouTube Channel