atg / chocolat-public

Public bug tracker for the private chocolat project
http://chocolatapp.com
180 stars 4 forks source link

Line numbers disappear with indenting and syntax highlighting errors #1692

Open hanspinckaers opened 9 years ago

hanspinckaers commented 9 years ago

Version: 3.1.2 on Yosemite (10.10.1)

Sometimes Chocolat stops generating line numbers next to my text and then also refuses to type certain characters (e.g. parentheses). As a demonstration I made a small screencap:

https://www.dropbox.com/s/ll5n35o31vq2rfz/example.mov?dl=0 (also notice the missing line numbers)

I do not know a way to reproduce this error yet, seems to happen with smaller javascript files with 'errors' in it, even thought fixing those 'errors' doesn't resolve it.

Restarting Chocolat fixes it.

hanspinckaers commented 9 years ago

Happened again. Hopefully useful console output:

  31-12-14 17:59:21,196 Chocolat[39675]: Unknown class CHQuickOpenTableView in Interface Builder file at path /Applications/Chocolat.app/Contents/Resources/Base.lproj/CHJumpToDefinition.nib.
  31-12-14 17:59:24,887 Chocolat[39675]: :: {
      id = 3333;
      name = parseHeader;
      "parent_id" = "-1";
      "parent_name" = "-1";
      "parent_type_code" = "-1";
      pass = 309;
      path = "/Users/Hans/test.js";
      "project_name" = "3. beginning and ending";
      "qualified_name" = parseHeader;
      "range_column" = "-1";
      "range_length" = "-1";
      "range_line" = 247;
      regex = "function parseHeader(el, contentArray) {";
      "relative_path" = "/test.js";
      "type_code" = function;
  }
  31-12-14 17:59:52,171 Chocolat[39675]: Was out of order!
  31-12-14 17:59:59,094 Chocolat[39675]: {
      arguments =     (
          "--",
          "/Applications/Chocolat.app/Contents/SharedSupport/building/javascript/node [default]/diagnose.sh"
      );
      environment =     {
          "CHOC_APP_PATH" = "/Applications/Chocolat.app";
          "CHOC_BUILD_DESTINATION" = "/Users/Hans/Dropbox/readable/build/8A8E8949-954F-4631-95D0-27C5C0F0E8ED";
          "CHOC_BUILD_DIR" = "/Users/Hans/Dropbox/readable/build";
          "CHOC_EXT" = "";
          "CHOC_FILE" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/8A8E8949-954F-4631-95D0-27C5C0F0E8ED";
          "CHOC_FILENAME" = "8A8E8949-954F-4631-95D0-27C5C0F0E8ED";
          "CHOC_FILENAME_NOEXT" = "8A8E8949-954F-4631-95D0-27C5C0F0E8ED";
          "CHOC_FILE_DIR" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles";
          "CHOC_PROJECT_DIR" = "/Users/Hans/Dropbox/readable";
          "CHOC_RUN_DIRECTORY" = "/Users/Hans/Dropbox/readable";
          "CHOC_TEMPFILE_1" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/3DB8B72D-E360-4376-9B26-208580F584EF";
          "CHOC_TEMPFILE_2" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/0EC8DFDB-D757-4F13-AF8C-7A193E13B628";
          "CHOC_TEMPFILE_3" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/C1F74F84-D9E5-4D81-8189-BF74ABFCFBD1";
      };
      killAfterOutput = 1;
      populateWithCurrentEnvironment = 1;
      priority = 18;
      wantsOutput = 1;
      workingDirectory = "/Applications/Chocolat.app/Contents/SharedSupport/building/javascript/node [default]";
  }
  31-12-14 17:59:59,353 Chocolat[39675]: completion = {
      depth = 1;
      doc = "Allows the removal of event listeners from the event target.";
      name = removeEventListener;
      snippet = "(%{1=\"type\"}, %{2=\"function() {%{4}}\"}, %{3=\"capture\"})";
      type = "fn(type: string, listener: fn(), capture: bool)";
      url = "https://developer.mozilla.org/en/docs/DOM/EventTarget.removeEventListener";
  }
  31-12-14 17:59:59,353 Chocolat[39675]: prototype = 'fn(type: string, listener: fn(), capture: bool)'
  31-12-14 17:59:59,436 Chocolat[39675]: completion = {
      depth = 1;
      doc = "Allows the removal of event listeners from the event target.";
      name = removeEventListener;
      snippet = "(%{1=\"type\"}, %{2=\"function() {%{4}}\"}, %{3=\"capture\"})";
      type = "fn(type: string, listener: fn(), capture: bool)";
      url = "https://developer.mozilla.org/en/docs/DOM/EventTarget.removeEventListener";
  }
  31-12-14 17:59:59,436 Chocolat[39675]: prototype = 'fn(type: string, listener: fn(), capture: bool)'
  31-12-14 17:59:59,929 Chocolat[39675]: !!! _NSLayoutTreeLineFragmentRectForGlyphAtIndex invalid glyph index 3458
  31-12-14 17:59:59,929 Chocolat[39675]: EXCEPTION! *** NSRunStorage, _NSBlockNumberForIndex(): index (3458) beyond array bounds (3458)
  31-12-14 18:00:00,240 Chocolat[39675]: !!! _NSLayoutTreeLineFragmentRectForGlyphAtIndex invalid glyph index 3459
  31-12-14 18:00:00,240 Chocolat[39675]: EXCEPTION! *** NSRunStorage, _NSBlockNumberForIndex(): index (3459) beyond array bounds (3459)
  31-12-14 18:00:00,276 Chocolat[39675]: completion = {
      depth = 0;
      doc = "Displays a modal dialog with a message and two buttons, OK and Cancel.";
      name = confirm;
      snippet = "(%{1=\"message\"})";
      type = "fn(message: string) -> bool";
      url = "https://developer.mozilla.org/en/docs/DOM/window.confirm";
  }
  31-12-14 18:00:00,276 Chocolat[39675]: prototype = 'fn(message: string) -> bool'
  31-12-14 18:00:00,404 Chocolat[39675]: completion = {
      depth = 0;
      doc = "Displays a modal dialog with a message and two buttons, OK and Cancel.";
      name = confirm;
      snippet = "(%{1=\"message\"})";
      type = "fn(message: string) -> bool";
      url = "https://developer.mozilla.org/en/docs/DOM/window.confirm";
  }
  31-12-14 18:00:00,404 Chocolat[39675]: prototype = 'fn(message: string) -> bool'
  31-12-14 18:00:00,436 Chocolat[39675]: !!! _NSLayoutTreeLineFragmentRectForGlyphAtIndex invalid glyph index 3461
  31-12-14 18:00:00,436 Chocolat[39675]: EXCEPTION! *** NSRunStorage, _NSBlockNumberForIndex(): index (3461) beyond array bounds (3461)
  31-12-14 18:00:00,450 Chocolat[39675]: !!! _NSLayoutTreeLineFragmentRectForGlyphAtIndex invalid glyph index 3462
  31-12-14 18:00:00,450 Chocolat[39675]: EXCEPTION! *** NSRunStorage, _NSBlockNumberForIndex(): index (3462) beyond array bounds (3462)
  31-12-14 18:00:00,568 Chocolat[39675]: !!! _NSLayoutTreeLineFragmentRectForGlyphAtIndex invalid glyph index 3463
  31-12-14 18:00:00,568 Chocolat[39675]: EXCEPTION! *** NSRunStorage, _NSBlockNumberForIndex(): index (3463) beyond array bounds (3463)
  31-12-14 18:00:00,760 Chocolat[39675]: !!! _NSLayoutTreeLineFragmentRectForGlyphAtIndex invalid glyph index 3465
  31-12-14 18:00:00,761 Chocolat[39675]: EXCEPTION! *** NSRunStorage, _NSBlockNumberForIndex(): index (3465) beyond array bounds (3465)
  31-12-14 18:00:01,832 Chocolat[39675]: {
      arguments =     (
          "--",
          "/Applications/Chocolat.app/Contents/SharedSupport/building/javascript/node [default]/diagnose.sh"
      );
      environment =     {
          "CHOC_APP_PATH" = "/Applications/Chocolat.app";
          "CHOC_BUILD_DESTINATION" = "/Users/Hans/Dropbox/readable/build/typing";
          "CHOC_BUILD_DIR" = "/Users/Hans/Dropbox/readable/build";
          "CHOC_EXT" = js;
          "CHOC_FILE" = "/Users/Hans/test2.js";
          "CHOC_FILENAME" = "test2.js";
          "CHOC_FILENAME_NOEXT" = typing;
          "CHOC_FILE_DIR" = "/Users/Hans/";
          "CHOC_PROJECT_DIR" = "/Users/Hans/Dropbox/readable";
          "CHOC_RUN_DIRECTORY" = "/Users/Hans/Dropbox/readable";
          "CHOC_TEMPFILE_1" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/6463427C-77A3-4B1F-B167-6234C8353ECC";
          "CHOC_TEMPFILE_2" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/AF2D722A-5E99-4809-A2E2-5BB352BDD483";
          "CHOC_TEMPFILE_3" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/1D93758D-315B-47BD-BDF6-D37DFDC07A35";
      };
      killAfterOutput = 1;
      populateWithCurrentEnvironment = 1;
      priority = 18;
      wantsOutput = 1;
      workingDirectory = "/Applications/Chocolat.app/Contents/SharedSupport/building/javascript/node [default]";
  }

  31-12-14 18:00:25,254 Chocolat[39675]: outputobj= (
          {
          column = 10;
          line = 7;
          message = "'typeContent' is defined but never used. (W098)";
          path = "";
          source = jshint;
          type = warning;
      },
          {
          column = 22;
          line = 49;
          message = "'parsed' is defined but never used. (W098)";
          path = "";
          source = jshint;
          type = warning;
      },
          {
          column = 29;
          line = 49;
          message = "'parsed' is already defined. (W004)";
          path = "";
          source = jshint;
          type = warning;
      },
          {
          column = 28;
          line = 51;
          message = "'parsed' used out of scope. (W038)";
          path = "";
          source = jshint;
          type = warning;
      },
          {
          column = 18;
          line = 53;
          message = "'parsed' used out of scope. (W038)";
          path = "";
          source = jshint;
          type = warning;
      },
          {
          column = 35;
          line = 55;
          message = "'parsed' used out of scope. (W038)";
          path = "";
          source = jshint;
          type = warning;
      },
          {
          column = 25;
          line = 57;
          message = "'parsed' used out of scope. (W038)";
          path = "";
          source = jshint;
          type = warning;
      },
          {
          column = 5;
          line = 65;
          message = "The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype. (W089)";
          path = "";
          source = jshint;
          type = warning;
      },
          {
          column = 10;
          line = 69;
          message = "Don't make functions within a loop. (W083)";
          path = "";
          source = jshint;
          type = warning;
      },
          {
          column = 16;
          line = 80;
          message = "'i' is already defined. (W004)";
          path = "";
          source = jshint;
          type = warning;
      },
          {
          column = 25;
          line = 80;
          message = "'len' is already defined. (W004)";
          path = "";
          source = jshint;
          type = warning;
      },
          {
          column = 19;
          line = 81;
          message = "'block' is already defined. (W004)";
          path = "";
          source = jshint;
          type = warning;
      },
          {
          column = 10;
          line = 101;
          message = "'determineSections' is defined but never used. (W098)";
          path = "";
          source = jshint;
          type = warning;
      }
  )
  31-12-14 18:00:25,884 Chocolat[39675]: EXCEPTION! *** NSRunStorage, _NSBlockNumberForIndex(): index (3475) beyond array bounds (3475)
  31-12-14 18:00:26,017 Chocolat[39675]: {
      arguments =     (
          "--",
          "/Applications/Chocolat.app/Contents/SharedSupport/building/javascript/node [default]/diagnose.sh"
      );
      environment =     {
          "CHOC_APP_PATH" = "/Applications/Chocolat.app";
          "CHOC_BUILD_DESTINATION" = "/Users/Hans/Dropbox/readable/build/BFA69CC8-3898-485F-907D-5441BBEA5BE1";
          "CHOC_BUILD_DIR" = "/Users/Hans/Dropbox/readable/build";
          "CHOC_EXT" = "";
          "CHOC_FILE" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/BFA69CC8-3898-485F-907D-5441BBEA5BE1";
          "CHOC_FILENAME" = "BFA69CC8-3898-485F-907D-5441BBEA5BE1";
          "CHOC_FILENAME_NOEXT" = "BFA69CC8-3898-485F-907D-5441BBEA5BE1";
          "CHOC_FILE_DIR" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles";
          "CHOC_PROJECT_DIR" = "/Users/Hans/Dropbox/readable";
          "CHOC_RUN_DIRECTORY" = "/Users/Hans/Dropbox/readable";
          "CHOC_TEMPFILE_1" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/B014288E-74BC-43A0-B757-CABBDA3E6D95";
          "CHOC_TEMPFILE_2" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/9A809FB3-9097-4380-90B0-259E0956AAEA";
          "CHOC_TEMPFILE_3" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/76BA05AA-5E44-4F39-8A05-7AA32769BCE3";
      };
      killAfterOutput = 1;
      populateWithCurrentEnvironment = 1;
      priority = 18;
      wantsOutput = 1;
      workingDirectory = "/Applications/Chocolat.app/Contents/SharedSupport/building/javascript/node [default]";
  }

  31-12-14 18:00:28,495 Chocolat[39675]: {
      arguments =     (
          "--",
          "/Applications/Chocolat.app/Contents/SharedSupport/building/javascript/node [default]/diagnose.sh"
      );
      environment =     {
          "CHOC_APP_PATH" = "/Applications/Chocolat.app";
          "CHOC_BUILD_DESTINATION" = "/Users/Hans/Dropbox/readable/build/A1BB6521-7484-44DD-8CFD-9894E8E14345";
          "CHOC_BUILD_DIR" = "/Users/Hans/Dropbox/readable/build";
          "CHOC_EXT" = "";
          "CHOC_FILE" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/A1BB6521-7484-44DD-8CFD-9894E8E14345";
          "CHOC_FILENAME" = "A1BB6521-7484-44DD-8CFD-9894E8E14345";
          "CHOC_FILENAME_NOEXT" = "A1BB6521-7484-44DD-8CFD-9894E8E14345";
          "CHOC_FILE_DIR" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles";
          "CHOC_PROJECT_DIR" = "/Users/Hans/Dropbox/readable";
          "CHOC_RUN_DIRECTORY" = "/Users/Hans/Dropbox/readable";
          "CHOC_TEMPFILE_1" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/B12ED3AE-7409-499F-B942-1E53E7637876";
          "CHOC_TEMPFILE_2" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/7F1287F5-BA88-4C62-8184-94B88E62C967";
          "CHOC_TEMPFILE_3" = "/var/folders/13/5b1x17sj2_j6bx68ky2c_4d40000gn/T/CHTemporaryFiles/73B0BA8B-228B-49E4-8168-28C50AB837ED";
      };
      killAfterOutput = 1;
      populateWithCurrentEnvironment = 1;
      priority = 18;
      wantsOutput = 1;
      workingDirectory = "/Applications/Chocolat.app/Contents/SharedSupport/building/javascript/node [default]";
  }

  31-12-14 18:00:37,594 Chocolat[39675]: STATE
  31-12-14 18:00:37,595 Chocolat[39675]: doc = 'untitled' | <'untitled': 0x22cdb710> | (null)
  31-12-14 18:00:37,595 Chocolat[39675]:   split = <CHSplitController: 0x608000311160>
  31-12-14 18:00:37,595 Chocolat[39675]:   - doc = 'untitled' | <'untitled': 0x22cdb710> | (null)
  31-12-14 18:00:37,595 Chocolat[39675]:   - tab = <CHTabController: 0x7f9122f16820>
  31-12-14 18:00:37,595 Chocolat[39675]:   - winc = <CHWindowController: 0x6080003660c0>
  31-12-14 18:00:37,595 Chocolat[39675]:   - win = <CHDocumentWindow: 0x7f9122f1a180>
  31-12-14 18:00:37,596 Chocolat[39675]: doc = 'test2.js' | <'test2.js': 0x2420c430> | /Users/Hans/test2.js
  31-12-14 18:00:37,597 Chocolat[39675]:   split = <CHSplitController: 0x600000308940>
  31-12-14 18:00:37,597 Chocolat[39675]:   - doc = 'test2.js' | <'test2.js': 0x2420c430> | /Users/Hans/test2.js
  31-12-14 18:00:37,597 Chocolat[39675]:   - tab = <CHTabController: 0x7f912401b820>
  31-12-14 18:00:37,598 Chocolat[39675]:   - winc = <CHWindowController: 0x60800036cc00>
  31-12-14 18:00:37,598 Chocolat[39675]:   - win = <CHDocumentWindow: 0x7f9122f13780>
  31-12-14 18:00:37,598 Chocolat[39675]:   split = <CHSplitController: 0x6080007025b0>
  31-12-14 18:00:37,598 Chocolat[39675]:   - doc = 'test2.js' | <'test2.js': 0x2420c430> | /Users/Hans/test2.js
  31-12-14 18:00:37,598 Chocolat[39675]:   - tab = <CHTabController: 0x7f912401b820>
  31-12-14 18:00:37,598 Chocolat[39675]:   - winc = <CHWindowController: 0x60800036cc00>
  31-12-14 18:00:37,599 Chocolat[39675]:   - win = <CHDocumentWindow: 0x7f9122f13780>
  31-12-14 18:00:37,599 Chocolat[39675]: doc = 'test.js' | <'test.js': 0x241cb7a0> | /Users/Hans/test.js
  31-12-14 18:00:37,599 Chocolat[39675]:   split = <CHSplitController: 0x60800011a8b0>
  31-12-14 18:00:37,599 Chocolat[39675]:   - doc = 'test.js' | <'test.js': 0x241cb7a0> | /Users/Hans/test.js
  31-12-14 18:00:37,599 Chocolat[39675]:   - tab = <CHTabController: 0x7f912401b820>
  31-12-14 18:00:37,599 Chocolat[39675]:   - winc = <CHWindowController: 0x60800036cc00>
  31-12-14 18:00:37,600 Chocolat[39675]:   - win = <CHDocumentWindow: 0x7f9122f13780>
  31-12-14 18:00:37,600 Chocolat[39675]: win = 'untitled' | <CHDocumentWindow: 0x7f9122f1a180> | <CHWindowController: 0x6080003660c0>
  31-12-14 18:00:37,600 Chocolat[39675]:   tab = <CHTabController: 0x7f9122f16820>
  31-12-14 18:00:37,600 Chocolat[39675]:     split = <CHSplitController: 0x608000311160>
  31-12-14 18:00:37,600 Chocolat[39675]:     - doc = 'untitled' | <'untitled': 0x22cdb710> | (null)
  31-12-14 18:00:37,600 Chocolat[39675]:     --- splits = (
      "<CHSplitController: 0x608000311160>"
  )
  31-12-14 18:00:37,601 Chocolat[39675]: win = 'test2.js — readable' | <CHDocumentWindow: 0x7f9122f13780> | <CHWindowController: 0x60800036cc00>
  31-12-14 18:00:37,601 Chocolat[39675]:   tab = <CHTabController: 0x7f912401b820>
  31-12-14 18:00:37,601 Chocolat[39675]:     split = <CHSplitController: 0x600000308940>
  31-12-14 18:00:37,601 Chocolat[39675]:     - doc = 'test2.js' | <'test2.js': 0x2420c430> | /Users/Hans/test2.js
  31-12-14 18:00:37,601 Chocolat[39675]:     --- splits = (
      "<CHSplitController: 0x600000308940>",
      "<CHSplitController: 0x6080007025b0>"
  )
  31-12-14 18:00:37,601 Chocolat[39675]:     split = <CHSplitController: 0x60800011a8b0>
  31-12-14 18:00:37,601 Chocolat[39675]:     - doc = 'test.js' | <'test.js': 0x241cb7a0> | /Users/Hans/test.js
  31-12-14 18:00:37,602 Chocolat[39675]:     --- splits = (
      "<CHSplitController: 0x60800011a8b0>"
  )
  31-12-14 18:00:37,602 Chocolat[39675]:     split = <CHSplitController: 0x6080007025b0>
  31-12-14 18:00:37,602 Chocolat[39675]:     - doc = 'test2.js' | <'test2.js': 0x2420c430> | /Users/Hans/test2.js
  31-12-14 18:00:37,602 Chocolat[39675]:     --- splits = (
      "<CHSplitController: 0x600000308940>",
      "<CHSplitController: 0x6080007025b0>"
  )
atg commented 9 years ago

This sounds like the problem @ramitos was having