{"action":"opened","issue":{"url":"https://api.github.com/repos/ethereum/remix/issues/838","repository_url":"https://api.github.com/repos/ethereum/remix","labels_url":"https://api.github.com/repos/ethereum/remix/issues/838/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/remix/issues/838/comments","events_url":"https://api.github.com/repos/ethereum/remix/issues/838/events","html_url":"https://github.com/ethereum/remix/issues/838","id":328509829,"node_id":"MDU6SXNzdWUzMjg1MDk4Mjk=","number":838,"title":"Executing a contract method which returns a bytes stream makes Remix IDE unstable state and it crashes","user":{"login":"bansatya","id":33546557,"node_id":"MDQ6VXNlcjMzNTQ2NTU3","avatar_url":"https://avatars2.githubusercontent.com/u/33546557?v=4","gravatar_id":"","url":"https://api.github.com/users/bansatya","html_url":"https://github.com/bansatya","followers_url":"https://api.github.com/users/bansatya/followers","following_url":"https://api.github.com/users/bansatya/following{/other_user}","gists_url":"https://api.github.com/users/bansatya/gists{/gist_id}","starred_url":"https://api.github.com/users/bansatya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bansatya/subscriptions","organizations_url":"https://api.github.com/users/bansatya/orgs","repos_url":"https://api.github.com/users/bansatya/repos","events_url":"https://api.github.com/users/bansatya/events{/privacy}","received_events_url":"https://api.github.com/users/bansatya/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-01T12:57:17Z","updated_at":"2018-06-01T12:57:17Z","closed_at":null,"author_association":"NONE","body":"I have complied the below contract in remix without any error. Then I did following from Run option\r\nCase 1:\r\nStep1: created the contract.\r\nStep2 :set value using  setAmount method.\r\nStep3: get value in bytes using getAllData method\r\n\r\nResult: Returns bytes stream successfully.\r\n\r\nCase 2:\r\nStep1: created the contract.\r\nStep2 :set value using  setAmount method **twice**\r\nStep3: get value in bytes using getAllData method\r\n\r\n**Result**: Remix stuck and crashed. However, running same in geth console return correct result.\r\n\r\n*******----------------************\r\n\r\ncontract Test {\r\n\r\n    struct ParticipantData {\r\n        uint _participant1;\r\n        uint _participant2;\r\n        uint _participant3;\r\n        bytes32 _status;\r\n    }\r\n\r\n    ParticipantData[] participantDataArr; \r\n \r\n\r\n    function setAmount(uint participant1, uint participant2, uint participant3, bytes32 status) public{\r\n        require(participant1 != 0 || participant2!= 0 ||participant3 != 0 || status!='0x');                                                                 \r\n        ParticipantData memory data;\r\n        data._participant1 = participant1;\r\n        data._participant2 = participant2;\r\n        data._participant3= participant3;\r\n        data._status = status;\r\n        participantDataArr.push(data);\r\n    }\r\n    \r\n       \r\n    function getAllData() public returns (bytes){\r\n        byte separator = ';';\r\n        byte commaSeparator = ',';\r\n        uint counter=0;\r\n        bytes memory bytesString = new bytes(participantDataArr.length*((32*3)+(1*4)+32));\r\n        for(uint i=0;i<participantDataArr.length;i++){\r\n            for(uint j=0;j<32;j++){\r\n                bytesString[counter++] = (bytes32(participantDataArr[i]._participant1))[j];\r\n            }\r\n            j=0;\r\n            bytesString[counter++] = commaSeparator;\r\n            for(j=0;j<32;j++){\r\n                bytesString[counter++] = (bytes32(participantDataArr[i]._participant2))[j];\r\n            }\r\n            j=0;\r\n            bytesString[counter++] = commaSeparator;\r\n            for(j=0;j<32;j++){\r\n                bytesString[counter++] = (bytes32(participantDataArr[i]._participant3))[j];\r\n            }\r\n            j=0;\r\n            bytesString[counter++] = commaSeparator;\r\n            for(j=0;j<32;j++){\r\n                bytesString[counter++] = (participantDataArr[i]._status)[j];\r\n            }\r\n            bytesString[counter++] = separator;\r\n        }\r\n        return bytesString;\r\n    }\r\n    \r\n    function getDataLength() returns (uint){\r\n        return participantDataArr.length;\r\n    }\r\n}\r\n"}}
{"actor":{"display_login":"bansatya"}}