knightly

Monthly Archives: November 2008

Subversion cross platform errors

Yesterday my colleague was complaining he couldn’t do a normal check out of one of the projects in Subversion. At first i thought it was just something wrong with his local settings. Because i could do the check out just fine. Today when i was thinking about this problem. I quickly realized we are on two different platforms. He works on Windows while I’m on Linux.

And since i had to do some Photoshop work today. I took the chance to install Subversion on my Windows partition. When i did a checkout of the failing project. I ran into the same problems as my colleague did before. Two different errors were preventing me from making a complete checkout. The first error:

svn: In directory ‘path/to/some/images’
svn: Can’t copy ‘path/to/some/images/image.JPG.svn-base’ to ‘path/to/some/image.JPG.tmp’: No such file or directory

Is caused by multiple files with the same name. At  least to windows it looks like this. Because image.jpg and image.JPG are two different files on Linux. On windows however these two files are one and the same. This causes Subversion to choke. After manually deleting all duplicates from the repositorie it self the problem dissapeared.

The second error was something like:

svn: Working copy ‘/some/path/\ ‘ is missing or not locked

This one was actually pretty obvious. A file name with an illigal character. I wonder how it got in the repository. The folder name causeing the problems was a folder called ‘\ ‘. Which was empty. After removing this. I could do a complete checkout again.

Making permanent changes to resolv.conf under Ubuntu.

At work we have a local dev box. This box is running Ubuntu 8.04 and some tools we need for developing. Nothing special. This box get’s it’s IP address from the DHCP server that runs on the router. And this caused some problems because we are running a local DNS server for the dev box. Mainly to use internal domains for testing.

To make this work we changed the resolv.conf to use the new local DNS server. This works fine wouldn’t it be for Ubuntu changing the file back to it’s original settings on every DHCP request. So every 900 sec the file gets overwritten. To solve this the first time i simply made the file read only. This however caused some problems with the DHCP client requesting an IP address over and over again. This caused the load on the dev box to rise….

Further inspection showed that it’s the dhclient-script the overwrites the resolv.conf file. I tried commenting out parts of the dhclient-script. But this just created more problems. So i did a search on the Ubuntu package list. And found a promising program called resolvconf. This program takes over from resolv.conf. And with this program installed it’s possible to make permanent changes without creating any problems.

After installing the package and doing a search for resolvconf. I found a directory in /etc which had a resolv.conf inside. This seemed to be the template used for overwriting the original resolv.conf. After changing this file all problems were resolved.

/etc/resolvconf/run/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND — YOUR CHANGES WILL BE OVERWRITTEN
search example.com
domain example.com
nameserver xxx.xxx.x.xx

*Update

After googling some more. I think i found a better way to solve this problem. And probably the only way to solve this. No need to install any extra software. Just edit the dhclient config file.

change the following lines in /etc/dhcp3/dhclient.conf

supersede domain-name “example.com”
prepend domain-name-server xxx.xxx.xxx.1, xxx.xxx.xxx.2

Programming Community Index for November 2008

Just for fun;

This morning i’ve received an message from the Delphi community to get the Delphi programming language at the top. To get a glance of the position of your preferred programming language please follow this link;

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

Last week i did some research about running threads from within delphi in a asynchronous way meaning a webservice call is made from the client, the webservice picks it up sending true or false back to the client indicating that the call has been made, processing the call and fires a OnDone event to the client containing the response.

Doing webservices this way allowes the client to continue working without waiting for the response. Within the .NET webservice techniques it is allready possible to execute webservices this way (SOAP version 1.2). The lastest delphi versions 2005+ allready support those features but Delphi 7 doesn’t.

I’m allready able to start a new trhead from within the call method and process a large amount of data using a cache system. The only bit i’m stuck with is to post back the OnDone event to the client.

Ubuntu 8.10 NVidia driver trickery

I was up early last Sunday. just couldn’t sleep anymore. So i decided to do a fresh OS install on my main workstation. One or two weeks ago i updated my Ubuntu 8.04 to the latest 8.10 Interpid. This went without real big problems. And the system was running stable. Besides at the office i did some clean installs of Ubuntu 8.10. And there were no real problems to name.

So i thought what the hell. Let’s do a clean install here at home also. I created a backup of my important files. and downloaded the new .iso image (couldn’t find the previous downloaded one). And started of the install. It was nice weather and i thought if i finish this fast. I can go and enjoy a nice Sunday.

The install went without problems. And after rebooting it booted up fine. First thing i did was run an update through synaptic. Installed the new kernel and a whole lot of other packages. Did a reboot. And everything was still fine and dandy. Now it was time to install the Nvidia driver. I used the Restricted Hardware manager in Ubuntu to select the NVidia 177 driver. Which did the job before the install. And rebooted the machine after the install was complete.

When it booted backup. I was surprised to see a tty screen. and not the GDM i expected :). The error message on the screen stated no screens found. So i logged in and checked the xorg.conf file. Which had a pretty default setup. So i thought running nvidia-xconfig would solve the problem. This generated the same xorg.conf. After rebooting a few times and trying to change the xorg.conf file. I was getting a bit frustrated.

In my hurry i by accident removed my backup partition. So i was getting more frustrated every minute. I do have to say i have a dual Head system. With two PCI-e video cards. And for some strange reason nvidia-xconfig didn’t find the correct hardware. And running nvidia-settings from command line is not possible. So i was stuck. Removing the nvidia-glx driver and the rest of the nvidia-177 files. Got me back in X. Running a very low resolution.

Googling revealed i was not the only one with this problem. But there were no real solutions. At least none that worked on my system. So i decided to reinstall Ubuntu 8.04. Updated the whole damn system. Installed the nvidia-glx-new driver. And got everything to work. After this i did a distupdate to 8.10. And everything kept working. This was weird. I was happy the system is up and running again. But i wasn’t satisfied.

I made a backup of my xorg.conf file. And again did a complete new install of Ubuntu 8.10. After the install i updated to the new kernel. And after a reboot installed the nvidia-177 driver. But this time before i rebooted i copied my old xorg.conf file over the one generated by nvidia-xconfig. Rebooted the machine. Everything worked.

Conclusion. nvidia-xconfig doesn’t create a correct xorg.conf file. I got two different errors from the nvidia driver at boot up. One saying “no screens found’ The other one saying “Device is not PCI” or something like that.

I’ll add my xorg.conf file here. Maybe it’s of any use

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@vernadsky) Thu Jun 5 09:26:53 UTC 2008

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type “man xorg.conf” at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section “ServerLayout”
Identifier “Default Layout”
Screen 0 “Screen0″ 0 0
EndSection

Section “Module”
Load “glx”
EndSection

Section “ServerFlags”
Option “Xinerama” “0″
EndSection

# commented out by update-manager, HAL is now used
#Section “InputDevice”
# Identifier “Generic Keyboard”
# Driver “kbd”
# Option “XkbRules” “xorg”
# Option “XkbModel” “pc105″
# Option “XkbLayout” “us”
#EndSection

# commented out by update-manager, HAL is now used
#Section “InputDevice”
# Identifier “Configured Mouse”
# Driver “mouse”
# Option “CorePointer”
#EndSection

Section “Monitor”
Identifier “Configured Monitor”
EndSection

Section “Monitor”
Identifier “Monitor0″
VendorName “Unknown”
ModelName “Iiyama PL2201W”
HorizSync 30.0 – 80.0
VertRefresh 55.0 – 75.0
EndSection

Section “Device”
Identifier “Configured Video Device”
Driver “nvidia”
Option “NoLogo” “True”
EndSection

Section “Device”
Identifier “Videocard0″
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “GeForce 8600 GT”
BusID “PCI:1:0:0″
EndSection

Section “Screen”
Identifier “Default Screen”
Device “Configured Video Device”
Monitor “Configured Monitor”
DefaultDepth 24
EndSection

Section “Screen”
Identifier “Screen0″
Device “Videocard0″
Monitor “Monitor0″
DefaultDepth 24
Option “TwinView” “1″
Option “TwinViewXineramaInfoOrder” “DFP-0″
Option “metamodes” “DFP-0: nvidia-auto-select +0+0, DFP-1: nvidia-auto-select +1680+0″
EndSection

Still here

It’s been a while since i blogged last time. But i’m still here. And still planning to continue this blog. I just need to make some time to write. And time is not something that comes cheap latley :)

Some months ago i move to my new appartment. But i’m still working on it. It probably would have been better if i completed it completly befor emoving there. But it has to be done. So it takes up a lot of my time.

And besides that two weeks ago i started my new job here in Amsterdam. And this takes up the rest of my time. Trying to read into a new code base. And trying to understand everything that goes on around the office. It’s a hectic place. But it feels great so far.