gst-python: appsink callback function "new-sample" sometimes start throwing type errors when calling unmap on the data
Describe your issue
We have a decoding gst pipeline in python which can have different sources but always end with an appsink. Lately we started getting rarely this type error buf.unmap(mapinfo)TypeError: argument info: Expected Gst.MapInfo, but got gi.repository.Gst.MapInfo
when we set our pipeline to playing. The error is thrown on every call of the callback function and leads to a memory leak and the app crashing.
This only happen at the start and does not happen often. Its very hard to replicate. There seem no logically trigger for it at least from my point of view.
Expected Behavior
That this error should not be thrown since it seems like some confusion in the namespace.
Observed Behavior
The error happening very rarely but persist to happen with no observed pattern.
Setup
- Operating System: python:3.11-slim-bookworm
- Device: EC2 instance c5n.large
- GStreamer Version: 1.22.0-3+deb12u1
Steps to reproduce the bug
Its not easy to reproduce the bug sometime it takes month of running applications to occur and it only occur at the start of the application and cause a crash since the unmap method never get called and this cause very fast and huge memory leak that cause the instance to crash.
How reproducible is the bug?
Rarely and randomly. We generally do not know how to reproduce it.
Additional Information
Its always the same error -> buf.unmap(mapinfo)TypeError: argument info: Expected Gst.MapInfo, but got gi.repository.Gst.MapInfo
, in the callback function of the appsink new-sample