[MAGNOLIA-6160] Wrong indentation in YAML crashes instance Created: 09/Apr/15  Updated: 05/May/15  Resolved: 29/Apr/15

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.4
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Antti Hietala Assignee: Unassigned
Resolution: Workaround exists Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

5.4 alpha, OSX, Java 7 / Java 8


Attachments: File hello.yaml    
Issue Links:
causality
caused by MAGNOLIA-6169 Cleanup whitespace in yaml config files Closed
supersession
is superseded by MAGNOLIA-6193 YAML indent error leads to a NullPoin... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

A wrong number of spaces (indents) in a YAML template definition file crashes the Magnolia instance in 5.4-m6 (alpha) and JDK 1.8.0_25.

To reproduce:

  1. Download hello-magnolia.
  2. In /templates/pages/hello.yaml, indent lines 11-14 two spaces too much.
hello.yaml
dialog: hello-magnolia:pages/helloPageProperties
renderType: freemarker
templateScript: /hello-magnolia/templates/pages/hello.ftl
title: Hello template
visible: true
areas:
  main:
    renderType: freemarker
    #dialog:
    templateScript: /hello-magnolia/templates/areas/main.ftl
      type: list
      availableComponents:
        quotation:
          id: hello-magnolia:components/quotation

The Magnolia instance crashes, Java process dies. Error in console: malloc: *** error for object 0x1209ba3b0: pointer being freed was not allocated
Full error: http://pastebin.com/AKssucrj



 Comments   
Comment by Antti Hietala [ 09/Apr/15 ]

Attached YAML file with the erroneous indents.

Comment by Antti Hietala [ 28/Apr/15 ]

Tested also on Java 1.7.0_79. Pages app crashes (spinner) but AdminCentral can be recovered with the restartApplication parameter. I get a different error: http://pastebin.com/G0ZqjgsU

Comment by Antti Hietala [ 29/Apr/15 ]

The original issue with JVM crash does not occur after updating to Java 1.7.0_79. Invalid indents continue to cause a NullPointerException. Superseded by MAGNOLIA-6193.

Generated at Mon Feb 12 04:11:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.