Skip to content

get_tree()->nodes causes this Json::LogicError #38

Open

Description

@airfield20
terminate called after throwing an instance of 'Json::LogicError'
  what():  LargestUInt out of Int range

Activity

  1. airfield20 commented on Oct 23, 2022

    @airfield20
    Author

    to reproduce:

    #include "i3ipc++/ipc.hpp"
    
    int main(){
      i3ipc::connection  conn;
      auto tree = conn.get_tree()->nodes;
    }
    
  2. airfield20 commented on Oct 23, 2022

    @airfield20
    Author

    GDB reports it occuring in this function:

    inline rect_t  parse_rect_from_json(const Json::Value&  value) {
    	return {
    		.x = value["x"].asInt(),
    		.y = value["y"].asInt(), //this line specifically
    		.width = value["width"].asUInt(),
    		.height = value["height"].asUInt(),
    	};
    }
    

    My system is ubuntu 20 running i3-gaps

  3. drmgc commented on Nov 20, 2023

    @drmgc
    Owner

    It sounds like a really edgy case. Provide result of i3-msg -t get_tree, if this can still be reproduced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions