Categories
Bug

Minor problems stacking up

It seems to happen too often to me. I’m ending up with many different small, minor problems, sometimes not big deals taken alone. But when they sum up, this becomes unbearable, resulting into a bad and exhausting day. Sometimes, the solutions are simple, sometimes not. Here is the most recent stack of such issues.

Spending my time importing modules in Python

For the moment, the only way I have to edit my Python code running on a remote virtual machine is to use Emacs running from that machine. I’m investigating local solutions, but this is just a non-sense chain of complications or requires software free for commercial use that I cannot adopt at work.

One operation that ends up to be frequent is to import a module. You are writing a piece of code and then need to call into a function defined in another module or in the standard Python library.  When this happens, I need to add an instruction to import the module if it is not yet from my current module. Import constructions can appear anywhere in the code, but convention puts the instructions at the beginning of the files. This seems better for code organization and ensures that all imports happen at start of the program rather than at any time during the execution. If a module imported at top of the file is missing, the code will fail fast, as opposed to fail only when a function importing a module is called.

As a result, I am sometimes editing code and need to step at start of file to add an import, then find back where I am and continue. This small interruption in task flow is not a big deal in itself but it becomes more and more painful when it repeats itself tens of times a day, sometimes at each and every successive line of code!

Maybe I went too granular and split my code in too many modules. Am I in a situation where it would be better to have one single huge file with a lot of stuff, rather than splitting my code in multiple files? Well, last Monday, I was at the point of wondering that.

How did I work this out before? When I was programming in Java, I was using Eclipse as my IDE. This program is able to guess the import statements from referred class names and automatically add them at the beginning of the files, without having me go there, loose my position and come back. Probably a Python IDE such as PyDev or PyCharms would do it, but I cannot use them for the moment.

Fortunately, I came up with a very simple trick. In GNU Emacs, you can split the window in two parts by using C-x 2. Both windows first point at the same part of the current buffer, but it is perfectly possible to move the cursor up. This changes the position of the current window, while leaving the cursor unchanged in the second window. I can then add my import statements, switch to the window with original cursor using C-x o, then make it the only window with C-x 1. Something similar can be done using bookmarks, but this requires other keyboard shortcuts harder to remember and each bookmark needs to be named while sometimes they are one-off save/restore scenarios.

Keyboard shortcut confusion

Since I gave up on Virtuawin because its behavior was too inconsistent on Windows 8, I ended up using Desktops from SysInternals which uses different keyboard shortcut than Ubuntu for switching desktops. I thought CTRL-ALT-F1 to F4 would be nice keys, but this ends up being a nightmare. As soon as I came back to Ubuntu after one week working with Desktops, I was screwed up, always making the same mistake of pressing CTRL-ALT-F1, which switched to the console. I then had to press CTRL-ALT-F7 to go back to X. This also happens in VirtualBox virtual machines.

There is no perfect solution for this. My current workaround is to use CTRL-F1 through F4 instead. At least, if I press that in Ubuntu, nothing happens, as opposed to wiping my screen away and forcing me to press CTRL-ALT-F7.

Windows 8 becoming increasingly disturbing

Even Desktops starts to be a nuisance because of Windows 8. As soon as I am on desktops 2, 3 or 4, I need to be careful not to press on the Windows key. If I do it, which I am used to, this switches to Metro which of course replaces my screen with the home screen. Then I am back to desktop 1. Metro is my most common way of starting applications on Windows 8: press Windows key, type a name, press enter. This also works great on Windows 7 and Ubuntu’s Unity.  But this fails with Desktops on Windows 8. There is no way out, other than putting EVERY application on the desktop and spending more than 30 seconds each time I want to start something! I just cannot do that, this is too inefficient, especially knowing that it will take half the time to find out the icons for a sighted person than for me with a visual impairment. I could work around by grouping the icons in some clever way, creating folders, but this remains clunky.

Windows 8 is also causing issues with Lync, the instant messaging software my company is using. Lync works correctly in text mode, but it intermittently fails for voice chat and screen sharing. When this happens, it consistently displays a network error, no matter how hard we try to establish the communication. We have to fall back on alternative ways, like traditional phone. The only solution has been to reinstall Lync.

IT people at my company were of no help. They would have liked me to try out Lync on Windows 8 in the office rather than finding what is going on. However,the Windows 8 ultrabook my company lent me is almost unusable for me unless I hook it to an external monitor and mouse. At the office, I don’t have an HDMI input I could use to plug my mini DisplayPort to HDMI adapter I use at home, and the mini DisplayPort to VGA adapter that could have worked went away a couple of months ago. Somebody borrowed it and never brought it back. Even if I had the adapter, performing this test would be tedious. I would have to wait for a voice chat and when it happens, quickly switch from my regular laptop to the ultrabook and try. This is just non sense stress that may just give no result: it will probably work correctly, showing that the problem comes from VPN, my router, etc.

