Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
The program has unexpectedly finished (When Loading Video)
Hi All, I can run my program but when I try to load a video into my GUI project, it crashes the system and gives me this error. This was run after I run qmake on this project because I was facing the issue of
Now my program crashes whenever I load a video file .mp4 into the GUI Project.
Is there a way to backtrack where it went wrong?
I have the following warnings
It used to be working fine but I ran Qmake, Rebuild All and ran the program. now it just crashes without showing any videos
@Stevendragoes Did you already run your app through debugger to get the stack trace?
The crash can be anything, we need stack trace.
I have the following error
And I was presented with these
Is the information enough?
@Stevendragoes my guess would be, the MediaPlayer object is not initialized
can you show us the content of on_actionPlay_triggered and where you initaize the MediaPlayer object?
oh wow. @J-Hilk I think you are right. I just removed everything that is related to MediaPlayer and it is working as intended.
But previously I initialised MediaPlayer Object in my code. However, I removed it because I wanted to use OpenCV to tie to QT. Hence wanting to use QTimer to get each frame and display on QLabel.
I have a doubt, previously, I removed QMediaplayer Object, it did not give me the error or crashes unexpectedly at all. Is it because QT still recognised that QMediaplayer is still initialised? Hence, another question, since i ran qmake, QT recognised that I did not initialise the QMediaplayer and crashes when I try to load in the video?
@Stevendragoes This is normal unfortunately :-)
CLang code model is often causing such warnings.
@jsulm thank you for your response. :) Appreciate it