Arctic_Eddie
Well-known member
Finding errors when integrating TyQt 0.7.5 with IDE 1.6.10. See my posts, 13, 14, and 16 in
https://forum.pjrc.com/threads/35597-Arduino-1-6-10
https://forum.pjrc.com/threads/35597-Arduino-1-6-10
TyQt is a CMake project, so you need to open CMakeLists.txt as project. You can get CMake from here:Hi, TyQt is what i've been looking for! Question, i have downloaded QT Creator (including MinGW) but it's not immediately clear how to best open the project from the source you've included (thank you!) on GitHub. I don't see a project file. Any easy advice? I need to make few small changes and recompile. Thanks!
tyqt.exe!trigger_callbacks(ty_board * board, ty_monitor_event event) Line 59
tyqt.exe!drop_board(ty_board * board) Line 171
tyqt.exe!ty_monitor_refresh(ty_monitor * monitor) Line 584
tyqt.exe!QMetaObject::activate(QObject * sender, int signalOffset, int local_signal_index, void * * argv) Line 3728
tyqt.exe!DescriptorNotifier::activated(void * _t1) Line 154
tyqt.exe!QMetaObject::activate(QObject * sender, int signalOffset, int local_signal_index, void * * argv) Line 3728
tyqt.exe!QWinEventNotifier::activated(void * _t1, QWinEventNotifier::QPrivateSignal __formal) Line 138
tyqt.exe!QWinEventNotifier::event(QEvent * e) Line 244
tyqt.exe!QApplicationPrivate::notify_helper(QObject * receiver, QEvent * e) Line 3800
tyqt.exe!QApplication::notify(QObject * receiver, QEvent * e) Line 3762
tyqt.exe!QCoreApplication::notifyInternal2(QObject * receiver, QEvent * event) Line 988
tyqt.exe!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 847
tyqt.exe!QWindowsGuiEventDispatcher::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 75
tyqt.exe!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 209
tyqt.exe!QCoreApplication::exec() Line 1261
tyqt.exe!TyQt::runMainInstance(int argc, char * * argv) Line 404
tyqt.exe!TyQt::run(int argc, char * * argv) Line 342
tyqt.exe!main(int argc, char * * argv) Line 82
tyqt.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 123
Most likely yes.It's funny you mention that because I got my first crash in this function yesterday. Mine only happens if you have used "Reset Application (& Settings)" at least once. Did you?
With your fix, I haven't had any crashes yet.I have pushed a fix for this particular bug. I'm not sure it's the same because "board->monitor" would be NULL if it was the same bug, but with a release build the debug info is not reliable at all anyway.
Most likely yes.
With your fix, I haven't had any crashes yet.
BTW, TyQt doesn't compile with my standard Qt static build due to some libraries not being included during linking by the CMake build scripts (with your Qt configure flags things work). But that's really an issue with the Qt CMake support being broken with static linking:
https://bugreports.qt.io/browse/QTBUG-38913
Yes, you can open CMakeLists.txt with Qt Creator. For a while I maintained a set of qmake .pro files in the repository for Qt Creator, but I dropped them because they were regularly broken and Qt Creator supports CMake files pretty well. This wasn't so true a year ago.
Building TyQt this way works, but the resulting executable depends on the (heavy) Qt shared libraries / DLLs to work. To avoid that, you need to build a static build of Qt (Digia does not provide such a build). You can follow my instructions to do so at https://github.com/Koromix/ty/tree/master/qt5
Lastly, this project can now be compiled with Visual Studio 2015. The official Win32 builds use Visual Studio. Obviously I completely forgot to update the README, which still mentions that Visual Studio is not supported.
Yes, sorry, I've been meaning to put VS2015 instructions.
First, you need to build static Qt for MSVC (see the qt5 instructions above). Then, to generate VS2015 project files for 32-bit builds:
- 1) in the project directory, make a subdirectory "build/msvc32" (the name does not really matter here, unlike the one under the qt5 subfolder)
- 2) open the "VS2015 x86 Native Tools Command Prompt" console, go to the directory we just created and execute 'cmake -G "Visual Studio 14 2015" -T v140_xp ../..' (without the '-T v140_xp' bit the binaries won't support XP, don't ask me why you need that it's another one of Microsoft's bad ideas)
You can then find the VS2015 project files in build/msvc32, with a "ty.sln" solution.
Only Release builds will work because my qt5 instructions generate a release Qt build, it does not work in Debug because of the MSVCRT mess. I never use the VS2015 debugger so it was not a problem for me.
You created the build dir in the wrong place. Your build dir should be: "C:\ty\build\msvc32".Thanks again Koromix. I'm making progress! I do still have a build error if you don't mind taking a look.
...
C:\ty\src\tyqt\build\msvc32>"c:\program files\cmake\bin\cmake.exe" -G "Visual Studio 14 2015" -T v140_xp ../..
You created the build dir in the wrong place. Your build dir should be: "C:\ty\build\msvc32".
Edit: Too slow.
BTW, if you did build an x64 version of Qt, you want to use:
cmake.exe -G "Visual Studio 14 2015 Win64" -T v140_xp ../..
A 64 bit version of XP exists (it's based on Windows 2003 Server x64).You should probably omit "-T v140_xp" for 64-bit builds because there's no point to XP support in this case.
It compiles fine.I had to put a few workarounds in my CMake files to make "-T v140_xp" work (again, thanks Microsoft) and I didn't test them for 64-bit builds.