Possible crash between Weak Pointer IsValid check and calling Pin()
This is a very hard to reproduce bug, and the description that was given to us claimed: "had a blueprint stopped on a breakpoint. then pressed the stop button". (We are on 4.6, with some changes ported over from 4.7 and 4.8)
The code of the OnMouseLeave functions shows:
We believe that the ViewportInterface somehow got lost in between the IsValid and Pin call. This same structure happens through the whole file, except on one other location, where the Pin is called before doing the IsValid check (this occurs in the OnPaint function).
Are we correct to assume that all IsValid checks should only be called after the Pin function is called? In which case, the whole file could do with some rewriting...
It appears that the suggested code that you provided may indeed be a safer alternative in this case. I have submitted a report about this issue to have the code in this file investigated to see what we can do to reduce the possibility of any further crashes (UE-20580).
answered Aug 31 '15 at 11:00 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here