ReactOS Newsletter - Newsletter 52 (#52)

Author: Z98. Link to original: http://www.reactos.org/en/newsletter_52.html (English).
Tags: alternative, binary, compatible, FOSS, Newsletter, OS, ReactOS, windows Submitted by LRN 02.02.2009. Public material.

Translations of this material:

into Russian: Выпуск новостей ReactOS #52. Translated in draft, editing and proof-reading required.
Submitted for translation by LRN 02.02.2009

Text

More Win32 Work

Timo Kreuzer continues his efforts to make the Win32 subsystem more correct, recently working on the functions SetWindowExtEx and SetViewpointExtEx. The first step was moving it out of win32k, where the operations were originally being carried out, and into gdi32, where they should be carried out. Jim Tabor had code in place which implemented them, but they needed some fixing. While not yet complete, Timo has corrected some of the errors. The two functions are for setting the dimensions of the device context for the window and viewport respectively. The window is the set of logical coordinates that one tells GDI to draw to, whereas the viewport is the set of device coordinates that the logical coordinates get translated into when an image is actually displayed on the screen. There are various ways the logical coordinates can be mapped to the device coordinates, depending on which mode you are using. Timo fixed some of the modes, but currently isotropic mode is broken. Isotropic requires the vertical and horizontal dimensions to be equal. The application that exposes the issue is actually the resource editor for Visual Basic 6.

Jim Tabor has also been busy, trying to fix the ThreadInfo structure, which would in turn fix timers, which would then fix menus and other drawing issues, and ultimately fix the issue of needing to move the mouse to download pages in Firefox. This is an excellent example of how problems in one component can have a cascading effect and result in long standing bugs, as the Firefox issue has been present for at least a year. Another result of this bug is the menus in GIMP being drawn wrong as well as GIMP crashing under certain conditions. The problem itself involves the fact that the timers are being saved in a message queue when they are supposed to be saved on a fixed list. The address of the queue is currently in the ClientThreadInfo, but the address where the timers are supposed to be is also stored in a different location. This second location actually has the correct address, but since the address in ClientThreadInfo is wrong, a mismatch occurs which causes a fault in user mode and terminates the application.

Debug Support

It has been nearly two years since support for WinDBG was first mentioned and developers are still working on it. A series of issues prevents WinDBG from functioning properly on ReactOS and Stefan Ginsberg and Timo Kreuzer have been independently working on the components in question. Stefan ran across a bug in the HAL and KDCOM involving KdComPortInUse. This is defined in HAL but for compiler reasons it was defined incorrectly. Its usage was then hacked in KDCOM, but a configuration option in RBuild removes the hack. Stefan enabled this option and predictably things broke. Unfortunately, even with the definition fixed, the rest of KDCOM still isn't complete enough for WinDBG to function. Instead, one would need to copy in the KDCOM from Windows Server 2003. This leads to what Timo has been working on.

Currently ROS uses something called kdbg, which simply forwards debug text to any terminal connected to the first serial port. Windows on the other hand uses KDCOM for debug I/O and has a much more sophisticated debugging protocol. KDCOM itself is the library used for outputting debugging information through the serial port from the kernel to WinDBG. As part of the x64 port, Timo has been rewriting KDCOM. The original version in trunk was heavily antiquated and in order to connect to WinDBG, ROS needed one that was at least 2003 compatible. There are actually a few KDCOM implementations floating about, but Timo is fairly sure they were all developed from direct reverse engineering. As such, he wrote his mostly from scratch using text notes online as well as some black boxing of data that went in and came out. So far the KDCOM Timo wrote allows WinDBG to connect, disassemble, read memory, and the various other things the debugger is supposed to do. This however is all on the x64 branch and Timo has not yet tried to port it back to trunk.

FOSDEM

The ReactOS project will be attending FOSDEM as usual, with several developers manning the booth. Since so many developers live in Europe, it makes it much easier for them to gather at this conference than others. The developers that plan to attend are Andrew Greenwood, Aleksey Bragin, Stefan Ginsberg, KJK::Hyperion, Colin Finck, and Pierre Schweitzer. So be sure to drop by and say hello and pick up a ROS CD while they last.