There is no way out, other than running away from Windows 8. I thus stopped using the ultrabook, at least for the moment, and used the official laptop instead. That machines runs the good old Windows 7 OS. If Lync starts failing with that as well, then I will have to switch routers, try on somebody else’s Internet connection, etc.

SSH connection timing out for no reason

We recently switched from outdated Cisco’s IPSec VPN client to newer SSL-based AnyConnect. This seemed to go smooth, after I uninstalled and reinstalled VirtualBox (seems VirtualBox is interfering with Cisco’s VPN). However, I noticed that SSH started to time out at me when I wasn’t interacting with the shell for a moment. This was forcing me to reconnect, restart what I was working on, sometimes switching to a directory with a long path, sometimes Bash history was working, sometimes not.

My first attempt at working around unreliable connections was to make use of EmacsClient. For this, I started Emacs with the -daemon option, then used emacsclient instead of emacs. That works surprisingly well. With that, Emacs keeps running on the server and doesn’t loose track of unsaved files if connection drops. Of course, I keep the good habit of saving often, which is an additional elementary safety against unreliable connections.

Yesterday, I may have found out a way to get rid of these timeouts. My current hypothesis is that the new VPN client monitors the TCP connections going through the tunnel it establishes and shuts them off if they are inactive. Fortunately, SSH provides a way to keep connections alive: the ServerAliveInterval configuration option. By putting ServerAliveInterval 60 in my .ssh/config for my virtual machine, I am forcing SSH to send a TCP packet every 60 seconds so nor SSH server, nor VPN client, have a reason to kill the connection. This seems to help, but this is not fully tested yet.

The mouse making me mad!

Why does my Razor mouse was so jumpy? I feel I have less problem at the office than at home with the mouse? Will I really need to get myself a Dell mouse like the one I have at the office?  Is it because I am running crazy? Maybe not! I found out this week that my mouse pad is pretty suspect: it has multiple scratches on it that can well screw up the optical-based mouse tracking, and the surface has some patterns. I remember when I worked at my parents’ home having hard time with the mouse. That ended up to be because of the desk! Putting the mouse on top of a piece of white paper, yes, just a plain old piece of paper, nothing more sophisticated, cleared the issue! So I removed that mouse pad and that seemed to help! It is unbelievable how sometimes, simple solutions, almost non-sense stupid ones, can lead us far!

Categories
Bug

Networking issues on an ultrabook

Since a few weeks, I was experiencing sluggish performance while connecting to some SSH servers. The problem happened when using SSH through the VPN of the company I am working for. This resulted in lags when typing commands on the SSH terminal, which was more and more problematic because of more and more command-line arguments I had to pass and longer and longer file paths.

Too many layers = too many problems

My current working setup is far from simple, because I need to work on a remote virtual machine to have access to some data and run some processing on it. The official connection method using NX doesn’t work well for me, because NX suffers from intermittent keyboard issues, e.g., right alt stopping to work, server acting as if Shift was pressed while it is not, etc. This works correctly for somebody using the mouse rather than the keyboard or able, without significant loss of efficiency, to check every typed character for an eventual error. This is not my case.

I ended up building myself a multi-layer setup as follows:

  1. I am not hooked directly to the cable modem from Videotron. I am rather using a Linksys WRT310N router, and to make things more interesting, I am running DD-WRT, not the official router’s firmware. This rarely caused any issue, though.
  2. Windows running on a computer provided by the company. I am currently working from home using an ultrabook they provided me, with Windows 8.1 on it.
  3. The ultrabook having no Ethernet connectivity, I was using a USB to 100Mbps Ethernet adapter to get a faster and more stable connection than wi-fi.
  4. A Cisco VPN client is needed to access internal resources  of the company.
  5. The machine runs Ubuntu 14.10 in a virtual machine hosted by VirtualBox.
  6. Inside the guest Ubuntu, SSHFS is configured to access my workspace on the virtual machine, so I can use local editors like Emacs.
  7. Inside the guest Ubuntu, I open a terminal and SSH to the virtual machine to run commands there.

Phew! What a list of layers!

Different networking methods

VirtualBox offers several ways to manage networking. I am currently using the first of the three I know about. Here they are.

  1. Bridged. VirtualBox uses a trick I don’t know too much about to clone the host’s network interface and act as if there was a second interface. The guest OS receives its own IP address from my router and thus acts pretty much like an independent machine on the network. This implies that Ubuntu has to establish the VPN connection, but fortunately, there is a Cisco client available. However, when using that method, the Windows host doesn’t have access to internal resources, unless I establish a second VPN connection, on the host side. I am something tempted by the idea of having the router establish the VPN connection. This might be possible with DD-WRT, but this will introduce a security risk: what if I leave the VPN open after my working day or somebody hacks my network?
  2. NAT. VirtualBox acts a bit like an internal router, allocating a private IP to the guest. Requests are translated by VirtualBox to look like if they came from the host. This works correctly and allows the VPN connection to be established by Windows-based official Cisco client, but on the other hand, this introduces a level of indirection: the NAT applied by VirtualBox. Any indirection is subject to hinder performance.
  3. USB. VirtualBox has support for exposing USB devices to guests, so I could, at least in theory, expose my USB to Ethernet interface to Ubuntu. However, without Oracle closed-sourced extensions, I would get only USB1.1 support, which would result in slow or non-functional networking. The extensions are available only for personal or evaluation use, so I cannot use this at work. Even if I solve the licensing issue and get the extensions, with the USB solution, the Windows side would be unable to access networking, so I would loose access to Lync and Outlook. I could work around by turning wi-fi back on, but that starts to be clunky. If I have to go this way, I would be better off using my personal Ubuntu PC rather than a virtual machine.

It seems that 1 is a bit faster than 2, but I am not totally sure, no way to measure scientifically. Even with 1, I was still experiencing sluggish SSH. After switching from 2 to 1, this seemed a bit better, but performance degraded after a few minutes.

Could a better network interface help?

This morning, I tried with a TruLink USB to Gigabit Ethernet interface rather than the 100Mbps one. However, this didn’t go well at all. I got the following issues, all after the other.

  1. VirtualBox partially blocking network. At first, everything seemed to work well. I was able to browse the web and Outlook was working fine. But I soon discovered that Lync wasn’t connecting at all and although Cisco VPN was starting (from Windows, no virtual machine yet), it couldn’t access any internal resource. Trying Windows network diagnostic reported a potential driver issue. I tried to install the driver I found for this adapter, but it just failed; Windows already had the most recent driver built in or installed by IT. I then found out that Windows was connecting to an unknown network using the VirtualBox host-only adapter. So VirtualBox was in the way, partially blocking networking. I had to remove VirtualBox and reinstall it to fix this.
  2. Cisco VPN not working. After reinstalling VirtualBox, I was able to connect to Lync, but VPN was still non-working. It was connecting without issues, but it would allow access to absolutely no local resource. I tried to remove VirtualBox once again, to no avail. I had to remove Cisco VPN client, reboot to be sure everything was clean, reinstall client, test to see if things were back to normal (they were!), reboot once more to be sure, reinstall VirtualBox and test again! Why reboot? Well, if VirtualBox is installed while Cisco VPN is running, network connectivity stops working completely until VirtualBox is removed.
  3. Distracting side issues. During this frustrating troubleshooting, I got several other issues. Firefox took several seconds to start, once again, because I would ideally have to switch to Chrome, transfer my bookmarks from Firefox to Chrome once again, and live with a browser having very weak support for touch screen, at least at the time I am writing. Emacs, which I tried to open and use as a buffer because I wanted to try Ping commands and was always making typos, took at least one minute to launch, and started multiple instances when it finally unstuck. Then the main window of the Cisco VPN client remained open after connection and couldn’t be closed by the X button, Alt-F4 or any other normal way; I would have to live with it on an unused Virtuawin desktop or restart the client. I ended up shutting everything down and rebooting once again.

At least, after all these efforts, I got functional networking and experienced a lot less lags than during the last 2-3 weeks while working from home!

If problems come back, I will probably give up on using this ultrabook and revert to the official laptop provided by the company. The machine is heavier, doesn’t have any reasonable way to output to digital displays (I would either need to purchase a docking station specific to that machine, or try my luck with the mini HDMI port which sometimes works, sometimes not), but it has VGA output, it has Gigabit Ethernet and runs the good old Windows 7 which definitely seems to play nicer with the software tools of my company.

Categories
Bug

Groovy and Eclipse incompatible in practice

This week, I tried to get my Groovy+Eclipse setup back and running, because I needed to debug a complex script that was outputting 15-20 line stack traces with a lot of useless information about Groovy internals. Finding the exact error message was taking me several seconds and no matter how hard I was trying to fix things, I was getting other and other errors. A step by step debugger was more than welcome.

I looked once more at Groovy web site for the presence of the plugin for Eclipse 4.4. Up to last Monday, release was supposedly imminent. Searching on Google was giving information that the special STS bundle of Eclipse 4.4 was providing Groovy integration. Wow, will I really have to install a special version of Eclipse to get Groovy now? I didn’t want to get STS which will give me Grails, Spring, etc, which I don’t need.

But last Monday, release was there. I tried to install it, but I found out it couldn’t install because of a compatibility problem with some of the features I had in my environment. It is possible that the plugin works only with the original version of 4.4, not the SR1. I tried a couple of times without success, then fell back on the development build. This one installed. I’m not sure it will be stable, but it was better than nothing. However, the same way as in August 2014, I was consistently getting the following error message:

