1. First checks

  1. Look at the start-up report for ShmemDriver: Stream '<name>' Init filename '<file>' Success. If it is missing, or an error appears instead, use the table below.
  2. Make sure "filename" and "size" are both in the driver section. Neither has a default in the code; a missing value is not reported.
  3. Compare the file name and size in both programs character by character. They must be identical.
  4. Check the block counters of the block in DIPanel or System Layout. Note that the input counter msgCounter of a shmem stream rises on every read cycle, whether or not the other process wrote anything, so it proves that the stream runs, not that data flows. Watch the block's data values instead.
  5. Check the block size in the ICD against size. See section 4.

2. Message reference

MessageCauseWhat to do
ShmemDriver: Stream '<name>' Init filename '<file>' Success (info)The shared memory was created, or an existing one with that name was opened and mapped.Nothing: normal.
ShmemDriver: Stream '<name>' create filename '<file>' failed (error)The shared memory could not be created. Windows: CreateFileMapping failed (name invalid or in use by an object of a different kind, access denied). Linux/macOS: shm_unlink / shm_open / ftruncate failed (no permission on /dev/shm, an old segment owned by another user, size too large, or /dev/shm full).See section 3.
ShmemDriver: Stream '<name>' mapping filename '<file>' failed (error)The segment exists but mapping it into the engine's address space failed. Typical: size is larger than the existing segment (another process created it smaller), or the memory limit is reached.Make size equal on both sides, or equal to the creating process's size. On Windows the engine also prints MapViewOfFile failed: <Windows error number> on the console.
ShmemDriver: Stream '<name>' openning filename '<file>' failed (error; the word "openning" is spelled like that in the program)The segment exists already but could not be opened (Windows: OpenFileMapping failed, normally access denied because the other process runs with higher rights or in another session).Run both programs with the same user/rights and in the same Windows session. See section 5.
Stream: '<name>': block '<block>': timing <N>us > system minor frame <M>us; data may be lost. (warning)An input block has a numeric framePerMS longer than the minor frame.See section 7.

3. Name, who creates it, and how the segment is opened

4. Size mismatch

SituationResultFix
size in the engine is smaller than the other process usesThe other process (which maps more) reads or writes beyond what the engine maps. Data beyond size is not seen by the engine; the other process may fail to map or read zeros.Use the same size on both sides.
size in the engine is larger than the existing segmentMapping fails: mapping filename '...' failed.Reduce size or recreate the segment with the correct size (restart both programs in a defined order).
size larger than the blocksWorks; the extra bytes are unused.Normal. Keep the block sizes of the ICD within size.
Blocks (all in one stream) add up to more than sizePart of the data lies outside the mapped memory.Set size to at least the sum of the stream's input and output block sizes, or split into two streams with two files.
Layout different in the two programs (field order, packing / alignment, byte order)Values look scrambled even though the size is right.Use the same structure definition in both (same packing, fixed-width types). Do not use long / bool / pointers in the shared structure.

5. Permissions, sessions and stale files

6. No synchronization: torn reads

The driver provides no locks, flags or sequence numbers. The engine copies bytes to and from the memory, and the other process can read or write at the same time. This means:

7. framePerMS for input blocks

For an input block ("direction": "in") use "framePerMS": -1:

See the note on framePerMS in the streams manual.

8. Other problems

SymptomCauseFix
No report line at all for the streamThe stream is not in streams.json, is disabled, or the driver name is misspelled (must be "ShmemDriver").Check streams.json. See How to Set Up Streams.
Other process reads zerosDifferent file name (one letter, case, or a leading /), or the engine is on another Windows session.Compare names; see section 3 and 5.
Other process worked before the engine was restarted, now sees old data (Linux)The engine recreated the segment; the other process still maps the old one.Restart the other process after the engine, or reopen the segment on each connection.
Name is cut or segment not found by the other programName longer than 31 characters.Use a shorter name.
Looks like random bytes or shifted valuesLayout mismatch (alignment/packing, endianness, data types of different width) between the two programs and the ICD.Align the structure definitions; check the block definition in the ICD.
Values flicker between old and newTorn reads (section 6).Add sequence counters or double buffering.
Engine stops reading after resetThe segment is recreated on reset; the other process holds the old one.Reopen on the other side after a reset.
Message counters and error counters of every block are visible live in System Layout. Use the receive hooks to validate data (for example a sequence check). The driver fields filename and size are described in the streams manual.