Author Topic: B4: new install, Slick-C Error @ tbfind.ex offset=4169  (Read 1605 times)

at5dapa1

  • Senior Community Member
  • Posts: 207
  • Hero Points: 19
B4: new install, Slick-C Error @ tbfind.ex offset=4169
« on: September 21, 2019, 10:25:26 am »
Code: [Select]
---------------------------
Slick-C Error
---------------------------
C:\Users\test\Documents\My SlickEdit Config\24.0.0\logs\stack.log
file=tbfind.ex offset=4169
---------------------------
OK   
---------------------------
New clean instal, B4 on Win7x64. Was activating the tools and when reached the Find&Replace stack appered, was able to continue fine after that.

Code: [Select]
SlickEdit Pro 2019 (v24.0.0.5 64-bit)

Serial number: FE78739_BETA
License type: Beta License
License expiration: 2019-10-28 02:00:00
License file: C:\ProgramData\slickedit\24\slickedit.lic

Build Date: September 18, 2019
Emulation: Visual Studio

OS: Windows 7 x64
OS Version: 6.01.7601  Service Pack 1
Memory: 11% Load, 3712MB/32297MB Physical, 5009MB/32295MB Page File, 890MB/8388607MB Virtual
Shell Information: C:\Windows\system32\cmd.exe /q
Screen Size: 1920 x 1080

Project Type: Single file project - Other
Language: No file open
Encoding: No file open

Installation Directory: D:\SlickEdit Pro 24.0.0 Beta4\ (non-removable drive,NTFS,45999MB free)
Configuration Directory: C:\Users\test\Documents\My SlickEdit Config\24.0.0\ (non-removable drive,NTFS,7138MB free)

at5dapa1

  • Senior Community Member
  • Posts: 207
  • Hero Points: 19
Re: B4: new install, Slick-C Error @ tbfind.ex offset=4169
« Reply #1 on: September 21, 2019, 10:28:52 am »
Well, the error reappears on each retart.

at5dapa1

  • Senior Community Member
  • Posts: 207
  • Hero Points: 19
Re: B4: new install, Slick-C Error @ tbfind.ex offset=4169
« Reply #2 on: September 21, 2019, 10:44:28 am »
Seems to happen at line 794 of tbfind.e when there is no document opened at all:
Code: [Select]
         _str bufname = search_wid.p_buf_name;
Tried to debug it by adding a
Code: [Select]
         messageNwait("search_wid = " search_wid);
and I do get different possitive numbers like 13 or 345, while I think the code expects to get 0...

at5dapa1

  • Senior Community Member
  • Posts: 207
  • Hero Points: 19
Re: B4: new install, Slick-C Error @ tbfind.ex offset=4169
« Reply #3 on: September 21, 2019, 11:23:31 am »
For now, had to patch in several places to avoid search_wid crash:
Code: [Select]
--- D:\SlickEdit Pro 24.0.0 Beta4\macros\tbfind_orig.e 2019-09-21 14:12:38.000000000 +0300
+++ D:\SlickEdit Pro 24.0.0 Beta4\macros\tbfind.e 2019-09-21 14:15:14.000000000 +0300
@@ -788,11 +788,14 @@
             _replace_btn.p_enabled        = false;
             _replaceall_btn.p_enabled     = false;
             _replacepreview_btn.p_enabled = false;
          }
       } else {
-         _str bufname = search_wid.p_buf_name;
+         _str bufname = "";
+         if (!_iswindow_valid(search_wid)) {
+            bufname = search_wid.p_buf_name;
+         }
          if (mode == VSSEARCHMODE_FIND || mode == VSSEARCHMODE_REPLACE) {
             if (_findbuffer.p_text == SEARCH_IN_ALL_BUFFERS ||
                 _findbuffer.p_text == SEARCH_IN_ALL_ECL_BUFFERS) {
                int child_windows = _mdi._no_child_windows();
                _find_btn.p_enabled           = (child_windows == 0);
@@ -823,11 +826,14 @@
       _findmark_all.p_enabled = false;
       _findbookmark_all.p_enabled = false;
       _findmc.p_enabled = false;
       _findinc.p_enabled = false;
    } else {
-      _str bufname = search_wid.p_buf_name;
+      _str bufname = "";
+      if (!_iswindow_valid(search_wid)) {
+         bufname = search_wid.p_buf_name;
+      }
       if (_isGrepBuffer(bufname)) {
          _findlist_all.p_enabled = false;
          _findmark_all.p_enabled = false;
          _replacelist.p_enabled = false;
       } else {
@@ -838,11 +844,15 @@
       if ((bufname :== '') || _isGrepBuffer(bufname) || (bufname == '.process') || _isDSBuffer(bufname) || (search_wid.p_buf_flags & VSBUFFLAG_HIDDEN)) {
          _findbookmark_all.p_enabled = false;
       } else {
          _findbookmark_all.p_enabled = true;
       }
-      _findinc.p_enabled = (search_wid.p_buf_size <= def_gui_find_incremental_search_max_buf_ksize*1024);
+      int buf_size = 0;
+      if (!_iswindow_valid(search_wid)) {
+         buf_size = search_wid.p_buf_size;
+      }
+      _findinc.p_enabled = (buf_size <= def_gui_find_incremental_search_max_buf_ksize*1024);
    }
 
    if (mode == VSSEARCHMODE_FIND) {
       switch (_findbuffer.p_text) {
       case SEARCH_IN_CURRENT_BUFFER:
@@ -1275,11 +1285,15 @@
    _mfhook.call_event(CHANGE_SELECTED, (mode == VSSEARCHMODE_FINDINFILES), _mfhook, LBUTTON_UP, '');
    _findstring._show_textbox_error_color(false);
    ignore_change = old_ignore_change;
 
    // show warning message
-   if ((mode == VSSEARCHMODE_FIND) && (search_wid != 0) && (search_wid.p_buf_size > def_gui_find_incremental_search_max_buf_ksize*1024)) {
+   int buf_size = 0;
+   if ((search_wid < 1) || !_iswindow_valid(search_wid)) {
+      buf_size = search_wid.p_buf_size;
+   }
+   if ((mode == VSSEARCHMODE_FIND) && (search_wid != 0) && (buf_size > def_gui_find_incremental_search_max_buf_ksize*1024)) {
       message('Incremental search disabled: File too large');
    }
 }
 
 static void _init_options(int flags)

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: B4: new install, Slick-C Error @ tbfind.ex offset=4169
« Reply #4 on: September 21, 2019, 01:11:59 pm »
Thanks for the report.  Reproduced, changes that were added got missed in testing prior to Beta 4, thanks for identifying it.  Will get that fixed in next build.
« Last Edit: September 21, 2019, 01:17:05 pm by Lee »