gdb doesn't resume after breakpoint. MITK-Framewok Project using Qt-Creator, gdb, Linux Mint 15 - qt

I'm writing plugin for the MITK framework using Qt-Creator with gdb on Linux-Mint 15.
Resuming after halting at any breakpoint doesn't work, or seems to take upwards of 30 minutes (every time). My project is not very big however, so there's no way I've got the debugger set up correctly.
I've got the Qt 4.8 and 5.01 packages installed. MITK requires Qt4 and I believe to have it specified everywhere in the makefiles.
I do get the following output when starting to debug:
&"warning: GDB: Failed to set controlling terminal: Unpassender IOCTL (I/O-Control) f\303\274r das Ger\303\244t\n"
no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
From other answers on this site I get that the first line can be ignored...
Can anyone say if the second line is related to my problem and possibly how?
I wonder if this could have to do with there being two versions of Qt installed on my pc - I dont know how to get Qt5 completely off the system with all its packages though...
One user mentioned this: https://stackoverflow.com/a/17256365/2561709
Its all I could really find but I dont understand it, any clues?
I'd appreciate any hint at a possible cause of the problem. Please tell me what other relevant information I could provide, thanks!

Related

Can't get Qt Creator debug working on Windows 10

I'm starting to work with Qt 4.8.4 on Windows 10, and I've been trying to use the debugger for two days, but I just can't get it to work.
First of all, I've downloaded MinGW 4.4, and that's the version I selected for Qt installation. I've also installed the Windows 10 debugger tools from SDK. Both x86 and x64 CDB debuggers were automatically recognized by Qt Studio, and I manually added the GDB executable that came with MinGW.
The problem is that I can't get any of those debuggers to work, even with the simplest code I can imagine, where I just increment an integer.
When using any of the CDB debuggers, I get the following message:
The selected debugger may be inappropiate for the inferior. Examining
symbols and settings breakpoints by file name and line number may
fail. The inferior is in the Portable Executable format. Selecting GDB
as debugger would improve the debugging experience for this binary
format
So I decide to select the GDB debugger I linked previously, and I get an error with message:
No symbol table is loaded. Use the "file" command.
I have looked at this, but I don't know how to set up Qt Creator to use that file command.
I have no clue on how to solve this, and neither have I find any solution on the net. Reinstalling Qt didn't work either.
Can somebody help me please? I need this for my work and I'm completely stuck.
PS: Here are my kit and debuggers configuration in case they are helpful.
Thanks a lot!
Okey, so it seems that it's not possible to use the debugger on this version of Qt with 64 bits Windows: source

Program made with PyInstaller now seen as a Trojan Horse by AVG

