Buggy Bugs and difficult keys

Posted by ALB42 on 15. Januar 2013No Comments

Sometimes when a Button or so is destroyed in runtime the software crashed because in the messageport still some messages for this particular object and I have no chance to see if it is still alive.

First Idea was to poll all messages before destroy this windowthis was implemented when writing the Message for 07.01.2013 in this blog the first error report. But now I noticed sometimes a stack overflow appear when large windows are closed.

When searching for CloseWindowSafely Amiga  you find a lot of source snips which all do the same, remove all messages for this window from the messageport.
for example this
So the StripIntuiMessage is exactly what I need, conversation to Pascal is simple, the problem was it didn’t change the problem. I changed the routine that it counts how many messages are there and how many are removed. So at least it does something. Then I let the routine run twice one after the other so the second should not find a message and the overall should be smaller (because removed messages). I was surprised that the messages are not be removed.. so both runs are identical, I’m not sure whats wrong with my routine it does exactly the same as this C routine. So in the end I wrote a complete new routine, which gets all messages with GetMsg and then put them back with PutMsg when they not belong the removed window. Task done, now its working.

Another task I set for myself was the keybinding for fp-editor, and this is really crap, finally I think it would be easier to make a very big table for all cases, so all keys combinations with shift, alt, ctrl, sounds crazy but this keycodes have no real systematics. The most keys are working already… so menu keys, copy paste and so on, are working also mark text with keys is working, but still need some testing.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert