Loud ramblings of a Software Artisan

Friday 30 September 2005

Replies from the software vendor

A follow up on that potential GPL Infringment. Someone commented with the reply made by the vendor. The interesting thing is that neither Dom nor I have had any direct reply from them; they just e-mailed people that did e-mail them.

But here come the arguments:

"We do have test functions that use Cocoa, wvWare, MacLinkPlus and several others _to compare_ our output to theirs for quality control. Mariner Write will have paths to these source files in our project but the dead code stripper should remove all trace of code in our shipping version (if not, there would be hundreds of references to wvWare)."

Given that the disassembly I got was from the result of a gdb breakpoint, I would hardly call that dead code. The code was being run when I disassembled it. It is there and really there.

"With Tiger (OS 10.4) deprecating most legacy code we have started using cocoa."

The current version I have in hand, that is available from their website does not link against Cocoa. Here the output of otools -L which equivalent to ldd on Linux:

$ otool -L Mariner\ Write
Mariner Write:
       /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 128.0.0)
       /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime (compatibility version 1.0.0, current version 47.0.0)
       /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.3.0)
       /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
       /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 92.0.0)
       /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.0.0)

That's it. I did analyze published versions, because that is what matters. And it was done of MacOS X 10.3, because that is a version that the program run on.

Note that everything is just evidence I found, and the actually side by side code comparison of the assembly is for me sufficient. The "path" found was just a clue to start digging a bit, and probably the fatal clue.

Tuesday 27 September 2005

History of a GPL violation

Once upon a time, in the Free Software Galaxy there was AbiWord. AbiWord was the first Open Source word processor to have a decent MS-Word import filter, thanks to wv, the GPL licensed library from wvWare.

On some planet, there was a "sailor" who had a proprietary word processor for a proprietary operating system that didn't have the main marketshare, cruising through out the galaxy. That word processor was in need of a real word import filter. Circa 2002 the "sailor" released a version of his new ship, in beta, with a dynamic library wv. Immediately he was notified that using wv this way was a violation of wv copyright because wv is licensed under the GPL and not the LGPL, thus linking against it is considered as a derived work, and should comply with GPL.

The final version of his application got shipped with a separate application whose use was to convert MS-Word documents to RTF (note, it does not convert to their native file format). The source code of the application was released, but not the library source code, which had been modified. The following entry point from wv were renamed:

  1. wvInitParser
  2. wvText
  3. wvOLEFree

I won't take any risk and provide you with the renamed name, but be aware that they are stored.

It was in July 2002, and at that present moment the GPL is somewhat no longer violated. It must be noted that at this stage, Dom, who own the copyright of the code, offered the software vendor to purchase a license of the library with a licensing that was compatible. That offer got rejected.

In Frebruary 2003, a new beta version of the product is release. It now features a MS-Word import feature. So curious that I am, I start cheking, and a strings (1) on the binary reveal this string: wv-0.7.1/oledecod/oledecode.c which is obviously a path name to a source file of wv. That started looking suspicious. So I went further and deeper. It appears that the functions named above are still there, with the renamed name, and disassembling the initialization function of the parser really show the exact same logic as wv. I compared a few more and still the same clues. The assembly is not exactly the same probably because they use CodeWarrior as as compiler but later versions come closer as at one point they switched over to gcc, that I also use for AbiWord. Side by side comparisons show that code, but AbiWord has a few error message dumps in the middle. Last clue: some known buggy documents exhibit the same behaviour in both case (Actually wv has been fixed since).

So far, as of today, September 2005, the latest version of that application still apparently use this camouflaged wv version, and so far they never dared to reply to Dom's cease and desist letters. Far from accusing, evidence show a blatent GPL license violation, and in that case, their ignorance cannot be used as an excuse, They prefer to ignore rather than risking to be found guilty. I'm not giving their name because I don't want to advertise them.

I didn't talk about that publicly but Dom's statement made me do otherwise. Now that he disclose publicly I'm doing it too.

Thursday 22 September 2005


Some moron decided to post a virus for Windows in AbiWord's bugzilla. Since we can't delete attachment in bugzilla (with good reason), I went to set the attachment blob to null using the following magic in MySQL:

mysql> uses bugs;
mysql> update attachments set thedata="" where attach_id=1234;

Replace 1234 by the real attachment id as shown in the web interface. I didn't delete the actual row because I didn't want to risk the database to be inconsistent. I also disable the guilty account. Lately we have had two person posting "test" bugs...

And to paraphrase Nat, this person gets my middle finger of the week.

Monday 19 September 2005

Various news bits

A few interesting bits of news I have found:

  • Kingsoft is "attacking" Microsoft by offering a low-cost-cheap office software for both Linux and Windows in Chinese. Its target is to compete with the "pirated" versions of Microsoft Office that you find in China for $2... And who said illegally copied software were harming companies like Microsoft?
  • Mark R Hinkle likes AbiWord. Mark R Hinkle is vice-president and CIO of Win4Lin and LinuxWorld Magazine Editor in Chief.
  • Dave Coursey give his strongly biased opinion about the commonwealth of Massachussets going with OpenDocument. I'm far from agreeing with all the content of this article. For him it is people who should adapt to Microsoft goodwill (remember they were the one that pulled the documentation off the web because people where using it to compete) and the the other way. For me the decision is a good thing.

Wednesday 14 September 2005

Hidden API for MacOS X

As I mentionned before, Apple released WebKit as an open source project. WebKit is much more than WebCore, as it also contains all the MacOS X specific rendering code for the HTML engine that is KHTML. I was enjoying to have a look at the code as it would should me how to achieve a fast text renderer on MacOS X like I need for AbiWord (currently, AbiWord text renderer is really buggy on MacOS X).

So I took a deep breath and dug into the code. I'm getting depressed.

First it looks like there is not one true way to render text as they have 2 methods to draw text with 2 different cases that they determine with shouldUseATSU() based on the content of the text run. From what I can say (comments are really sparse), it depends of the Unicode chars to be rendered. But they have a switch back when alwaysUseATSU is set to YES that makes ATSU being used all the time. I wonder if Safari doesn't set it all the time using the "private API". But why? Is using CoreGraphics directly way faster but much more limited? That what I'll try to figure out.

At one point I thought about using CoreGraphics, but in 10.2, the API do not allow to draw non ASCII char, or you have to get CGGlyph, which seems to be uneasy, and the font selection does not seems to be doable from a Cocoa NSFont as there is not method to get a CGFontRef from a NSFont. All the searches on google point to an undocumented method from NSFont, but as always, avoid that is it might break in future releases.

So I had a look at WebKit, and they use WKGetCGFontFromNSFont. Perfect. I look closely and realise that this function is in a damn libWebKitSystemInterface.a binary ! Yes. No API for a much needed feature, and when Apple's open source code actually need it, it is in a damn closed binary library...

Now getting the metrics fast. Same thing. Private function in the binary library.

Why can't Apple release this APIs ? Question about how to do that has been asked for years on various mailing list with Apple engineer always responding the same B.S.. With this they demonstrate that these APIs are usefull, so why do they have to be kept secret? I can't use a binary library like that for AbiWord.

I filed bug 4257530 for that, without any hope.

And years ago, there was an attempt of a lawsuit to Microsoft for the use of unpublished Windows APIs to stiffle the one bit of competition they can't stand for...

Wednesday 7 September 2005

The AbiWord font bug

I have been working on bug 6616 today, bug that involve a problem with font metrics. Here is the visual problem:

You see that Times is drawn under the font baseline, on the descent line. I have checked the code, and the metrics returned, everything seems to be normal, as prove the line that are drawn. Weird.

Positive side #1: I found a huge bug that does not seems to have had a huge consequence: AbiWord graphics code draw strings with the Y origin on top of the bounding box, while Cocoa does it on the baseline. Update Sept 12th, 2005: No, this bug above is not a bug. I just misread the documentation

Positive side #2: I started to look at WebKit source code. Exactly what I wanted, I should have looked at it sooner: they have a complete text rendered, and since it is fast, it is worth looking at. But looking at hit gives me some head aches. Wow it is really damn complicated (the code is nice and readable however). Something that upset me is the hack involving "Times" and "Times New Roman" fonts with this comment (WebTextRenderer.m):

// Special case hack to use "Times New Roman" in place of "Times".  "Times RO" is a common font
// whose family name is "Times".  It overrides the normal "Times" family font.  It also
// appears to have a corrupt regular variant.

Does that mean that Times is corrupted?

Thursday 1 September 2005

Grammar checker in non-English

One of the new features of the upcoming AbiWord 2.4 is the English grammar checker based on Link Grammar a free software syntax analyzer for English. But here comes the question:

Does anyone know a grammar checker for other languages, like German, Spanish, French, etc. that would be available under a Free (free software) license?

There used to be a proprietary French grammar checker named Correcteur 101, but since 2003 it is no longer developed on Linux for Intel (I think they also had a PPC version).