I'm using a STM32F417 microcontroller and my code runs from flash and I use ST's Window watchdog WWDG.
The problem is that during flash erase the application stalls because, as I said, the code is in the flash and that triggers a watchdog reset!
How can I solve this issue ?
Related
I'm working on a Qt app that creates a lot of threads and QTimers. When it exits, I get the following message printed:
2022-09-27 13:40:22.123 QObject::killTimer: Timers cannot be stopped from another thread
2022-09-27 13:40:22.123 QObject::~QObject: Timers cannot be stopped from another thread
So somewhere in my app, there's a bug where a QTimer is not being stopped properly when the app shuts down, and instead it's getting stopped when its object is automatically destroyed.
Given there's a lot of QTimers in my app, is there some way I can figure out which one is throwing this message? I'd like a better method than laboriously commenting out each QTimer in my app until the message goes away!
(I'm using Qt Creator on macOS to develop and debug the app.)
I'm using AudioKit (4.11.2) in my app to replay audio files.
When try to start a player after connecting/disconnecting audio hardware, there is often a deadlock in main thread. The same also happens when loading or unloading a player after connecting/disconnecting audio hardware.
Especially, when the connected/disconnected device is an Apple AirPod Pro headset, then it's reproducible by 100%.
See image with call stack on deadlock.
Image with call stack of deadlocks
I know that AudioKit 4.11.2 is not the latest, but it is the latest 4.x release. I cannot yet switch to 5.x due to the breaking change of missing AKPlayer class.
Is there any known issue with deadlocks after connecting/disconnecting audio hardware?
I already switched off AKSettings.enableCategoryChangeHandling and AKSettings.enableRouteChangeHandling, but that didn't help.
P.S:
In the mean time I migrated to AudioKit 5.3.2 and use the class AudioPlayer instead of AKPlayer and the issue is still the same.
After many hours and hours of debugging I found that it must be an Apple bug.
Reading lastRenderTime (AKManager.engine.outputNode.lastRenderTime on AudioKit 4 or avEngine.outputNode.lastRenderTime on an instance of AudioEngine on AudioKit 5) causes the problem.
As long as I never read lastRenderTime, I can connect/disconnect the AirPod Pro headset and play the audio file without any problems.
Once I read lastRenderTime, after next connect/disconnect of the AirPod Pro headset the main thread freezes when trying to start the player.
(lastRenderTime on AVAudioNode is an Apple function, not an AudioKit function.)
Have a good day.
I have a problem about touch device's hot-plug.
I set the environment variable as below.
export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/ts_uinput:rotate=0
The "/dev/input/ts_uinput" is created by ts library's application "ts_uinput".
The touch function can work normally before I re-plug the USB touch device.
If I re-plug the USB touch device, the touch function doesn't work.
The "/dev/input/ts_uinput" still is created after I re-plug the USB touch device.
I also monitor the data in "/dev/input/ts_uinput" and it also has data report.
Why the Qt does not get the touch event after re-plug the USB touch device?
I would boldly guess that this is because Qt (the Qt evdev platform plugin) opens /dev/input/ts_uinput when the app start. When you replug the touch device, the file is recreated but the file handle held by Qt has become invalid. Making it work again would require Qt to close and reopen the handle.
You could try getting more info by enabling debug logs: http://doc.qt.io/qt-5/embedded-linux.html#debugging-input-devices
However, I do not know if this is a bug or a missing feature, you might want to contact the Qt interest mailing list or report a bug.
I have cross compiled Qt 4.7.4 for an ARM board successfully.
I have created a sample Qt application for an ARM board and cross compiled that as well.
When I run the app on the actual hardware, I do not see the UI on the LCD screen (but could see the logs provided using qDebug).
At this point, if I reboot the board, the UI of the sample app becomes visible for a second, just before the screen turns off, due to the reboot.
Do you have any suggestions regarding this problem. What could be the possible causes for this?
Regards,
Mohan
I did solve this problem.
Need to change the backlight intensity. Set it to the maximum and UI is visible on the LCD screen.
No changes/update required anything related to Qt.
In an IPhone app, I put a breakpoint in appDidFinishLaunching, and when I invoked the program from the compiler using command-Return, the code stopped at my breakpoint.
Then I shut down the program, but not the simulator. When I then invoked the program from the program icon, the code did not stop at my breakpoint. The breakpoint was not within any conditional scope.
Any ideas as to what's going on here?
Thanks,
John Doner
The breakpoint is something that only the debugger is aware of, and only launching your program from Xcode invokes the debugger. "Run and Debug" launches both your application and gdb (the debugger that Xcode uses) and connects them together. When the debugger sees that you have reached the execution point referenced by your breakpoint, it stops execution of the application. The application itself has no idea about the breakpoint.
If you launch your app from the Simulator (or a device) directly, the debugger isn't running, and so your breakpoint has no effect. It isn't part of the compiled app in any way.
Educated guess: breakpoint wasn't active when you invoked your application from the program icon. In order to hit a breakpoint, your app has to be started from Xcode.