Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yaml.render() and Yaml.write() does not work on iOS-target #4

Open
xerosugar opened this issue Jul 14, 2014 · 3 comments
Open

Yaml.render() and Yaml.write() does not work on iOS-target #4

xerosugar opened this issue Jul 14, 2014 · 3 comments

Comments

@xerosugar
Copy link

Part of the error output:

Called from yaml.Yaml.render (yaml/Yaml.hx line 51)
Called from yaml.Renderer.render (yaml/Renderer.hx line 100)
Called from yaml.Renderer.writeNode (yaml/Renderer.hx line 475)
Called from yaml.Renderer.writeBlockMapping (yaml/Renderer.hx line 333)
Called from yaml.Renderer.writeMapBlockMapping (yaml/Renderer.hx line 376)
Called from *._Function_1_1 (openfl/display/Stage.hx line 120)

@mikestead
Copy link
Owner

What's the actual error before the stack trace?

@xerosugar
Copy link
Author

'Null Object Reference'

@mikestead
Copy link
Owner

PRs welcome

grepsuzette pushed a commit to grepsuzette/hx-yaml that referenced this issue Mar 16, 2020
…encountered in /www/xxxx/Parser.php:450 "

The exception is not thrown by yaml itself but by PHP because this line in Parser.captureSegment():
    result += _result;

Gets naively compiled in PHP (result is a Dynamic).
So I propose to change it to:
    result += Std.string(_result);

Stack trace:
    #0 /www/xxx/lib/yaml/Parser.php(450): php\Boot::php\{closure}()
    mikestead#1 /www/xxx/lib/yaml/Parser.php(2284): yaml\Parser->captureSegment()
    mikestead#2 /www/xxx/lib/yaml/Parser.php(574): yaml\Parser->readPlainScalar()
    mikestead#3 /www/xxx/lib/yaml/Parser.php(1169): yaml\Parser->composeNode()
    mikestead#4 /www/xxx/lib/yaml/Parser.php(553): yaml\Parser->readBlockMapping()
    mikestead#5 /www/xxx/lib/yaml/Parser.php(1757): yaml\Parser->composeNode()
    mikestead#6 /www/xxx/lib/yaml/Parser.php(991): yaml\Parser->readDocument()
    mikestead#7 /www/xxx/lib/yaml/Parser.php(812): yaml\Parser->parseAll()
    mikestead#8 /www/xxx/lib/yaml/Yaml.php(33): yaml\Parser->parse()
    mikestead#9 /www/xxx/lib/yaml/Yaml.php(49): yaml\Yaml::parse()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants