Heya,
I have a small problem. I am running a Desktop App which crashes spontaneously on macOS.
Most of the time I don’t even get an error. Sometimes I get a Runtime Error like:
Runtime Error
Location Common/Cocoa/ObjCObject.h:135
Condition: !"Bad Objective-C cast"
This happens in an 8 Hour Use time around 3-8 Times a Day which is kinda often.
We tried to find reproducible Steps but it happens always in Different Scenarios. The only thing shared in the Scenarios is that I create controls on the fly and embed them. So anyone has an idea if it’s probably this?
For ex:
Dim cc as new conProductButton //container ctrl
cc.EmbedWithin(con,posx*cc.Width,posy*cc.Height,cc.Width-15,cc.Height)
closing controls like:
if curView <> nil then
if curView isA conButtons then
conButtons(curView).Close
end if
end if
If anyone has an Idea what exactly could cause the bad objective-c cast I would be happy.
Thanks in advance.
Christian