Haskell Program Crashes with GUI but not CLI - haskell

I'm trying to build a Haskell program (Hets) with Fedora 18. The program compiles fine and it has two options at startup: with GUI or with CLI. If I start it with the CLI then it works fine. If I try to start it with the GUI, I get a white sqaure on screen and then it crashes with this error in the console:
hets: fd:10: hFlush: resource vanished (Broken pipe)
I've built and run the same program on Ubuntu 13.04 so I don't think it's the source code but possibly a library issue on Fedora 18.
Could someone suggest why this might happen?
TIA,
Keith
Update: I've copied the binary over from Ubuntu (where it works) to Fedora and I get the same error message.

Related

Solana Rust Build on WSL Ubuntu 20.04 Causes Blue Screen on Windows 10

I am trying to build this project using Rust on WSL. However, after running npm run build:program-rust my computer crashed and showed a BSD (I caused the crash twice to make sure this command was the actual cause).
What is the workaround for this issue?
Thanks to the discussion on this issue I realized I was on WSL 1 (you can check with wsl -l -v)
I tried migrating my Ubuntu 20.04 instance to WSL 2 by running wsl --set-version <my_distro_name> 2 and it appears to have resolved the Blue Screen issue.

Virtual machine "pc1" Netkit error?

Introduction
I've just installed a networking simulator Called Netkit. On Debian stretch stable. Using the official installation guide here.
Installation
After setting the correct paths and installing. I then run the check_configuration.sh script.
Everything is checked OK, and it has found the terminal emulator xterm which is needed for netkit. And recieve the complete message.
[ READY ] Congratulations! Your Netkit setup is now complete!
Enjoy Netkit!
The Problem
Running netkit using the command:
vstart pc1
The xterm netkit-kernel emulator starts running. However I'm getting an infinite loop of the same error message:
ubda: can't open "home/foo/netkit/pc1.disk" failed, errno= 13
So im guessing it's because the file is missing? if so how do i obtain it? and if not, what is causing this error. I've followed the install guide completely.
I'm assuming your system is not a 32bit system. Netkit is only supported on the 32-bit architecture(unless the compatibility libraries are installed). Hence I would suggest you download a 32-bit VM(instead of installing the libraries) and run Netkit on the same(worked fine for me).
Check position of your lab-folder..

OpenCV keeps "uninstalling" itself (Linux)

Really annoying issue here. On Linux Mint OS. Every so often, I'll get this error when running OpenCV code:
HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/ravi/Desktop/opencv/OpenCV-2.1.0/src/highgui/window.cpp, line 180
terminate called after throwing an instance of 'cv::Exception'
what(): /home/ravi/Desktop/opencv/OpenCV-2.1.0/src/highgui/window.cpp:180: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow
The way to fix this, I've found, it to do the following:
cd OpenCV/
cd build/
cmake ..
make
sudo make install
sudo ldconfig
<restart computer>
Then I'll come back, start running my OpenCV code again, and it'll be fine. But then a few hours later, or possibly between turning cpu on/off, I'll be back to the same stupid error!
Does anyone have any idea what's going on here and how I can prevent this? It's frustrating as hell.
It sounds like a general critical error in the program code. Is there a specific task that is done when the error occurs? You might want to use strace to get the output of the program as it runs or enable application memory dumps for the user you are running the process as. This would be passed to the developer for debugging and inspection.
I believe the problem was solved by paying attention to where my USB camera was actually located in /dev/. Giving a faulty path to the get video source functions causes this type of error; restarting my computer occasionally shifted which /dev/video# my device was attached to.
Please do ls /dev/vid* to find out if you're using the right video source!

Problems running MPI (OpenMPI) app on Linux on ARM

I am trying to follow this tutorial for building and running an MPI application on an ARM based Ubuntu 11.10 system.
When installing open-mpi environment on my PC machine, the sample program runs well. However, trying the same on the ARM machine, the terminal hangs up and I need to kill the MPI process from a second terminal in order to release it.
The MPI packages I installed using apt-get, on both machines, were mpi-default-dev and mpi-default-bin, so I assume that the packages are as updated as they can be.
The first sample program in the tutorial makes every process prints a "hello" message with some info. On the PC I get messages from all 8 processes (although running on a single core) and then the program ends. On the ARM, I get no output at all. The program is just stuck immediately after launch.
Any idea on what's wrong? I am not sure even where to start to debug this?
Update: I tried removing the OpenMPI package and install the alternative MPICH2 package - but the result is just the same.
Ubuntu 11.10 did not ship with a functional Open MPI implementation for ARM (although it may have shipped with a nonfunctional one). Ubuntu 12.04 did.
I would recommend building your own Open MPI from source - available at http://www.open-mpi.org/software/ompi/v1.6/, unless you can update to a more recent version of Ubuntu.
Alternatively, you could rebuild the 11.10 package using the fixes pointed out in https://bugs.launchpad.net/ubuntu/+source/openmpi/+bug/949044.

Is CUDA in installed correctly on my Ubuntu 10.04? Some samples don't run.

I am trying to install CUDA on a server running Ubuntu 10.04.
I followed the NVDIA instructions and installed the "CUDA toolkit for Ubuntu Linux 10.04", "GPU Conputing SDK code samples",and "Developer Drivers for Linux (260.19.26) (64 bit)", my system is 64 bit. This installation seems successful. everything downloaded from http://developer.nvidia.com/object/cuda_3_2_downloads.html#Linux
According to the messages of the installation packages, I added /usr/local/cuda/bin to PATH, /usr/local/cuda/lib64:/usr/local/cuda/lib to LD_LIBRARY_PATH
Then, I tried to run the sample programs. The strange things is, some of them can be run, and some of them don't even through they can be made with no problem.
For example,
- convolutionSeparable will just stop there without any message, I can kill it by ctrl + c.
matrixMul outputs a line
Device 0: "Quadro 5000" with Compute 2.0 capability
and stop there, again can be killed by Ctrl+C
clock works, outputs
PASSED
time = 12574
Press ENTER to exit...
simpleMultiCopy outputs PASSED
MonteCarlo outputs PASSED
simpleZeroCopy outputs PASSED
bandwidthTest stops there with blinking cursor for ever.
What is wrong with this?! How can I check if my CUDA installation is successful ? What is wrong with those programs don't run? They don't even have a error message.
I would start by upgrading the driver to 260.19.36, which can be found here. Then I would suggest running nvidia-smi -a to see if the driver is happy. Then I second the suggestion to run deviceQuery to see if the CUDA Toolkit 3.2 is working.
If deviceQuery output appears nominal, then I would start adding printf's to see where things go awry in matrixMul.
What does deviceQuery say? Also check the output of dmesg right after you run that program to see if you can figure out whats up.
Another tip, if you still are having issues, is try running:
strace ./deviceQuery 2> out.txt
Then check out.txt to see if you can find any clues why this error is occuring.
I have similar problem but solved by updating kernel and drivers.
install newer kernel on 10.04
linux-image-generic-pae-lts-backport-natty
linux-headers-generic-pae-lts-backport-natty
download the latest nvidia driver
from http://www.nvidia.com/Download/index.aspx?lang=en-us
install the latest CUDA (at moment 4.0) from
http://developer.nvidia.com/cuda-toolkit-40
CUDA Toolkit for Ubuntu Linux 10.10 32-bit
CUDA Tools SDK 32-bit
GPU Computing SDK code samples
then I passed all SDK example tests.
ThinkPad w520 Quadro 1000 on Ubuntu 10.04

Resources