Conflicting module versions. Module [groovy-all is loaded in version 2.2.1 and you are trying to load version 2.3.6

No matter how hard I searched for a solution, there was NO result. I opened my Maven POM file in Eclipse, pulled the dependency hierarchy, searched for Groovy, and found only one Groovy-All dependency. Nothing other than Groovy 2.3.6 was pulled by transitivity from other dependencies. Any search on Google was yielding results about Grails. Some people fixed the issue by removing the GROOVY_SUPPORT container from the build path: well, no GROOVY_SUPPORT in my build path.

I then thought about running a simple Java program in the same project as my Groovy script and output the class-path from the System.getProperties() object. Looking at the JARs in the class-path, I found no Groovy dependency. From my dummy program, I then tried to call my Groovy script. The script is compiled just as a regular class with a main method that I called… with success!

I then found out that you can execute a Groovy script as a regular Java Application in Eclipse: no need to run as a Groovy script. The script runner most likely involves a wrapper with a Groovy 2.2.1 dependency. This wrapper is built into Eclipse’s Groovy plugin. Running directly as a Groovy class avoided the introduction of the Groovy 2.2.1 dependency in the class-path alongside Groovy 2.3.7 so I got passed the hurdle and was able to more easily debug my code! During the process, I updated to Groovy 2.3.7 to match what was used by Groovy Eclipse.

The newest version of the Groovy plugin behaved a bit better, allowing me to use conditional breakpoints a couple of times, as opposed to the last version for which that was consistently failing with compilation errors.

For the complex stack traces, there is a simple solution: the StackTraceUtils class has methods to sanitize stack traces, removing frames related to Groovy internals. I just wrote a small uncaught exception handler and registered that as the default handler, and tada, more compact exception traces! Of course, I have to do it for each of my scripts, but that’s just a one-liner since I put the code registering the default handler in a utility method.

Categories
Bug

Audio driver conflict causing slow startup

Since at least two months, Windows 8.1 startup is awfully slow. From UEFI boot to login screen, it takes a few seconds, which is perfectly reasonable and what I expect from a Core i7 computer equipped with a SSD. However, after I was typing my password to login, it was taking between 30 to 45 seconds before I could reach the desktop! This was almost wiping out the benefit of the SSD, making the total boot time as long as if I had a regular hard drive with an older CPU.

I was getting annoyed on every startup, but at least, the machine was correctly responding afterwards. But yesterday, that combined with another issue: each and every Metro application is now closing instantly and NOTHING suggested on forum posts can fix the issue; the only solution seems to completely reset my user account.

I thought the slow login time was also linked to my user account and was starting to feel ready for creating myself a clean account and starting from there. Most applications should survive this process, only some settings will be lost. My documents live on a second hard drive which wouldn’t be affected. However, I found out that the slow startup was also experienced for a new user account! This was thus a system issue, probably yet another program that installed malware without me noticing it.

Searching on forums, it seems I would now have to hunt for and install many different anti-virus and anti-spyware programs and regularly create hard drive images. I didn’t have to run into this trouble while I was using Windows 7? What changed in Windows 8.1? Is the system now so unstable that I would need to regularly restore from an hard disk image? This is a real non-sense!

Deeper analysis of the slow startup seemed to link this to CPU! There was little hard disk activity during the long login time and CPU fan seemed to increase speed. I was quite shocked at this. I have a Core i7 CPU that works very well for Ubuntu. Why would Windows 8.1, suddenly, require something more? It was working six months ago, starting quickly. My Nuance ultrabook, which also has a Core i7, starts at normal speed. My personal ultrabook, equipped with a Core i5, starts in a reasonable time as well. Both machines are equipped with Windows 8.1 and newer than this 2012 Core i7, but they are NOT significantly more powerful! Do I really have to face the fact there is a time bomb in Windows, that will trigger after some time and start marking some CPU/motherboard combinations as arbitrarily obsolete? This makes little sense, but I was slowly but surely drifting to that conclusion. I was awfully disappointing because it takes me weeks to shop for new computer parts, check for compatibility with Linux, make sure I won’t get into a dead end with the motherboard, assemble the thing, test, solve issues, etc. I didn’t want to reenter into this just because Microsoft decided I would have to do so!

I didn’t want to perform a clean install, because it is taking too much time. It would break my GRUB configuration while Ubuntu provides no simple way to restore it (each time I need to search more than fifteen minutes, and apply a manual procedure), would require installing multiple drivers each rebooting the machine, and I wasn’t sure Ableton Live would correctly reauthorize. But I was starting to feel ready to try this reformat during the Christmas holidays, because this was becoming too annoying.

I thought about purchasing another system and moving the Windows 8.1 part of my current configuration on it, leaving only Ubuntu on the original machine. That would remove the issue with Windows breaking the GRUB setup at the cost of more money and space.

I also got issue with my audio system. Yesterday, I started Ableton Live and opened up a Live set I got from my friend. I got an error message, because my Ultranova synthesizer was set as the ASIO audio interface but it wasn’t powered up. Instead of turning it on, I switched to the M-Audio ASIO driver, so sound played through my main Fast Track Pro interface.

Things went well… until I closed Live. After that, for the third time, sound stopped working. The M-Audio driver is getting corrupted and stops working. Restarting the machine does nothing; I really had to reinstall the driver.

But after I removed this damned M-Audio driver and restarted the computer, I found out the startup speed was restored to normal! I reinstalled my M-Audio driver, because I need it for ASIO integration, and startup speed remained normal!

I thought about finding an audio interface more suitable for Windows 8, but I found out it makes no sense to replace a working product just because Windows misbehaves with it while it USED to work! I thought about downgrading to Windows 7, but I HATE its low contrast between selected and unselected items and lack of any solution to fix this without disabling Aero. I considered the possibility of installing Live on a dedicated Windows 7 laptop (tired of assembling computers and when purchasing preassembled PCs, you usually get to choice between cheap desktops, reasonable laptops or high-end desktops with too stylish gamer-centric cases). But the new machine would have low storage so I would need some kind of NAS for my systems to access a common storage. That was starting to be endless stacks of problems! I thought about using my Ultranova as sound card for Windows and M-Audio on Linux (because the Focusrite-based audio chip in the Ultranova does not work under Ubuntu) but that was resulting in need for endless reconfiguration (when switching between the two OS).

But today, things are still working. It seems I just must not use the Ultranova ASIO integration in Live and things will continue working. As a workaround for this uncommon issue, I connected the S/PDIF output of my synth to the S/PDIF input of my audio interface using a plain basic RCA cable (nothing fancy), turned on S/PDIF output on my Ultranova and was able to get the digital audio from the S/PDIF input of my audio interface. This has the added benefit of allowing Live to record BOTH from S/PDIF and the main input jacks of the audio interface. Using this new configuration, I was able to record four tracks at a time: the two one from my synth through S/PDIF, and the two outputs of my Korg’s EMX. S/PDIF input has low volume for I don’t know why, but at least this can be worked around in Live.

I hoped that would solve my Metro issue but no, the problem persists. I tried a lot of stuff to solve this without success. I will thus need to reset my user account if I really need these kind of useless Metro apps. At least startup is now normal so I won’t have to format to get this fixed!

Categories
Bug

Contorted CD ripping

On December 24th, I got the Namasté CD from Steve Trottier. I was in Chambly, away from my main computer, so unable to easily rip the disk and I wanted to listen to it on my way to Mauricie or back to Montreal. My parents were not interested in listening to it so I could not just insert it in their car’s CD player. Having little to do yesterday morning, still at my grandmother’s house, I wanted to try something out to rip the disk with the means I had there.

First, I brought with me that old MacBook Pro my brother’s girlfriend gave me a month ago. This machine has a CD/DVD drive so it could, in theory, extract audio from the disk. In theory… My best hope to get this job done was iTunes. As a first step, I inserted the disk in the drive, which went well. The disk got detected and a CD icon appeared on the desktop. Then I started iTunes: NO EFFECT. I clicked again on the icon in the Dock: the icon bounced and nothing more.

Ok, iTunes has gone south or it NEEDS an Internet connection to start, quite bad design, probably yet another stupid error from Apple that has been fixed in Mac OS X 10.8, 10.9 or 10.10, any version I cannot install on this old MacBook Pro OF COURSE! Having little if not no hope to address that without an Internet connection, I tried to Control-click on the CD icon to get a contextual menu.  The menu was offering NO ripping option, just basic read and open commands.

Why not listen to the disk using the MacBook Pro? Well, the machine has no battery at all (the battery exploded a while ago).

I tried the Open command and got a Finder window with one icon per track. Ok, if things work intuitively, let’s try just to copy the tracks to a directory. I opened a new Finder window, created a directory, went back in my open CD, pressed Command-A to select everything, Command-C to copy, went back to the created directory and pressed Command-V to paste. Cool, it worked!

I tried to open one of the files in iTunes: iTunes didn’t start. Double-clicking on any track did nothing. Ok, let’s copy that to my Windows 8 ultrabook; that will be where the files would be useful.

I tried a network-based copy, but anything I could think of failed. I didn’t have a cross-over Ethernet cable so I tried with wi-fi. I used my Mac to create a wi-fi network, but my Windows ultrabook couldn’t see the network. I tried to turn my Android phone into a wi-fi hotspot, the same way I can share an Internet connection except there was no connection to share. Both my ultrabook and my Mac joined the hotspot, but they couldn’t see each other. I don’t know exactly why and had no resource to find it there, in Mauricie, without an Internet connection. I tried to create a wi-fi access point from Windows, but there is no option to do so, maybe that requires yet another software tool.

I thus fell back to the USB key. That worked, but when I tried to double-click on one of the ripped tracks, I got an error message: Windows media player couldn’t read the AIFF files. I tried with QuickTime: no success. I tried with iTunes: it wouldn’t start playing the track automatically, just display tons of useless information. AIMP3 just couldn’t play the tracks as well.

I finally got it played with iTunes, on my Windows ultrabook of course; my Mac’s iTunes was still dead. I had to import the tracks in the library, then they were available in the list of songs. However, I did my test from my USB key. After I copied the tracks to my ultrabook’s SSD and imported again, they didn’t show up in iTunes, no matter how hard I tried to find them.

I then started my Ubuntu virtual machine, powered by VirtualBox. From there, I used the FLAC command-line tool. It was able to read the AIFF files and re-encodes them into FLAC. The FLAC files played fine with AIMP3! Phew!

Any attempt to repair iTunes failed. After many many failed attempts, I was able to hook up to my aunt’s wi-fi which was nearby and do a Google search. All of the clues I got from that failed. Running from a different user account didn’t help. Trying to reset the permissions just took an awful amount of time without results. Trying to remove iTunes library and preferences had no effect. Looking at system logs didn’t give me any clue: the iTunes process was starting, then exiting with code 1 without any other useful log.

On the way back home, I was able to listen to the result of my rip using my ultrabook and earphones. The sound was correct despites all the treatments. I listened to this while reading using the machine, in tablet mode. At least all this had some use!

Back at home yesterday evening, I did additional research and finally had to reinstall iTunes.  Having Internet connection wasn’t enough to get it back to life. Probably iTunes died when I mistakenly reinstalled the 10.6.8 update, thinking I was installing LibreOffice’s French language pack. The Apple’s web site only gives iTunes 12, which AGAIN requires a more recent Mac OS X version than the one installed on my damned MacBook Pro, but I managed to get iTunes 11 from somewhere else. I had to revert to 11.3, which forced me to uninstall iTunes, but after reinstallation, Apple’s software updates allowed me to get 11.4 back.

Ripping the disk with CDEX took less than five minutes and gave me FLAC files directly. The files were named against the tracks of the disk rather than the generic names I got yesterday morning in Mauricie.

Categories
Bug

Firefox and Chrome mixing up

Yesterday, when I started Firefox, I noticed that the Chrome’s interface shown up instead. I thought I picked the wrong icon, closed the window and tried to start Firefox again: no more Firefox icon in the start menu. I pressed the Windows key, typed Firefox, picked the Mozilla Firefox result and pressed Enter. I got Chrome again. Tired of stupid bugs making absolutely no sense, I closed the window and removed Chrome from my computer. I tried to start Firefox again: Chrome started once more. So even the removal failed. I searched for unwanted installed programs, found Speed Browser and removed it as well. After that, Firefox started normally.

I don’t know exactly if the problem came from Google Chrome or Windows 8. I suspect Windows 8 as Chrome is installed on other machines without issues and I got several other issues with Windows 8 and 8.1.

Categories
Bug

Problematic network file transfer

Yesterday, I wanted to transfer a VirtualBox VM from my main computer to my ultrabook, in order to have a basic Ubuntu VM on my secondary machine. That operation happened to be harder than expected. First, I booted my two computers. My main machine is hooked up permanently to my router, but my ultrabook usually plugs using wi-fi. I plugged a USB to Ethernet adapter for faster network transfer.

From my ultrabook, I then pressed the Windows key to go into Metro and typed \\drake. This worked, showing me the Users and Data shares. I went into Users, then Eric, then found out there was only AppData as a subdirectory, no VirtualBox VMs. I didn’t want to copy VirtualBox VMs elsewhere, because I knew it would take five minutes just for this, but maybe I should have done that, after all.

Instead, I tried to share VirtualBox VMs separately: no success. The folder appeared on my ultrabook, but I was getting errors about insufficient permissions when I tried to browse it.

I searched for a solution, found articles about how to setup file sharing in Windows 7 without homegroups. Ah, maybe my ultrabook and my main computers are not in the same homegroups? I checked, they were in the same.

Some people are having incredible difficulties with file sharing since Windows 7, and some tried during hours and hours without success to solve the issues. They end up giving up on networking, use Ubuntu instead (but no Ubuntu on my ultrabook) or explore third party alternatives, like Cisco Network Magic (actually only available from third-party web sites not Cisco, which is very bad), Dropbox (limit on file sizes), etc.

I remembered I tried disconnecting my main PC’s Windows 8 from my Microsoft account to check if that was the factor causing slow login times. It wasn’t, and my ultrabook was still hooked up to my Microsoft account. I reconnected my main PC as this gives access to Windows store; who knows, I may have to get something from there. The different user accounts may have caused the connection issue. Nada, no difference.

I tried the other way round: connecting to my ultrabook from my main computer. No luck, the main computer could even not see the ultrabook. It really seemed that the two machines were running slightly different versions of Windows 8, not even compatible to the SMB level. SMB is the protocol used for file and printer sharing in Windows. It seemed I would have to format the ultrabook and install a genuine, non-Lenovo, Windows 8, or Windows 7. That annoyed me pretty well.

I got fed up and searched for a third party transfer tool. I though about Simple Socket File Transfer, but I didn’t remember the exact name and I knew it would force me to install this on both machines and figure out IP addresses. Then I found Filedrop, a small utility allowing to share files between two computers with less difficulty. The tool installed without problems, on both machines, and the two computers saw each other. However, it didn’t provide any option to add files; I had to drag and drop from an Explorer window. But my Explorer windows take the full screen so any attempt to drag and drop is an hassle consisting of moving/resizing windows around. But I guessed I had no choice and did it.

The transfer didn’t start. Well, I had to accept the file on the other end. I did it, that started to transfer… very slowly. After more than half an hour, only 25% of the data was transferred. Why is it so long??? I tried a SSH-based transfer between my Windows box and my Ubuntu-based HTPC and that would take 3 minutes.

Very tired of having difficulties transferring files between computers and having regularly to fall back to USB keys or external hard drives, I got pissed off, tired of having to try the USB plug in one direction, then the other, then again the other, until I get lucky and it worked. I heard about a variant of USB3 with two-sided connection. I was so exhausted of having computer issues of all kinds every weekend that I was ready to make almost anything necessary to get this two-sided plug. I hoped I would get it using adapters, but maybe I would have to install a PCI Express card in my main computer and some USB dongle on my ultrabook, or maybe switch board and machine. But it was even worse than this: I will have to wait indefinitely for USB 3.1 motherboards to come onto market.

Filedrop ended up aborting the transfer. Some other issues forced me to restart the computer or log out and log back in, I don’t remember exactly. But after that, I retested Windows file sharing and that worked. I retried the transfer. But that was slow again. I then found out that although there was a USB-based Ethernet adapter, Windows 8.1 was stupidly using wi-fi to transfer data!!! I disabled wi-fi and got a reasonable transfer speed. It took maybe 10 minutes transferring the VirtualBox VM. Note that the USB to Ethernet adapter was just 100 Mbps, not a Gigabit one.

So to recap, I got issues with mismatching user account type in Windows 8.1 and networking problem because my ultrabook chose wrongly to use wi-fi instead of Ethernet.

Categories
Bug

Another upgrade that breaks things down

When I tried to write a WordPress post today, I found out that I couldn’t enter anything in the main text edit area. I tried several times, saved the draft without any success and then found out I would be blocked, unless I AGAIN try with a different browser. I just cannot continue like this if now I have to leave several browsers open and switch from one to the other. This just breaks all possibilities of efficiently switching between windows. I would end up with different similar-looking windows, with no way to quickly distinguish them, as opposed to one browser window with tabs.

A Google search about this lead me to a forum post. Some people were experiencing similar issues, again after a WordPress upgrade! Some people manually reinstalled an old version without success, but god, I cannot manually install things on my dumb HostPapa account, because I have NO SSH access! I am just exhausted of facing the same problems I cannot resolve unless I completely switch gears, reformat, start over, etc.

A forum post suggested to disable all extensions, clear the browser cache and switch to the default theme. I tried the cache: no success. I never changed the theme, so I am probably using the default. I then had to disable extensions. The culprit was TablePress.

But the fundamental question is: what’s the point of having any extension if they constantly need to be turned off for one reason or another?

I’m now stuck with an unstable content management system whose extensions are broken and there is no way to improve over this without manually moving everything to something else.

Categories
Bug Configuration

Cannot transfer files anymore from my Galaxy Nexus through USB

Last friday, I tried to hook up my Galaxy Nexus phone through USB to transfer some files to my computer. After a few seconds, a completely empty Nautilus window appeared. Once again, Ubuntu was incapable of detecting my device. This happened a few versions ago and I had to use obscure and impossible to remember MTP commands to perform transfers. I didn’t want to search for these commands again, tired of loosing more and more time with artificial problems. If Ubuntu degrades at this point from one version to the other, I will be better off switching to Windows and install Linux only in virtual machines. This is not the only issue I got and most bugs (mouse pointer, Emacs, M-Audio sound stability) persist with version upgrades. Canonical now seems to focus on Mir and newer Unity versions, which I really dislike because Mir will break everything down for five or six versions. Either this, or Canonical will cut corner on keyboard accessibility, resulting in a UI that will be almost unusable for me. I exptect this will  be my hardest Linux time ever when that beast comes out, until it stabilizes.

However, my actual bug was worse than this: the phone didn’t connect through Windows as well! When I plugged in my phone on a Windows machine, an empty Explorer window similar to below comes up and nothing else. Does that mean my phone is dying, progressively loosing functionalities? Probably.

Capture d'écran 2014-11-30 09.04.15

I didn’t atempt any Google search about this. It is worthless. I will find forum posts about people replacing the cable, doing factory resets, sending their phone for repair or replacement, etc. The phone hooks up, something is detected by the computer, so why a new USB cable would help? Yes, I can do factory resets after factory resets, that will probably fix it, but what’s the point of doing this if I know I will have to redo it a few months later, for no reason, unless I install NOTHING on the phone? And how I am getting through technical support are no-go solutions or offers for a new phone that will force me to switch to a more expensive plan with my provider or buy something from nowhere with an old version of Android.

Before accepting this conclusion and starting to look if I could get a Google Nexus phone from Google rather than going through Fido and affecting my phone/data plan or get something somewhat correct from DX.com, I tried with a different cable: same effect. Then I saw the home screen on the device and remembered I set up a PIN recently to protect my Google account for any tampering by somebody who may get back my phone if I loose it, or steal it from me.

Screenshot_2014-11-30-09-03-22

I entered my PIN and saw with surprise and relief the following window on my computer:

Capture d'écran 2014-11-30 09.05.34

Tada! This time, the solution was simple! This was just a normal data protection! So my USB connection is still working!

Note that locking the phone doesn’t shut off the USB access, until the cable is disconnected. The PIN also doesn’t prevent me from answering a call, so this is not as problematic as I feared it would be.

Categories
Bug

Firefox Sync duplicating bookmarks

A few months ago, there was an update to Firefox Sync. The system was completely changed, requiring the creation of a new account and the reupload of all bookmarks, history information, etc. The old system was still functional, but it wasn’t possible anymore to add devices.

Despite my frustration (yet another account to create), I registered with the new system and started removing my other instances of Firefox from the old system, to attach them to the new. I have a couple of such instances: one on the Windows side of my personal computer, one on its Ubuntu side, one on my personal ultrabook, one on my HTPC, another one on my company’s laptop, another instance on my company’s ultrabook, and three on different virtual machines! That seemed to go pretty well, just uselessly time consuming.

However, a few days later, I noticed it became almost impossible to find something in my bookmarks. Some bookmarks disappeared, but looking a bit deeper, I found multiple copies of bookmarks as well as folders of bookmarks. This was a total mess. It would have taken me hours and hours to clean this up. I though about exporting the mess to JSON and writing myself a script to clean it up and restore with the processed copy, but I wasn’t feeling at working on this during my spare time. I thus left this alone and almost stopped using bookmarks. Sometimes, typing text in the URL finds stuff on Google, in bookmarks or in history. Sometimes, I was getting the link from within an email. Other times, I had to open up the bookmark manager and search endlessly.

Last week, I decide to try something about this: simply restore a backup copy of my bookmarks. I thought about an old copy I had done in January after a clean up of the bookmarks, then I found that Firefox was proposing me options to restore bookmarks saved periodically. I took the latest day with 400k of bookmarks vs 700k, and that did the trick!

Unfortunately, a week later (yesterday in fact), I found out that duplication started again! So it seems that Firefox Sync now simply makes one copy of the bookmarks per instance of Firefox it syncs with! Why not, in this case, offer these copies in separate folders, so at least one would know what to expect?

I searched for a long time to find a better way to manage my bookmarks, and everyone is adopting its own inconvenient or outdated solution. Some are using iCloud with Safari to sync bookmarks and manually transferring to Firefox, others are proposing Xmarks which was discontinued years ago while its web page still offers the tool (last time I tried it, it couldn’t sync, just sit there and try to connect to a server), others are adopting EverSync, others swear that Delicious is the best, etc. It seems I would have to choose one of these and be prepared to start over research a few months later and find the one that would replace my choice which would go down again.

I tried to restore backup once more. Maybe there is a problem with my SQLite Firefox DB on Windows 8.1; this Windows 8 box is more and more flooded with crap and would require a reformat/downgrade to Windows 7, which I just don’t want to do. Maybe, I thought, if I restore the backup on the Windows 8 box, the DB will be clean, and that would sync up with the rest. I tried, then went on my HTPC to see if things would fix. No result. I found out that my HTPC Firefox was still using the old sync, so I updated it.

Then duplicate bookmarks came back again! I got fed up and removed all my bookmarks. There is no point in having bookmarks if Firefox Sync copies it once per machine it connects to, and I just cannot get rid of all my computers except one, otherwise that will have to be my company’s laptop and that will end any possibility of playing Minecraft, attempting to compose music with Ableton Live, and I don’t feel comfortable leaving a copy of my personal data, including my diary, on my company’s laptop! And I would have to do this just because of Firefox? No!!!

I was about to switch to another strategy consisting of using Evernote to store links. There is a capture tool, the Clipper, that allows to make a copy of a web page, with its original link, so that can act as a kind of bookmarking system. This is at least better than the poor man’s system I was considering more and more, consisting of writing a plain old HTML page with links, uploading it to my HostPapa account and updating it from time to time.

But today, I found out that multiple Firefox instances got the same name. My Windows and Ubuntu installation share the same host name since they don’t run simultaneously, and I am using the same login name, so Firefox gave the same default name to the computers. This may explain why it got mixed up with bookmarks! Moreover, update from old to new system may result in additional bookmark duplication.

With this hypothesis in mind, I started all my Firefox instances, one by one, and verified that they all have different names, and that the removal of bookmarks correctly spread. At this point, all my Firefox instances got their bookmarks removed, but I need to be extra sure there is no left over instance I forgot that could restart the duplication like a virus. While doing that, I felt a bit like Jean-Luc Picard going from one version of the Enterprise to the other, in different time periods, to repair a temporal anomaly. Of course, my bookmark problem is far less dangerous than this!

I don’t know yet if that will allow me to put back my bookmarks in one instance of Firefox and see them reappear elsewhere, without duplication.