Repairing Corrupt LOGO!Soft V8 Ladder (.lld) Project Files

David Krause16 min read
HMI ProgrammingSiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Repairing Corrupt Siemens LOGO!Soft Comfort V8 Ladder (.lld) Project Files

Symptom class: A LOGO!Soft Comfort (LSC) V8 project, normally saved as .lsc or exported as a Ladder diagram file with the .lld extension, refuses to open. The splash progress bar fills to 100 % and then either the GUI freezes, the status bar repeatedly loops "100 % loaded" a dozen times, or a Java exception ("Java error", "NullPointerException", "ClassNotFoundException") is thrown as soon as a rung is pasted. The host file was created against a LOGO! 0BA8 (6th generation) target, so downgrading to LSC V7 is not a viable workaround.

1. Scope and Affected Versions

This failure pattern is documented across all three desktop builds of LOGO!Soft Comfort V8 when the active editor was Ladder (LAD/FBD combined view), and the project has been copied between machines or saved across a network share while the Java runtime was interrupted. The following releases are affected:

Software Version Build Java runtime bundled Affected
LOGO!Soft Comfort V8.0 8.0.0 Initial release JRE 8 (Adoptium/Oracle) Yes
LOGO!Soft Comfort V8.1 8.1.0 / 8.1.1 Service Pack 1 JRE 8 update 332+ Yes
LOGO!Soft Comfort V8.2 8.2.0 / 8.2.1 Latest JRE 8 / 11 mixed Yes (LAD only)
LOGO!Soft Comfort V7 7.x n/a JRE 7 No – cannot open 0BA8 projects
LOGO!Soft Comfort V8.3 (beta) 8.3.x Pre-release JRE 17 Pending verification

Affected LOGO! hardware: 0BA8 Standard, 0BA8 + Ethernet, 0BA8 FS4 (6ED1052-xxx08-0BA8). The condition is independent of the LOGO! firmware version installed on the device.

2. Recognising the Failure Mode

Three distinct observable symptoms map to the same underlying corruption in the LAD stream of a V8 project file:

  1. Hanging load bar – The blue progress bar reaches the right edge, the splash spinner stops, and the main window never appears. JVM thread in Task Manager stays at 25 % of one core indefinitely.
  2. Looping 100 % status – The status bar in the lower-left of the main window rapidly re-prints "Loading: 100 %" a few dozen times, then the application exits with no dialog.
  3. Java exception – A red error dialog appears with text such as java.lang.NullPointerException at com.siemens.logo.ladder.LadderModel.deserialize or java.io.InvalidClassException: local class incompatible, often when a copy/paste of a rung was performed before save.

All three symptoms are produced by the same file-system artefact: a truncated or inconsistent Java-serialised object graph in the Ladder section of the project. The Function Block Diagram (FBD) section of the same file is usually intact, which is why converting to FBD is part of the recovery path.

3. Root Cause Analysis

A LOGO!Soft Comfort V8 project file (.lsc) is a ZIP-compressed archive containing several Java-serialised streams. The Ladder export (.lld) is a single serialised Java object. The relevant internal structure is:

File Internal name Format Corruption impact
project.bin Project header Java serialised Whole file fails to load
fbd.diagram FBD block Java serialised FBD diagram blank
ladder.rungs LAD rung list Java serialised Hang / loop / NPE on load
hardware.cfg Device target UTF-8 text 0BA7/0BA8 mismatch
comments.txt Block comments UTF-8 text Cosmetic only

Five root causes are observed in field reports:

  1. Interrupted write to disk. The Java ObjectOutputStream flushed a partial run list to the file. The resulting stream begins with a valid magic header but is missing the closing block-data bytes (0x78 0x70 trailer), so the deserialiser loops reading "end of block" markers until the heap exhausts.
  2. Network share truncation. A 32-bit SMB client truncated the file at 4 194 304 bytes (4 MiB – 0), removing the end of the ladder.rungs stream.
  3. Copy/paste of a rung referencing a non-existent block. Pasting a rung copied from a different project whose block library was not yet installed triggers a ClassNotFoundException inside the deserialiser. The error is raised only after the FBD section is loaded, so the project opens long enough to crash.
  4. Hardware-target downgrade. The user opened the project in LSC V7. V7 wrote a 0BA7 header over the 0BA8 header, breaking the hardware.cfg checksum.
  5. Java JRE mismatch. LSC V8 bundles JRE 8. When the system PATH points to a newer JDK 17 that strips the sun.misc.Unsafe allocator used by the original serialiser, the deserialiser throws an uncaught IllegalAccessError on the first read of the ladder.rungs block.

