[MacRuby] #1007: “EXC_BAD_ACCESS” when trying to generate Json
#1007: “EXC_BAD_ACCESS” when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ Hi Guys, When I try to generate json from the enclosed file I get a bad access error. If you require any other information please let me know. Thanks, Josh -- Ticket URL: <http://www.macruby.org/trac/ticket/1007> MacRuby <http://macruby.org/>
#1007: “EXC_BAD_ACCESS” when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: Component: MacRuby | Resolution: invalid Keywords: | ---------------------------------------+------------------------------------ Changes (by mattaimonetti@…): * status: new => closed * resolution: => invalid Comment: Thanks for the bug report. I just tried with a recent version of trunk and got the following: {{{ SON.parse File.read(File.expand_path('~/Desktop/json_issue.txt')) JSON::ParseError: lexical error: invalid char in json text. [{"drmVersionNumber"=>0, "itemId"=>318926433, "soft (right here) ------^ }}} Then I looked at the file and realized it was really not a json file. You can check with http://www.jsonlint.com/ but your file looks like an inspected version of a Ruby object. I'm closing this ticket since 1) I can't reproduce the EXC_BAD_ACCESS error on trunk and 2) the file isn't a valid json file. If I missed your point, please feel free to reopen this ticket or provide more information. -- Ticket URL: <http://www.macruby.org/trac/ticket/1007#comment:1> MacRuby <http://macruby.org/>
#1007: “EXC_BAD_ACCESS” when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: Component: MacRuby | Resolution: invalid Keywords: | ---------------------------------------+------------------------------------ Comment(by josh.kalderimis@…): Hi Matt, Thanks for the quick reply. I think I might not have explained myself correctly. I am passing a ruby hash to JSON.generate which is then blowing up. I am not trying to parse JSON but instead create JSON. Thank a bundle, Josh -- Ticket URL: <http://www.macruby.org/trac/ticket/1007#comment:2> MacRuby <http://macruby.org/>
#1007: “EXC_BAD_ACCESS” when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@… | Owner: lsansonetti@… Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | ---------------------------------------+------------------------------------ Changes (by mattaimonetti@…): * status: closed => reopened * resolution: invalid => -- Ticket URL: <http://www.macruby.org/trac/ticket/1007#comment:3> MacRuby <http://macruby.org/>
#1007: “EXC_BAD_ACCESS” when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@… | Owner: lsansonetti@… Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | ---------------------------------------+------------------------------------ Comment(by josh.kalderimis@…): I just wanted to add a quick note to say that the included ruby data structure in the file is a hash of data extracted from a group of plist files. The dates haven't serialized correctly, but if it helps I should be able to share the code which generates the error. Thanks Josh -- Ticket URL: <http://www.macruby.org/trac/ticket/1007#comment:4> MacRuby <http://macruby.org/>
#1007: “EXC_BAD_ACCESS” when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@… | Owner: lsansonetti@… Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | ---------------------------------------+------------------------------------ Comment(by mattaimonetti@…): Josh, I removed the not serialized timestamps and the unicode characters that I couldn't eval properly. Once that done, I was able to parse the code, create an object and generate a JSON version of it. I'm attaching the file I used to test, please confirm that it works for you. Also, test your code with Ruby 1.9 and make sure that everything works as expected. If you could reduce the problem to a smaller, easier to reproduce example, that would be very helpful. -- Ticket URL: <http://www.macruby.org/trac/ticket/1007#comment:5> MacRuby <http://macruby.org/>
#1007: “EXC_BAD_ACCESS” when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: Component: MacRuby | Resolution: invalid Keywords: | ---------------------------------------+------------------------------------ Changes (by mattaimonetti@…): * status: reopened => closed * resolution: => invalid Comment: Josh, I'm closing this ticket for now. I'll reopen it when you provide us with a bug reduction. -- Ticket URL: <http://www.macruby.org/trac/ticket/1007#comment:6> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby