It has been a frustrating week for me in some regards. It all started with the news of Microsoft acquiring Nokia. At first I paid it no real attention. I have never had a Windows Phone and my few experiences of Windows on any sort of mobile or handheld device had not left me particularly interested. But for some reason after a day or two I found myself thinking I should take a look at Windows Phone (and Windows 8, for that matter).
Don’t ask me why. I can’t even really explain it myself. Just for some reason Windows Phone became more interesting to me once the OS and the hardware came together rather than being at somewhat awkward arms length from each other. Whatever the reason, there it is.
Even so, as (relatively) cheap as they seem to be compared to the, uh, comparable Android and iOS devices, I didn’t want to go out and buy an actual Windows Phone just yet. The first step as I saw it would be to get setup with Windows 8 – properly, not using the Preview release. With that done I could then get a Windows Phone development environment up and running and at least fiddle with the Windows Phone emulator as part of the SDK.
So it was that I bought myself Windows 8 Pro and sat down on Saturday to set everything up.
Installing Windows 8 itself went very smoothly. Parallels 9 has specific support for installing the operating system. The only interaction I had with the process was entering my product key into the Parallels wizard for creating a new VM, prior to installation which then runs the whole install process in unattended mode.
While that was going on I was busy downloading the Windows 8 and WinPhone 8 SDK’s together with Visual Studio Express editions for Desktop and Phone. I needed the SDK’s obviously. Visual Studio Express… I wasn’t so sure (I can use Oxygene after all) but VS is free – as in beer – so why wouldn’t I ?
Fairly quickly I had everything I wanted all set-up.
I had in mind that I might use Windows 8 as my Visual Studio environment whilst keeping Delphi in the existing Windows 7 environment I had been using for a while. So I then made sure I had everything I needed for Android and iOS development installed in the new Windows 8 VM. Actually, for iOS development you don’t need anything else apart from what is installed with Oxygene, but for Android there is the Java SE Runtime and SDK and the Android SDK etc along with the USB drivers for the two Android devices I own (ASUS TF101 and a Samsung Galaxy SII) etc etc.
So far so good.
But this is where I made my first mistake. I don’t know why – I am normally quite cautious about such things. perhaps I was fooled by how smoothly everything had gone so far. In any event, I decided I no longer needed the VM in which I had installed Oxygene. That VM was itself a clone of my Delphi VM, when I had thought to have a comprehensive development VM with all my tools in it.
If I was going to keep Delphi for pre-Windows 8 work and Oxygene and VS/C# etc for everything else I didn’t need two Delphi VM’s. So I deleted the Windows 7 VM with my working Oxygene environment.
Little did I know the trouble this was going to cause.
Having reclaimed a healthy chunk of my HDD, I then settled down to pick-up where I had left off with a simple Android project I had started. The first indication I had that anything was wrong was when I went to do an initial build and run of the project.
With Oxygene there is a component called Crossbox which installs as both a plug-in/extension the Visual Studio UI, and on the host Mac. For Android projects, the Visual Studio Crossbox plug-in provides the bridge to the Android SDK involved when deploying and debugging to Android devices (or the emulator etc). For iOS / OS X projects it communicates with the Crossbox server on the host Mac to invoke and co-ordinate with Xcode etc to achieve the same thing.
Think of it as the Oxygene equivalent of PA Server.
When I first setup Oxygene, everything had just worked and I had had no indication during the installation of my new environment that anything would be amiss this time around. But it was.
When I went to select my attached ASUS TF101 tablet on which to deploy my little application, I found it wasn’t there. The only options Crossbox was making available to be were the shortcuts to launch the Android SDK or Virtual Device Managers.
I had a hazy memory from the days when I first had a play with the Android SDK and Eclipse, that physical devices might not appear unless at least one virtual device was defined. So no problem, I just need to set one of those up.
It didn’t help.
I double, triple and quadruple checked that I had device drivers installed and working and that the device was being attached directly to the USB bus of the VM and not passing through the host bus. Everything was as it should be. But no dice.
After a while (you must appreciate, this all took a lot longer than it is taking to write – or read – this) I decided to try an iOS project instead. So I closed my Android solution and opened up one of my sample iOS apps I had been playing with.
And Visual Studio died. It just up and crashed without so much as a “By Your Leave”. And it kept dying. Every time communications were initiated with the Crossbox server on the host Mac. Something I deduced by terminating the Crossbox server, at which point I was able to open my iOS solution. Then as soon as I re-started the Crossbox server on the host, Visual Studio crashed as soon as it became aware of the re-started server (it uses Bonjour to automate this service discovery aspect).
After a fruitless day trying everything I could think of, I had to give up. It wasn’t working. Time to skip forward….
One Step Forward, Two Steps Back
At this point I thought that Windows 8 was the significant difference. So, never mind – I thought – I’ll go back to Windows 7 for Oxygene development, for now at least.
But you will remember that bit where I deleted my functioning Oxygene-in-Windows-7 VM. Oops.
Hey-ho, just create another one. I still wanted to keep my Delphi and Oxygene environments separate and I have a template for a “clean” Windows 7 machine, so I’ll start with that.
Android SDK, Java SDK .. yada yada yada and so on and so forth. All regularly interrupted of course by the plethora of Windows Updates that my aged Windows 7 VM template needed to catch up on.
Not to mention that creating templates, and creating VM’s from templates, all take significant time (each machine/template image is over 60 GB) and I lost track of how many times I did this during these processes. But by Monday evening I was back in a position to pick up my Oxygene work (and with a nice set of VM’s and templates to boot).
Except that I wasn’t.
In my fresh, shiny Windows 7 VM Oxygene was now misbehaving IN EXACTLY THE SAME WAY AS IN MY WINDOWS 8 VM !!
What the hell was going on ?
This time I was sure I must have missed something in the installation. After all, it was working fine on Windows 7 before. But after making sure, as far as I could, that I had covered everything, I admitted defeat and posted my experiences so far, together with the Visual Studio crash report, in the RemObjects support forum.
Some helpful suggestions were forthcoming to aid in diagnosis and at first I thought the problem was simply that a further Windows update had been waiting because at one point in proceedings I was informed that I had to shutdown and restart to install an update, and upon restarting things seemed to be OK!
This was first thing the following morning, and I posted the good news to the support forum and headed out the door to work, looking forward to coming home to a working Oxygene VM. No such luck. Whatever Pixie Magic had been at work that morning had worn off by the time I had resumed the VM from it’s suspended state.
Helpful advice and suggestions still came forth from the support forum, but no actual solution.
The next day (yesterday) I noticed something else that was odd.
I had installed Oxygene in my Windows VM at work (where I also use a Mac even though we are currently still a strictly Windows only product). I fired up Oxygene there just to compare settings, and I noticed that the initial state of the Crossbox icon was different than in my VM’s at home.
Since visual states must be reached by some sequence of code, so different states would indicate a different path though the code and so might help identify any problem. So I posted captures of the two different states to the forum.
The response from RemObjects (Marc Hoffman no less) and one of the developers (“brianl”) suggested that this last clue had indeed been helpful. And sure enough I woke this morning to an email informing me that not only had a candidate fix been identified but that a new build would be available in my Personal Downloads area as soon as it was ready.
Not more than a few minutes later there was indeed a new build waiting for me to download.
AND IT WORKED !
This is the point where the Shaggy Dog (story) takes a huge gulp of fresh air.
I should stress that by some strange, unlucky coincidence I appear to be the only person to have been afflicted by this problem. Whatever the problem was appears to have been an extreme edge case and was just the unlucky S.O.B that happened to run into it (did I hear someone muttering at the back ? Did I hear “karma” ? :))
Never-the-less, my problem was taken seriously (all too often it is easy to dismiss unique experiences as “environmental” – i.e. ‘not our problem. Must be something on your end. Good luck with that.‘).
Not only was it taken seriously, but a solution was expedited!
I didn’t have to wait for the next “official” beta, let alone the next release. The fact that it took as long as it did *3 days from start to happy finish) would almost certainly have been even less had I been able to justify pursuing the matter during my work day (I couldn’t) and had it not been for the awkward time-zone difference resulting from my being in NZ.
Now, from comments made by others there have been occasions when bugs have been regressed in builds of Oxygene. I appreciate I have had only limited experience so far but this has yet to happen to me. Which is not to deny that it can and does happen, only that it hasn’t caused me any problems as yet (and hopefully never will).
But this is not the first time that I have had personal assistance from Marc Hoffman in the forums resulting in a solution in the form of an expedited fix delivered to me in the Personal Downloads area of the RemObjects Customer Portal.
The previous occasion was when the beta I was using for some exploratory work with the Sugar cross-platform RTL project had troubles building the iOS target of that library (Sugar is still very much a work in progress that pushes the limits of the Oxygene language, so this was somewhat to be expected). But again, within 2 days a new build was available.
I mentioned to Marc that I wanted to mention these experiences in my blog and if he would mind. Being a smart cookie I think he picked up on the fact that I didn’t want to misrepresent things and he was quick to dispel any notion I might be entertaining that I was receiving special treatment.
At the risk of making you feel less special ;), we do strive to give the same level of service you see to everybody, so feel free to talk about that, as well!
Just another day at the office for Marc and RemObjects it would seem. Long may it continue. š
Back to the Beginning
I though it would be fun to take a quick stroll down memory lane and revisit each Windows mobile device I have ever used (at least the noteworthy ones):
Not really a mobile device as such, but this was the first portable computer I ever had access to. McDonnell Douglas had quite a few of these knocking about and they were a darn sight more reliable than the Compaq portables that came later. This was the days when even these “portable” computers could accomodate full length expansion cards (necessary if you wanted to drive an external VGA display iirc).
An early “tablet” (before the term “tablet” had been coined) running Windows for Pen (i.e. stylus), with a ‘massive’ 20MB flash memory “hard drive” (PCMCIA card) and in the days when the first thing you did after installing Windows was setup a RAMDISK and make sure that AUTOEXEC.BAT copied C:\WIN to it before running Windows. Ahh, the good old days. š
Jumping ahead a fair few years, my first handheld “Windows” device. I even bought the NavMan GPS jacket for mine, complete with monstrous GPS antenna. Little did I know that 5 years later I would be emigrating to the country where NavMan were based. Nor was I aware at that time that they were big Delphi users. But not any more. It has to be said that whilst I bought my iPaq for R&D, I bought a Palm IIIc to actually use.
Having said that, I still have the iPaq. But not the Palm IIIc.
And last but perhaps not yet finally…
An Acer ‘tablet’ laptop. Essentially just a Windows laptop with a trick screen, the stylus-based touch interface on this was actually quite enjoyable to work with, though only for mucking about in MS Paint. It has to be said that this laptop still works today although the battery long since packed in so has to be used on mains power which is a bit of a pain given that the power jack has become very fragile with a tendency to break contact if a slight breeze should disturb the cable.
What’s next ? One of these perhaps …
Or one of these …
Either way, things have certainly come a long way in 20 years !
Don’t tell me you don’t have backups of your virtual machines. If you don’t have them, then you deserve what you got yourself into. You should know better. I make weekly automated backups of my WMVare images and keep the last 4, so I have about a month of back-time.
LOL – OMG this is hilarious. Yes, my VM’s are backed up. Parallels has TimeMachine integration, but you know what ? It never even occurred to me !!! 100% face-palm moment. š
Ironically it was only 2 weeks ago that I was waxing lyrical about the virtues of TimeMachine to a colleague … how it was so effortless you didn’t have to think about backups. The problem with not having to think about something is that it often means you don’t think of it. š
But… in a desperate attempt to salvage some semblance of self-respect (dignity is beyond reach I fear), from this omnishambles…
Had I simply reverted to a backup of my VM I would have been left convinced that the problem was Windows 8 and – being happy with my lot – quite possibly not even bothered mentioning it to RemObjects, certainly not straight away and not with any sense of urgency. If nobody else ran into the issue in the meantime it would have gone unreported and unresolved. Or at least, not until perhaps much later.
So there’s at least a sliver of a silver lining. š
I agree it is good that you actually found and had the problem fixed. I just stressed the importance of backups, but that is probably obvious to most developers. I do not know Parralels or other Apple products that well, that is why I asked š I mostly use Windows and Linux. Well I use Windows and love Linux š
As for VM development. I absolutely adore it. Snapshoot capability and automatic simplified backups of whole machines is just a given for me these days. The fact that I can take the VM with me if I go somewhere is another +.
I have a HP server and ESXI on that. Basically all my computers are there in VM format. My main machine is just a console for RDP and for gaming.
All data is on NAS.
That has been a very special issue. Not that kind of everyone runs into.
Right, but if they aren’t aware of it then they run the risk of running into it when it’s too late. And it is only one example that demonstrates the limitations of the FireMonkey implementation on Android. Any aspect of Android development which involved sub-classing an Android framework class is beyond the reach of FireMonkey.
This is only one example. Admittedly I am not aware of any others as yet but then I am only just starting to learn Android myself – something that a FireMonkey developer cannot ever say, at least not with a straight face. š
Indeed. Even if I don’t develop anymore at the scale Please forget about the Firemonkey at least for the moment. Delphi will be a consistent solution that will make sense one day. There will be many more solutions that make a lot less sense in comparison to Delphi.
It’s not possible still to bring the ultimate flexibility that came with Delphi two decades ago to the mobile devices. The Delphi approach is a different one today. The mobile device is not this flexible as Windows. The IT world is no longer this flexible. The flexibility did come from systems openness, which is no longer the case. Building bridges is a tough issue but once finished they last long.
Unless you get the engineering design of the bridge wrong and end up with something entirely unsuitable for it’s environment, in which case a bit of strong wind can be enough to demolish it far more quickly than it was built. š
A month? I have backups going back years. Drive space is cheap cheap cheap.
3 days for a bug is impressive. You don’t want to know the sorts of bugs that I KNOW XE5 shipped with.
Remobjects support has always been responsive. Agreed. Oxygene supports a wide variety of plat-forms.