About a month ago, I used PyInstaller and Inno Setup to produce an installer for my Python 3 script. My AVG Business Edition AntiVirus just started complaining with today's update that the program has an SCGeneric Trojan Horse in the main .exe file used to start the program (in the folder created by PyInstaller that has all of the Python "guts"). At first I just thought it was a false positive in AVG, but submitting the .exe file to VirusTotal I get this analysis:
https://virustotal.com/en/file/9b0c24a5a90d8e3a12d2e07e3f5e5224869c01732b2c79fd88a8986b8cf30406/analysis/1493881088/
Which shows that 11 out of 61 scanners detect a problem:
TheHacker Trojan/Agent.am
NANO-Antivirus Trojan.Win32.Agent.elyxeb
DrWeb Trojan.Starter.7246
Yandex Trojan.Crypren!52N9f3NgRrY
Jiangmin Trojan.Agent.asnd
SentinelOne (Static ML) static engine - malicious
AVG SCGeneric.KTO
Rising Malware.Generic.5!tfe (thunder:5:ujHAaqkyw6C)
CrowdStrike Falcon (ML) malicious_confidence_93% (D)
Endgame malicious (high confidence) 20170503
Zillya Dropper.Sysn.Win32.5954
Now I can't say that these other scanners are ones that I have heard of before... but still I'm concerned that it is not just AVG giving a false positive.
I have submitted the .exe file in question to AVG for their analysis. Hopefully they will back off on whatever it is that they thought they were trying to detect.
Is there anything else I can do with PyInstaller to make it so that the .exe launcher that it created won't be considered a Trojan?
I was always getting some false positives with PyInstaller from VirusTotal. This is how I fixed it:
PyInstaller comes with pre-compiled bootloader binaries for different OSs. I suggest compile them by yourself on your machine. Make sure everything is consistent on your machine. For Windows 64-bit, install Python 64-bit. Download PyInstaller 64-bit for Windows. Make sure Visual Studio (VS) corresponding to your Python is installed, check below:
https://wiki.python.org/moin/WindowsCompilers
Compile the bootloader of PyInstaller on your machine with VS. It automatically updates the run.exe, runw.exe, run_d.exe, runw_d.exe in DownloadedPyinstallerFolder\PyInstaller\bootloader\Windows-64bit. Check below for more info on how to compile the bootloader:
https://pyinstaller.readthedocs.io/en/stable/bootloader-building.html
At the end, install PyInstaller. Within the PyInstaller directory, run
python setup.py install
I was able to submit the file in question to AVG's "Report a false detection" page, at https://secure.avg.com/submit-sample. I received a response back fairly quickly (I can't remember exactly how long, but it was less than a day) that they had analyzed my file and determined that it did not have a virus. They said that they had adjusted their virus definitions so that it would not trigger a false positive anymore. I updated my definitions and it was still triggering, so I contacted them again with my virus definition version, and I heard back that the version I had wasn't high enough - I think there was some delay on my definitions because I get them from a local server. But within a day I had the right version of the definitions and the false positive didn't trigger anymore.
So if you have a false positive with AVG, I would recommend this solution - fairly quick and easy to get a resolution to the problem.
I puzzled over this question for two days and finally found a problem with my application. The issue was with the application's icon.
Example for tkinter:
root.iconbitmap('./icon.ico')
When I removed this line of code, the false-positive Trojan was gone.
Also, make sure not to use --icon dependency when you are converting your .py file into .exe. Otherwise, this will cause the same false-positive Trojan detection.
I faced same issue for my small document register project code.
My temporary solution was to allow the app in windows defender and
other solution was to use the command pyinstaller filename.py instead of pyinstaller --onefile filename.py.
I dont know if it is correct. But it worked for me.
I searched many blogs for weeks. But I found nothing..
Today I found a way to convert py to exe without any virus errors.
Virus Total Report
So in this method you do not need to send any reports.. Actually It is very simple.
You need to install a module named Nuitka.
python -m pip install nuitka
Then you need to open command from from the file path. And use the command;
python -m nuitka --mingw64 filename.py
And that's all.
You can use the command
nuitka --help
You can find more at - Nuitka Guide
I had this same problem using python 3.8.5 and pyinstaller 4.5.1
In my case the first exe build was accepted by the antivirus (Windows Defender) but subsequent builds were flagged as having a trojan.
I solved it by using the pyinstaller --clean option every time I built the executable
Reverting back to PyInstaller 3.1.1 from 3.4 resolved similar issues on my end (at least temporarily).
As #boogie_bullfrog told, reverting to a previous version could be a solution. However I used *.spec file to store some data (like pictures and icons). I had the latest 3.5 version (August, 2019) and moving to 3.1.1 caused error when app was compiled (probably due to supporting Python 3.7).
So right now the easiest solution is to downgrade to 3.4
It supports specs from pyinstaller 3.5 and the onefile-app wasn't detected by Windows 10 built-in firewall
What I did was to solve this(make exe files non detectable as virus) was to downgrade pyinstaller by typing in cmd: pip install pyinstaller==4.1.0
And by the way it didn't work on 3.4.0 so I just randomly picked that version(4.1) and its pretty good looking so far :>
I'm pretty sure that it works on more than only that one version but that i experienced personally
Recompile and then reinstall your Pyinstaller bootloader manually.
This was a problem I had for a while, and my friend and I figured out this resolution with the help of many others. It almost always works to resolve the issue.
I posted the specific steps on my medium blog. Shared the link below, but the basic steps are as follows
Purge Pyinstaller Files within your Project and Rebuild
Uninstall Pyinstaller
Build a Pyinstaller Bootloader with your Compiler
Install the newly compiled Pyinstaller
Re-build your EXE with Pyinstaller, and make sure it’s not being be flagged as a virus
How to Resolve the Python Pyinstaller False Positive Trojan Virus
Part 1. Manually Compile your Pyinstaller Bootloader
Part 2. Working with Anti-Virus Developer(s)
I had a similar problem with a pyinstaller exe under Windows. Avira put that file into quarantine since it was considered potentially dangerous (due to heuristics, which means that some segments look typical for a virus, but no virus is actually found).
Keep in mind that the exe files you generate yourself are unique (as a consequence, the Avast scanner usually returns a message "you have found a rare file, we are doing a quick test", and delays execution for 15 seconds to perform a more thorough test).
My solution consists of some steps:
I have uploaded the exe to https://www.virustotal.com/gui/home/upload to check it with many scanners. If just one or two are detecting a virus, you should be on the safe side.
In order to make your local virus scanner accept the file, you can manually accept it for your computer, but this does not solve the underlying problem, so on other computers it would still be flagged as a virus.
Therefore I reported the file as false positive to Avira, which can simply be done by sending it by email. Other scanners have similar feedback lines. I got a feedback by email within one day that it is ok, and the scanner on my pc agrees with this now. Hope that this helps with the next iterations of my exe so that it stays clean.
Had the same problem today. Win8.1 would keep flagging .exe as virus. Updated to pyinstaller 5.7.0 but the issue persisted. Uninstalled pyinstaller 5.7.0 and did a fresh install. Strangely, Win8.1 isn't complaining anymore!

Phabricator SVN Revision file context

I cannot get phabricator to display the changes in using the file context. I got the "Context not available" on every file.
Does anyone know why is this not work? What should i do to debug this problem?
This seems a problem related with SVN only because its working with GIT.
Thanks.
I bumped in the same problem recently and googled this question. I found out that the context is available only when diff is created via arcanist command line tool (arc diff) in Linux or Mac OS.
It won't work if you create a diff directly by pasting it in Phabricator/Differential or by using arcanist tool in Windows.
I tested this with arcanist on Ubuntu 14.04, Mac OS 10.10 (those two worked) and in Windows 7 (didn't work).
You didn't specify whether you're using the arc diff command line tool, or manually uploading a diff via the Phab. web interface.
If you're not using arc diff, I have an answer for you: It's up to you to include the context yourself. Phab. only knows what's in the diff/patch that you give it. If you can't get the full context, that's a fault with your diff/patch, not with Phab.
If you're using a standard diff utility, like GNU diff, you can use the command-line arguments to dictate how much context to include in the output. I usually use some obscenely large number, like 500 or 1000, to ensure that the entire file ends up in the output.
I just took a quick look at the svn command-line documentation, and it seems that there's no way to control how much context goes into the output. ...but maybe I'm wrong...
In any case, shortboy is correct that the easiest way to get the full file context is to use arc diff.

QTCreator segfault after 1st run

I've recently had a horrible problem with QTCreator. After the first time of running the program, ALL debugging instances segfault upon constructing the MainWindow object. Even if i make a blank QTwidget project and run in debug (without editing a single bloody thing), i get a segfault.
This persists after dozens of reinstalls. I have tried both the SDK as well as the IDE and library seperately. The version of the library is irrelevant, i always get the seg fault and its only on my tower. My laptops work just fine.
Does anyone have any possible solutions? Any help will be appreciated.
I needed to run QtCreator in admin mode in order for GDB to function properly.
Without knowing more (please answer to cbamber85's comment), such issues are known to be caused by uberprotectious anti-virus solutions or other software that hooks into places where GDB would usually hook in (Vendor OS-'enhancement' tools are infamous for doing that). This is a known Problem with GDB.
You could try to disable your virus scanner or remove/unload/remove from autostart the vendor tools and try again.
If that doesn't work, the content of the debugger output log pane (Windows > Views > Debugger Log) would be interesting.

Symbolicate XCode4 crash reports

I'm trying to get XCode 4 to symbolicate a crash report. I've googled and followed this link (https://github.com/chrispix/symbolicatecrash-fix) but get stopped. The instructions say "To fix your iOS crash report symbolication, move /usr/local/bin/symbolicatecrash aside and copy in the version in this repo." Well, I cannot find "/usr/local/bin/" on my Mac. I'm new to the Mac world, so I'm sure there's something I'm not understanding. If "/usr/local/bin/" doesn't exist, then where is XCode 4 finding symbolicatecrash? Please point a newbie in the right direction as I have a lot of bugs to be fixing.
Thanks
Tom
that tool has been relocated to /Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash in newer version of the SDK
you would run it as:
./symbolicatecrash -A -v [crashlog-filename] MyApp.dSYM
keep in mind this is for iOS only, for OSX see http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html (for the app to contain the symbols "DWARF with dSYM" must be enabled in it's build settings)
you would run it as:
./symbolizecrashlog [application-name] [crashlog-filename] > symbolized.crash
I would like to add that all this usually is done automatically, these manual approaches are for cases when there are issues with the system symbols database as discussed in Xcode 4 failure to symbolicate Crash Log

Resources