Hi, guys. I've been working on a game. I'm on the verge of uploading a demo. However, I've run into a problem. The program runs okay in a shell. But when I run it in Workbench, it freezes up. I've identified where the problem occurs. I have two functions called OnLButtonDown and OnLButtonUp. They handle left button clicks. When either function is called, the first thing it does is lock up the computer. As far as I can tell it doesn't execute any instructions, it just goes off into Never-Never Land. It does this on my X5000. It works okay on my Micro. Do you need any special code to run a program in Workbench? I have the stack set to 200,000.
Tue, 2021-11-30 15:55
#1
Workbench problem
I have a hard time debugging on my X5000. That's been discussed before. All I can do is put messages in that tell me when and if it has reached a certain point. So I did that and recompiled the whole thing and it is working now. Maybe just recompiling is what did it. That's concerning because I want it to run on any NG Amiga running the latest version of AmigaOS. Maybe that's too much to expect. I'll just have to hope for the best.
Anyway the problem has been solved for now.
Yes and no.
Workbench startup has to be handled differently than CLI startup. But normally the C/C++ runtime does that for you, unless you link with -nostdlib and write your own startup code.