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

Terminix fails on load (parse) a previous saved session file (malformed JSON) #709

Closed
theUncanny opened this issue Jan 24, 2017 · 4 comments

Comments

@theUncanny
Copy link

theUncanny commented Jan 24, 2017

Terminix fails on load (parse) a previous saved session file (malformed JSON)

Example (real) of an automatic saved session file

The problem is in the value format for ratio field:

{
    "child": {
        "child1": {
            "directory": "\/home\/theuncanny",
            "height": 494,
            "profile": "2b7c4080-0ddd-46c5-8f23-563fd3ba789d",
            "readOnly": false,
            "synchronizedInput": true,
            "type": "Terminal",
            "width": 1914
        },
        "child2": {
            "directory": "\/home\/theuncanny",
            "height": 490,
            "profile": "2b7c4080-0ddd-46c5-8f23-563fd3ba789d",
            "readOnly": false,
            "synchronizedInput": true,
            "type": "Terminal",
            "width": 1914
        },
        "orientation": 1,
        "position": 50,
        "ratio": 0,5,
        "type": "Paned"
    },
    "height": 988,
    "name": "Default",
    "synchronizedInput": false,
    "type": "Session",
    "version": "1.0",
    "width": 1914
}

"ratio" field value format:

  • Original and incorrect (comma character): 0,5
  • Correct (point character): 0.5

Additional information

  • Terminix version:
Versions
	Terminix version: 1.4.2
	VTE version: 0.42
	GTK Version: 3.18.9

Note: Installed from ppa:webupd8team/terminix

  • Ubuntu version:
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.1 LTS
Release:	16.04
Codename:	xenial
  • Locale: es_ES.UTF-8

Update: Added locale information. Thanks to @f2404 and @gnunn1.

@f2404
Copy link
Contributor

f2404 commented Jan 24, 2017

Is my guess correct: your locale is not en_US?

@gnunn1
Copy link
Owner

gnunn1 commented Jan 24, 2017

Are you in a country that uses the comma character as a decimal separator? I think this is a bug in D's JASON library that I worked around elsewhere.

@f2404
Copy link
Contributor

f2404 commented Jan 24, 2017

I've also had this problem with yajl :)

@theUncanny
Copy link
Author

@f2404 @gnunn1 You both are right, my locale is es_ES.UTF-8.

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

3 participants