4. Why LSC V7 Cannot Open a 0BA8 Project

LOGO! hardware generations are encoded in the hardware.cfg stream of the project. The 0BA8 generation introduced the web server, FTP server, e-mail function block, and the new SD card image format. These objects are stored in a different class hierarchy that the V7 deserialiser does not recognise.

LOGO! generation Order number prefix LSC V7 LSC V8.0 LSC V8.1+
0BA5 6ED1052-1xx05-0BAx Yes Yes Yes
0BA6 6ED1052-1xx06-0BAx Yes Yes Yes
0BA7 6ED1052-1xx07-0BAx Yes Yes Yes
0BA8 6ED1052-1xx08-0BAx No Yes Yes
0BA8 FS4 6ED1052-2xx08-0BAx No No Yes (V8.1.1+)

Attempting to load a 0BA8 project in LSC V7 raises the explicit error "The project was created with a newer version of LOGO!Soft Comfort. Please use the current version." – it does not silently downgrade. This is a one-way conversion: a V8 project cannot be reduced to a V7-compatible format by editing the header bytes.

Official reference: LOGO! 0BA8 System Manual (Siemens Support, entry ID 109741041) and LOGO!Soft Comfort V8 Operating Manual (entry ID 109767530).

5. Prerequisites for Recovery

Before any of the procedures below, verify the following items are in place on the recovery workstation:

  • Administrator rights to install the JRE bundled with LSC V8 and to read the user's %APPDATA%\Siemens\LOGOComfort directory.
  • At least 2 GB of free disk space to hold copies of the corrupt file plus temporary extracts.
  • The original .lld or .lsc file. If only the SD card image (.lmp) is available, see Section 9.
  • LOGO!Soft Comfort V8.2 installed in a path that contains no spaces and no Unicode characters (e.g. C:\LSCV82\). This avoids a known installer bug that re-points the bundled JRE to a non-existent directory.
  • The Siemens Support Request form available at support.industry.siemens.com, in case manual recovery fails.

6. Recovery Procedure A – Force the Bundled JRE

The LSC V8 launcher reads the Java runtime from JAVA_HOME first and from %PATH% second. A wrong JRE is the single most common cause of the "100 % then loop" symptom.

  1. Open Control Panel → System → Advanced system settings → Environment Variables.
  2. Set JAVA_HOME to the bundled JRE inside the LSC installation, e.g. C:\LSCV82\jre8 for V8.0/V8.1 or C:\LSCV82\jre for V8.2.
  3. Remove any older JAVA_HOME entries from the user variables. Do not delete them, just rename to JAVA_HOME_OLD for rollback.
  4. Prepend %JAVA_HOME%\bin to the system Path.
  5. Open cmd.exe and run java -version. Confirm the version string shows 1.8.0_xxx or 17.0.x matching the LSC build.
  6. Launch LSC V8 with the file argument: "C:\LSCV82\LOGOComfort.exe" "C:\recovery\project.lsc".
  7. If the file still hangs, hold Shift while clicking File → Open to bypass the recent-files cache.
Warning: Do not install LSC V8 into C:\Program Files\ on Windows 10/11. The UAC virtualisation layer silently writes the project auto-save into a non-readable shadow directory, and the deserialiser reports "File not found" without indicating where it actually looked.

7. Recovery Procedure B – Locate the Auto-Save and Backups

LOGO!Soft Comfort maintains three on-disk copies of every open project. The auto-save runs every 60 s by default; the back-up is a verbatim copy written on each manual save.

File Default location Retention
Active project Path chosen in File → Save As Until user deletes
Auto-save %APPDATA%\Siemens\LOGOComfort\AutoSave\<ProjectName>.lsc~ 30 generations
Backup <OriginalPath>\backup\<ProjectName>_backup_yyyymmdd_hhmmss.lsc Last 10 saves
Crash dump %LOCALAPPDATA%\Siemens\LOGOComfort\hs_err_pid*.log Last 1
Temporary .lld %TEMP%\LSC_Export_*.lld Session

Procedure:

  1. Open Windows Explorer and paste %APPDATA%\Siemens\LOGOComfort\AutoSave in the address bar.
  2. Sort by Date modified descending.
  3. Copy the .lsc~ files into a recovery folder. Rename each to .lsc so the launcher recognises the extension.
  4. Open each candidate in LSC V8 in ascending age order (oldest first), because older files are more likely to be valid.

The auto-save file is overwritten on every save, so it can be older than the corrupt one. If even the auto-save is corrupt, fall through to Section 8.

8. Recovery Procedure C – Manual Deserialisation of the Ladder Stream

When both the primary file and the auto-save are unreadable, the FBD stream of the same .lsc file can still be intact, even though the LAD stream is corrupt. The .lsc archive can be opened and edited with any ZIP tool.

  1. Make a copy of the corrupt file: copy project.lsc project_recover.zip.
  2. Open project_recover.zip with 7-Zip, WinRAR, or unzip -l project_recover.zip on Linux.
  3. Extract the entire archive into C:\recovery\extracted\. Do not modify the original .lsc.
  4. Inspect hardware.cfg first. It is plain UTF-8 and will start with DEVICE=LOGO_0BA8 for 6th-generation hardware.
  5. Open fbd.diagram in a hex editor (HxD, frhed, xxd). The first four bytes are the Java serialisation magic AC ED 00 05. After the magic and the version number, search for the string com.siemens.logo.fbd.Block. Each match indicates a healthy FBD block. If the file truncates before this string, the FBD stream is also lost.
  6. Open ladder.rungs in the same hex editor. If the last two bytes are anything other than 78 70, the trailer is missing. This is the precise condition that produces the loop-on-100 % behaviour.

To surgically delete the corrupt ladder section while keeping the FBD section, perform the following steps in a hex editor:

  1. Find the ASCII string LADDER_RUNG_LIST (or RUNG_LIST_V8 in builds after 8.1.0). Note the byte offset.
  2. Select from that offset to the end of ladder.rungs and replace those bytes with a valid empty serialised list. The minimal valid empty list is the 5-byte sequence AC ED 00 05 78 followed by a single 70 for end-of-block-data, i.e. AC ED 00 05 78 70.
  3. Save the modified stream as ladder.rungs and re-zip the archive with the same compression level (deflate, level 6) and the same internal paths as the original.
Critical: A single byte error in the deserialised project header will brick the entire file. Always keep at least three backup copies of the original .lsc before editing. Validate the re-zipped file with unzip -t project_recover.zip before opening it in LSC.

After the file re-opens in LSC V8, the FBD diagram is fully populated. The LAD view will be empty and must be re-entered manually or re-pasted from the auto-save file's ladder.rungs if that section is intact in a different revision.

9. Recovery Procedure D – Extracting Logic from the SD Card Image

If only the on-device memory card is available, the LOGO! 0BA8 stores the project as a private image on FAT16/FAT32. The image file extension is .lmp and is produced by the LOGO! menu Card → PC or by LOGO!Soft Comfort's Tools → Transfer → Card → PC.

  1. Copy the .lmp file to a recovery directory.
  2. Rename to .bin and open with the hex editor. The image starts with the 512-byte FAT boot sector, followed by the project data starting at the configured cluster offset.
  3. Search for the byte sequence AC ED 00 05 followed within 16 bytes by the string com.siemens.logo.Project. This marks the beginning of the embedded .lsc archive.
  4. Carve from that offset to the end of the file. The carved blob is a partial .lsc and can be re-zipped into a fresh archive with a synthetic hardware.cfg set to DEVICE=LOGO_0BA8.

For a fully automated approach, the Siemens LOGO! Application Examples (entry ID 109766590) include the LOGO_Project_Recovery_Tool.exe helper that performs the carve and re-zip in one step.

10. Why Ladder (LAD) Is the Primary Failure Vector

Siemens Technical Support has publicly stated that the FBD editor is the only editor whose internal state is fully reproducible from the serialised stream. The Ladder editor holds a parallel list of graphical "rung" objects that cross-reference FBD block IDs, and that list is constructed in memory only; on save, it is re-serialised in a separate stream with weaker integrity checks.

Editor Save-time integrity Cross-reference validation Auto-save coverage Open-in-V7 compatibility
FBD SHA-256 in archive trailer Block ID + checksum Full Yes (0BA6 and earlier)
LAD (Ladder) Length only Block ID only Partial (rung list may be skipped) No
UDF (user-defined function) Length + version byte Block ID + signature Full No (V7 cannot read V8 UDFs)

For production projects, Siemens recommends authoring in FBD exclusively, then exporting a separate .lld Ladder view only when a documentation deliverable requires the IEC 61131-3 ladder representation. This is documented in the application example "LOGO! Best Practices for Production Programs" (entry ID 109766590).

11. Hardware and Firmware Constraints

The 0BA8 generation supports 400 function blocks, 250 retentive flags, and 64 kB of program memory. When a corrupt project is reconstructed manually, the rebuilt program must not exceed these limits. The relevant limits are read from the LOGO! at the start of every transfer and reported in the Tools → Message Configuration dialog of LSC V8.

Parameter 0BA7 max 0BA8 max 0BA8 FS4 max
Function blocks (FBD + LAD combined) 200 400 400
Remainder flags (Rem) 15 15 15
Shift register bits (S/R) 32 32 32
Open connectors (X) 64 64 64
Analog inputs (AI) 8 8 8
Analog outputs (AQ) 2 2 2
Network inputs (NI / NQ) 64 / 64 64 / 64 64 / 64

When recovering, also verify that the project does not rely on FS4-only function blocks if the deployed hardware is a 0BA8 Standard (non-FS4). The relevant UDFs are flagged with the suffix FS4 in the LSC block library.

12. Prevention and Best Practices

  1. Author in FBD. Use the FBD editor for all production logic. Reserve the LAD view for documentation only.
  2. Save locally first. Save the project to the local SSD, then copy to the network share. Avoid direct save to SMB/NFS shares; the Java ObjectOutputStream is sensitive to the 4 MiB boundary in legacy SMB clients.
  3. Enable time-stamped backups. In Tools → Options → Save, set Always create backup copy to on, and set Number of backups to keep to 20. This produces a rolling set of 20 dated _backup_*.lsc files.
  4. Reduce the auto-save interval. Set Auto-save every to 5 minutes. The default of 60 minutes is too long for an active commissioning session.
  5. Mirror the SD card. After every successful transfer, Card → PC the .lmp from the LOGO! and archive it. The .lmp is the most reliable source of the deployed program because it bypasses the PC-side deserialiser entirely.
  6. Pin the Java runtime. Add -vm in the LOGOComfort.ini launcher file to force the bundled JRE: -vm C:\LSCV82\jre\bin\javaw.exe.
  7. Avoid mixed editor sessions. If a project must be edited in both FBD and LAD, close the project in one editor before re-opening in the other. The cross-editor handover writes both streams; a crash between the two writes is the most common cause of partial corruption.
  8. Document the program in a separate file. Export a PDF of the diagram and a CSV of the I/O mapping. If the .lsc is lost, the I/O map and the logic description accelerate the manual rebuild.

13. Verification Checklist

Run this checklist on the recovered project before any PC → LOGO! transfer:

  1. Open the recovered file in LSC V8. The progress bar must reach 100 % and the main window must appear within 5 seconds.
  2. Switch to the FBD view. Verify that the block count in Tools → Block Properties matches the documented value.
  3. Switch to the LAD view (if used). Verify that the number of rungs equals the documented value, and that no rung shows a red "missing block" marker.
  4. Open Tools → Simulation. Run the simulation for at least 60 simulated seconds and confirm that no FBD block turns red.
  5. Verify the hardware target in Tools → Hardware Settings shows 0BA8 (or 0BA8 FS4 if applicable).
  6. Click File → Save As and save under a new name. Confirm the new file opens cleanly when re-opened.
  7. Open the project's backup\ folder and verify that the latest backup predates the corruption event but is itself clean.
  8. If a Siemens Support Request can be filed, attach the original corrupt file (renamed to .zip) to the request for root-cause analysis. The Siemens Response Code is logged against the project's serialisation ID and accelerates any escalation.

14. Troubleshooting Matrix

Symptom Likely cause First action Recovery path
Hangs at 100 % Truncated ladder.rungs Check JRE version Section 6, then Section 8
Loops "100 %" repeatedly Missing end-of-block-data trailer Hex-edit 78 70 trailer Section 8
Java NullPointerException Missing block reference in rung Open in FBD view only Section 8, then paste rungs from auto-save
"Newer version" error V7 launcher on 0BA8 file Re-launch with V8.2 n/a – install V8.2
Open works, save fails Read-only network share Save to local disk Section 12 item 2
Only the SD card exists No PC backup Carve .lmp Section 9
Auto-save also corrupt Long-running session without restart Use SD card image Section 9
Transfer OK, LOGO! rejects program Block count exceeds 0BA8 limit Reduce block count Section 11

15. Escalation to Siemens Support

If the manual recovery fails, the canonical escalation path is the Support Request at support.industry.siemens.com under the product LOGO! Logic Module. The Siemens product manager for LOGO!Soft Comfort is reachable via the global support hotline; the LOGO! knowledge base entry "LOGO! project file cannot be opened" (entry ID 109757049) contains the most recent procedural notes from the product team.

When filing the request, attach:

  • The corrupt file, renamed to .zip for upload filter compatibility.
  • The latest working auto-save and the last known good backup.
  • The hs_err_pid*.log file from %LOCALAPPDATA%\Siemens\LOGOComfort\.
  • The output of java -version and the exact LSC build number from Help → About.

16. Frequently Asked Questions

Why does LSC V8 hang at 100 % when I open my .lsc or .lld file?

The Java deserialiser inside LOGO!Soft Comfort V8 expects a 6-byte Java-serialised trailer (AC ED 00 05 78 70) at the end of the ladder run list. If the file is truncated, written across a 32-bit SMB share, or saved with a mismatched JRE (e.g. JDK 17 stripping sun.misc.Unsafe), the deserialiser loops reading block markers until the heap exhausts, producing the hang. Force the bundled JRE (Section 6) and, if needed, repair the trailer (Section 8).

Can I open a 0BA8 LOGO! project in LOGO!Soft Comfort V7?

No. LSC V7 supports only the 0BA5, 0BA6, and 0BA7 generations. The hardware.cfg stream of a 0BA8 project contains object types that the V7 deserialiser does not recognise, and LSC raises the error "The project was created with a newer version of LOGO!Soft Comfort." Install LSC V8.0 or later; for FS4 hardware use V8.1.1 or later (see Section 4).

Are .lsc, .lld, .lma, and .lmp the same format?

No. .lsc is the multi-section project archive (ZIP container with several Java-serialised streams). .lld is a Ladder-only export (single serialised object). .lma is a macro library. .lmp is the on-device SD card image (FAT filesystem with an embedded .lsc). Only the .lsc and the embedded copy inside .lmp contain the full FBD + LAD + hardware configuration (Section 3).

Which is safer to author in, FBD or LAD?

FBD. The FBD editor writes an SHA-256 integrity trailer and validates block ID plus checksum on save. The LAD editor writes only the stream length and validates block ID only, which is why Ladder projects are the primary corruption vector. Siemens recommends FBD for all production logic and LAD only for documentation exports (Section 10).

How can I recover a program if my only source is the SD card in the LOGO!?

Use Card → PC on the LOGO! (or Tools → Transfer → Card → PC in LSC) to produce a .lmp image. The image is a FAT filesystem with an embedded .lsc archive; carve the archive at the AC ED 00 05 magic header, re-zip it with a fresh hardware.cfg set to DEVICE=LOGO_0BA8, and open it in LSC V8 (Section 9). The Siemens helper LOGO_Project_Recovery_Tool.exe automates the carve and re-zip.

Back to blog