Memcheck my Qt5 app: Killed - qt

I'm trying to memcheck my Qt5 app with valgrind's memcheck.
The app has a QWebView and when it starts after some seconds it gets Killed by the OS (the terminal just says "Killed").
If run without valgrind, it works okay...
What happens?
Thanks.

Related

PyWinAuto in exe (PyInstaller) on Citrix can't find window, from python itself works like a charm

I have a pywinauto application that triggers a search in Notepad (for testing purposes).
This works excellent in a regular Windows enviroment. (both running directly from running the python script stand-alone, as from the pywinauto-packed exe).
When I run this in an Citrix environment, pywinauto seems unable to find the windows when running from the pyinstaller-exe. When running directly from python, it does work correctly.
I couldn't find limitation in the pyinstaller documentation, as that states that it works with pywinauto.
(This is using Python 3.10)
This is the error from the .exe:
Update
Building like this (with splash screen)
pyinstaller.exe --noconfirm --noconsole --paths ./venv/Lib/site packages/ --splash splashscreen.png ./main.py -n notepadopener
Seems to make it fail.
Building without splash-screen works fine:
pyinstaller.exe --noconfirm --noconsole --paths ./venv/Lib/site packages/ ./main.py -n notepadopener
Update 2
It seems this piece of code in the main.py, which should hide the splashscreen, causes it to fail.
# Hide the splash screen after one second
if '_PYIBoot_SPLASH' in os.environ and importlib.util.find_spec("pyi_splash"):
import pyi_splash
sleep(1)
pyi_splash.close()
Update 3
It seems adding a sleep after the .close() also solves the issues..
# Hide the splash screen after one second
if '_PYIBoot_SPLASH' in os.environ and importlib.util.find_spec("pyi_splash"):
import pyi_splash
sleep(1)
pyi_splash.close()
sleep(0.5)

Application crashes in GDB but not when running normally, crash occurs in libcrypto

I have Qt application that is displaying a WebView (webkit based). I am attempting to debug it using gdb. When I run the application through gdb it crashes almost immediately. The application runs without issues when executed outside of gdb.
The reason for the crash is:
Thread 1 "myapp" received signal SIGILL, Illegal instruction.
0x4a4d9a88 in ?? () from /usr/lib/libcrypto.so.1.0.2
Since the error is SIGILL is it possible that gdb is loading the lib from the wrong path?
The application is really simple, just displays a WebView at specific URL:
ui->webView->page()->mainFrame()->setUrl(QUrl(urlString));
The application crashes in gdb after the line above is executed.
The environment is an embedded system running linux on an arm architecture:
Linux hh4 3.1.10-2.8.5+g841700f8a2ea #1 SMP PREEMPT Fri May 3 18:48:07 UTC 2019 armv7l GNU/Linux
Any help in understanding why the app is crashing in gdb is appreciated.
GDB loading the wrong library is a possibility.
An easy way to find out is to set a breakpoint on main() - by which point you'd expect the library to memory-mapped into the process.
You can probably use GDB to check, alternatively, get a shell on the target system and run
losf -p <process_id>
This will list all open file-handles owned by the process - including all shared libraries that are memory mapped.
If you are somehow using the development host's libraries this would definitely explain it.

Julia Jupyter Notebook persists despite logout from browser

Running Julia in a terminal (macOS) and then launching a Jupyter notebook
julia> using IJulia
julia> notebook(detached=true)
This works fine. However when I log out of the notebook and closing the browser, there is still a jupyter-notebook running and I have to kill -2 pid to make it go away.
Is this expected behaviour? Is there a parameter I need to set somewhere?
Yes, this is the expected behaviour for the way you've called notebook. The server doesn't stop when your browser page is closed (you might open another, for example!). Using the detached keyword argument means the server process is started in the background, so doesn't block the Julia session you started it from, so you'd have to do extra work if you wanted to stop it from there. From the IJulia readme:
You can use notebook(detached=true) to launch a notebook server in the background that will persist even when you quit Julia

Codelite terminal and debugger quit unexpectedly

I'm taking a CSCI class and it was recommended to use Codelite for Mac. I tested out the "Hello World" program and when I debug it i get "Codelite Could not launch terminal for debugger" and when I try to run it i get "Codelite-terminal quit unexpectedly."
This should be fixed with the latest weekly build:
http://downloads.codelite.org/ (8.2.2)
Also, I answered this on this post: cannot launch debugger on macos using codelite

QT gui application not starting automatically on startup in ubuntu 14.04

I have two Qt applications, one is non gui called "App1" and another one is gui called "App2". As per my need I need to start "App1" on startup of Ubuntu 14.04 machine.
This "App1" runs a sh file called "myshfile.sh" and I am starting "App2" into this shell script file by /opt/myprojectname/App2 &
So to do the same I make .sh file called "myupstart.sh" and write into /opt/myprojectname/App1 & it and copy the file at path /etc/init.d/ and gave it +x permission to start "App1" on startup.
When I restart my machine then it runs "App1" (which is qt non-gui app) automatically on startup and runs "myshfile.sh" as expected. Till now all are working fine but the problem occurs from here as per below.
As I have mentioned above that "App1" runs a sh file called "myshfile.sh" and I am starting "App2" into the shell script file by /opt/myprojectname/App2 & but "App2" is not staring ( which is qt gui app).
When I do the same by simply running command into termianl /opt/myprojectname/App1 then all works fine and it calls the "myshfile.sh" file and "myshfile.sh" file also starts "App2".
So what I found that when I do the same by manually into termianl then all works fine and by script etc/init.d/myupstart.sh, it starts only Qt non-gui application and not starting Qt gui application on startup.
Kindly suggest me where I am wrong.
Thanks.

Resources