Comments (8)
You can add something like the following at the start of main()
https://github.com/KDAB/GammaRay/blob/master/launcher/app/main.cpp and then launch the app from the Terminal ./bin/gammaray.exe
:
#include <windows.h>
// Enable on windows to see output in console
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
if (fileno(stdout) < 0)
freopen("CON", "w", stdout);
if (fileno(stderr) < 0)
freopen("CON", "w", stderr);
}
You can also try to use a debugger instead.
This is the function that is used to check if the running process uses QtCore
and then this
function is used to check the abi.If anything is going wrong in these two, it won't attach to pyside apps.
For linux the issue was that it was finding QtCore.abi3.so
and thinking that this was the QtCore library, which it isn't and hence failed to attach. I am assuming that on windows there is a similar issue.
Perhaps you can create a patch that fixes this :)
from gammaray.
Please try with latest master
from gammaray.
@Waqar144 I rebuilt Gamma Ray with latest master commit and the application still does not appear in the list of processes that Gamma Ray can attach to after adding the from PySide2 import QtCore
line.
from gammaray.
@brycegbrazen Can you share what are the contents of your PySide2 package. For e.g., on linux on my pc /usr/lib/python3.11/site-packages/PySide6/
has
/usr/lib/python3.11/site-packages/PySide6/QtConcurrent.abi3.so
/usr/lib/python3.11/site-packages/PySide6/QtCore.abi3.so
... more .so files
Also, if possible put a std::cout in ProbeABIDetector::containsQtCore(const QByteArray &line)
and print out the line when trying to attach to a pyside app. It will make it easier to figure out what's going wrong.
from gammaray.
@Waqar144 Inside of the PySide2 package I've got some similar files to the ones you mentioned above but with the .dll
and .lib
extensions:
pyside2.abi3.dll
pyside2.abi3.lib
... more .dll files
I do also see a .dll file specifically for Qt5Core: Qt5Core.dll
I am on Windows 10 so I know the file extensions will be different than what you're seeing.
from gammaray.
Unfortunately I'm not sure how to build and launch Gamma Ray in order to see any std::cout
print statements I add, so I cannot do that part without some guidance.
from gammaray.
@Waqar144 Alright I've figured out the issue! For Python Qt apps on Windows, it seems that the Qt application uses the standard QtCore5.dll
if QtCore is NOT imported in Python, and then switches over to a different file if it IS imported QtCore.pyd
.
The problem lies in the fact that the code relies on the found file including the Qt major version as shown here. I'm not really sure what to do about this, but this is definitely the issue.
Any ideas on a solve?
from gammaray.
Trying to understand... Can you tell me what is the path
when
Version version = fileVersion(path);
if (version.major == -1)
this check faills? Is it the QtCore.pyd
file? If yes, then the solution would be to make sure QtCore5.dll
is the file instead of QtCore.pyd
.
See this commit abd80cc which does the same for linux.
perhaps add a check and test
// ignore QtCore.pyd
if (line.lastIndexOf(".pyd", index) == index) {
return false;
}
from gammaray.
Related Issues (20)
- QSS debugger? HOT 2
- Build: Picking up Qt modules "from other prefixes" can mix versions, break builds HOT 3
- New qml_lint picks up Qt 5 version, fails the build HOT 2
- Creating a Deployment of Gamma Ray on Windows HOT 4
- Quick Scenes Not Responding HOT 3
- Building against Qt 6.7 fails HOT 5
- Why GAMMARAY_PROBE_ONLY_BUILD implies skipping install? HOT 2
- Quick Scenes: always pan view with <modifier>+click
- Need Help in building GammaRay HOT 3
- Cannot launch GammaRay on Windows 10 HOT 2
- QMetaMethod::invoke: 'QHeaderView*'
- Add packaging info to INSTALL.md
- GammaRay 3.0.95 won't attach to minimalwidgetapplication (or any other Qt app) HOT 4
- Widget Inspector not updating in real time HOT 1
- [Feature request] Improve the Connection Error dialog HOT 1
- Help Needed: Building GammaRay from Source on UBUNTU HOT 5
- GammaRay: Failed to load: ..\gammaray\plugins\gammaray\3.0\qt6_5-GNU-x86_64d\gammaray_probed.dll HOT 3
- GammaRay exits after 1 minute HOT 3
- Building against custom Qt6 build fails if `qmake` is missing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gammaray.