Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16055] Ti.Codec.encodeNumber crashes iOS Simulator when encoding numbers > 128 with breakpoints or stepping

GitHub Issuen/a
TypeBug
PriorityLow
StatusReopened
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsdefect, ios
ReporterTim Alosi
AssigneeUnknown
Created2013-09-03T01:11:38.000+0000
Updated2018-02-28T20:03:37.000+0000

Description

Attachments

FileDateSize
app.js2013-09-03T01:11:38.000+00001975
iOS Simulator Screen shot Sep 20, 2013 12.08.12 PM.png2013-09-20T06:09:47.000+000029207

Comments

  1. Mostafizur Rahman 2013-09-20

    Hello, Please clean your project builds and run again. Here i have attachment for you code output. Thanks
  2. Tim Alosi 2013-09-22

    Hello, I cleaned the project and rebuilt the code. I have also upgraded to Studio 3.1.3. I am still seeing the same behavior. Please confirm that you placed a break point in the code and stepped thru the code and it did not crash when encoding 128. It only disconnects the simulator when stepping. Tim
  3. Ritu Agrawal 2013-12-20

    I can reproduce the problem with Studio 3.1.3 and SDK 3.1.3 with debugging turned on. Debugging process dies at the following statement: Ti.Codec.encodeNumber({ source : 128, dest : b3, type : Ti.Codec.TYPE_INT, byteOrder : Ti.Codec.BIG_ENDIAN }); Note that it works for a value of 127 but not for 128. But given that we allocated a buffer of 4 bytes that should be sufficient for this integer value.
  4. Ritu Agrawal 2013-12-20

    Moving this ticket to engineering as it can be reproduced with the provided test case.
  5. Ritu Agrawal 2013-12-20

    JIRA incorrectly changed the reporter to me when I moved the ticket but this ticket was originally created by "Tim Alosi" so I would appreciate if you can change the reporter back to him.

JSON Source