Notification Center
 

2024-09-26

IO Ninja 5.7.0 Is Out!
Major release

  • NEW: UI themes — choose between different QT styles and light or dark themes on all platforms!
  • NEW: BACnet MS/TP Analyzer plugin
  • NEW: encoded fields in the packet template engine
  • NEW: reactive statements in Jancy reactors
  • Critical update for the Device Monitor for Linux regarding Intel CET
  • Numerous critical fixes in various modules

UI Themes

Some time ago, we introduced partial support for dark themes. On macOS and Linux KDE, IO Ninja checked the system appearance settings on startup and switched to dark mode according to the user's preferences. That feature was a big step in the right direction but left much to be desired. For example, dark mode could not be used on Windows or Linux GNOME, system appearance changes were not reflected in the running IO Ninja, there were dark-mode-related visual glitches here and there, etc.

With this release, we went the extra mile with polishing UI themes in general and dark mode in particular. On all platforms, IO Ninja allows selecting QT style and light or dark mode at any time, detects system-wide appearance changes, and the dark mode visual glitches were ironed out. If you are a dark mode proponent, you will love the new look of IO Ninja!

Ninjas wear black, after all!


BACnet MS/TP Analyzer

BACnet is a protocol widely used in building automation networks (building automation and control is what BAC stands for). Recently, we received quite a few requests for BACnet MS/TP support in IO Ninja. We always try to steer our development efforts towards your needs, so here it is — please welcome the BACnet MS/TP Analyzer plugin!

BACnet is a very complex protocol stack, so supporting the full BACnet specification will take some time. However, the current implementation of BACnet Analyzer is already very capable and will be extremely helpful with troubleshooting BACnet MS/TP networks.

We are looking forward to your feedback on this new plugin!


Encoded Packet Fields

One of the peculiarities of the BACnet MS/TP protocol is that it supports encoded data. Extended BACnet MS/TP frame types encode the follow-up BACnet application layer payload using COBS-encoding (Constant Overhead Byte Stuffing). This is a major challenge for both the packet template engine and the BACnet log representer. Due to the encoding, it's not possible to establish a simple mapping between logical data fields and raw payload bytes!

To support this (and similar cases, such as Modbus ASCII), we introduced the concept of encoded fields. Define the field encoding logic by reimplementing the ias.FieldCodec interface, and IO Ninja will encode and decode raw packet bytes automatically — both in packet templates and in the log view!

import "hexEncoding.jnc"

// codec for hex-encoded fields
class HexFieldCodec: ias.FieldCodec {
    override size_t errorcode decode(
        std.Buffer* buffer,
        void const* p,
        size_t size
    ) {
        return decodeHexString(buffer, string_t(p, size));
    }

    override size_t errorcode encode(
        std.Buffer* buffer,
        void const* p,
        size_t size
    ) {
        return buffer.copy(encodeHexString(p, size));
    }
}

// specification for a packet with a hex-encoded field
[ packetTemplate ]
async layoutMyProto(jnc.DynamicLayout* layout) {
    dylayout (layout) {
        dyfield char stx;

        [ codec = typeof(HexFieldCodec) ] // hex-encoded payload
        dyfield char payload[await layout.asyncScanTo('\r')]; // until CR

        dyfield char cr;
    }
}

Jancy Reactive Statements

Jancy reactors represent a unique and powerful feature that, unfortunately, is not well-known to many developers. The idea behind reactors is simple. Instead of writing event handler methods, the developer defines logical relations between properties via reactive expressions — and puts them all into a reactor. Whenever a property changes, all dependent expressions inside a reactor are re-evaluated automatically — just like formulas in an Excel spreadsheet!

Until now, only expressions could be placed inside a reactor. With this release, we added support for reactive statements if and switch. Whenever the statement condition changes, the nested branches (possibly containing other reactive expressions and reactive statements!) are all re-run automatically.

All this — together with the reactive expressions, which are still there, of course! — allows defining reactive logic in a very compact, natural, and readable form.

reactor uiReactor {
    // the old-fashioned reacitve expression
    edit.m_isEnabled = checkBox.m_isChecked;

    if (radioButton1.m_isChecked) { // reactive `if`
        // handle radio button1 option
    }

    switch (comboBox.m_currentText) { // reactive `switch`
    case "Option 1":
        // handle option 1
        break;
    case "Option 2":
        // handle option 2
        break;
    // ...
    }
}

Device Monitor for Linux Update

...And the never-ending whack-a-mole game of keeping Device Monitor up to date with the latest Linux kernel and hardware changes continues!

This time, the critical update is related to the Intel CET (Control-flow Enforcement Technology) feature. The Device Monitor for Linux was crashing on recent Linux kernels when run on modern Intel processors with CET enabled.

The issue is fixed now, and the Device Monitor for Linux is once again fully compatible with the latest and greatest kernels and processors.

We also added an alternative method for write protection removal on x86_64 via direct PTE (page table entry) attribute modification — this could be helpful in some corner cases. To use this alternative method, build the Device Monitor module as such:

$ make X86_WPR_PTE=1

Other Critical Fixes

  • Inactive session menus were not hidden

    A regression introduced in v5.6.0 caused each session tab to keep its "Session" sub-menu always shown in the main menu bar — whereas there should be only one visible at a time. Fixed now.

  • Stick-to-bottom UI could be invisible on macOS

    On macOS, there is an option to make scrollbars only visible when scrolling. When selected, this would make the stick-to-bottom UI element invisible. As a solution, we redesigned the whole stick-to-bottom interface to make it consistent and easily accessible on all platforms.

  • The old bin-text rendition was used for save-log-as-text

    After the major redesign of bin-text handling by the log engine in the first major release of 2024, the "Save Log As Text" comman still used the old bin-text rendition, thus causing inconsistency and confusion. Fixed now.

  • Incorrect this-offset in Jancy classes with complex hierarchy

    A critical bug in Jancy could cause crashes when overriding virtual functions in classes with a specific configuration of multiple inheritance. Luckily, it was never triggered by any of the official IO Ninja plugins, so it didn't affect non-developers. Nevertheless, this was a critical compiler issue, and it is fixed now.

  • ...and many others

For a complete list of changes, see changelog.txt (also included in all installation packages).

Previous release announcements