Author Topic: Error Opening File Stack  (Read 1237 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Error Opening File Stack
« on: March 18, 2024, 03:02:03 PM »
I occasionally get 'Error Opening File'. Last time it happened when I tried to load a new Slickedit workspace. Other times not when loading SlickEdit workspace, and clicking "OK" after "Error Opening File" brought up another Error Open File, and that kept happening and I had to kill SlickEdit.

I am using linux x64 qt5 version 28.0.1. I am using special binary: se_28000100_linux64qt5-2024-02-21-rte.tar.gz
I have hotfix 14 installed.

Here is a stack that I got with 'Error Opening File' when trying to open a new workspace:

Code: [Select]
stack[2024-03-18T10:55:41Z] Slick-C STACK TRACE ******************************
stack[2024-03-18T10:55:41Z] Created on 3/18/2024 at 10:55:41 (42 ms)
stack[2024-03-18T10:55:41Z] SlickEdit Pro Version 28.0.1.0 Copyright 1988-2023 SlickEdit Inc.
stack[2024-03-18T10:55:41Z] Edit module and type "st -f <offset>" to get the
stack[2024-03-18T10:55:41Z] run-time error position
stack[2024-03-18T10:55:41Z]
stack[2024-03-18T10:55:41Z] error code=-33
stack[2024-03-18T10:55:41Z] Error reading file
stack[2024-03-18T10:55:41Z]
stack[2024-03-18T10:55:41Z]main.ex 1615 save_pos(,)  p_window_id: 191  p_object: OI_EDITOR  p_name: _shellEditor  form_name: _tbshell_form
stack[2024-03-18T10:55:41Z]files.ex 25858 files:GetFilePositionFromWindow()  p_window_id: 5  p_object: OI_FORM  p_name:
stack[2024-03-18T10:55:41Z]files.ex 25960 _add_filepos_info(/home/rbresali/v/git/rbresali-claslinx/src/pss/node/build_last.log)  p_window_id: 948  p_object: OI_EDITOR  p_name:
stack[2024-03-18T10:55:41Z]files.ex 24633 _save_all_filepos()  p_window_id: 948  p_object: OI_EDITOR  p_name:
stack[2024-03-18T10:55:41Z]restore.ex 10201 save_window_config(1,500,63,0,/home/rbresali/v/git/rbresali-claslinx/slickopt/,0,0,0)  p_window_id: 948  p_object: OI_EDITOR  p_name:
stack[2024-03-18T10:55:41Z]wkspace.ex 16221 _workspace_save_state(0)  p_window_id: 948  p_object: OI_EDITOR  p_name:
stack[2024-03-18T10:55:41Z]wkspace.ex 16393 workspace_close()  p_window_id: 948  p_object: OI_EDITOR  p_name:
stack[2024-03-18T10:55:41Z]wkspace.ex 7822 workspace_open(/home/rbresali/v/git/dwdmbuild-dwdm_1830-integration-240317/slickopt/devtest.vpw,,,1,1,1,-1)  p_window_id: 948  p_object: OI_EDITOR  p_name:

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6877
  • Hero Points: 530
Re: Error Opening File Stack
« Reply #1 on: March 18, 2024, 07:34:12 PM »
A block got swapped out and SlickEdit couldn't read it back in. SlickEdit sometimes uses the original file as a read only spill file. It's possible that an unmodified block was swapped out and SlickEdit couldn't read it back from the original file. Is there a process writing to this file?

If there is a process writing to this file, you can do this:

* Go to Tools>Options>File Options>Load
* Set "Load partially for large files (use file locking)" to OFF

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Error Opening File Stack
« Reply #2 on: March 19, 2024, 01:06:58 AM »
I had many files open. Don't know which file it was. It would be nice if the "Error Opening File" error message said which file it was?

Sometimes I have log files open that are modified externally. Other times I have source files that may get modified by git. Don't really know which file caused this.

I do occasionally open large files. What is the disadvantage if I turn "Load partially for large files (use file locking)" to OFF? Does it mean it would take a really long time to open a large file?

I think I did have a very large log file loaded that changed externally, that is likely what happened. I think I've seen this issue with this large logfile. That logfile contains the contents of my last build, so each time I do a build it starts small and records just the build. I did one very huge build so that log file likely got big. But then I likely did another build and that file got deleted and restarted (fopen with "w"). So it may have been very large and then it became very small and this happened? Not sure?

Could be better if this issue was fixed and I could leave that ON?

I attached my File Load settings. Is it a contradiction that "Load entire file" is ON and "Load partially for large files (use file locking)" is also ON? Or does the "load partially" override the "load entire file" for large files?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6877
  • Hero Points: 530
Re: Error Opening File Stack
« Reply #3 on: March 19, 2024, 01:13:09 AM »
Instead you can make the "Load partially when files are larger than (KB)" much larger. I don't know how big your log files is.  However large it can be, make it 25% larger than that. You just need to make sure with your usage of SlickEdit, this won't happen.  Disabling this feature ensures that it can't happen no matter what you do.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Error Opening File Stack
« Reply #4 on: March 19, 2024, 01:15:23 AM »
OK.

FYI I found in my stack.log another stack from Feb 14. Don't know which version of hotfixes I had at the time. Also I likely had the baseline version of 28.0.1 when it happened.

Code: [Select]
stack[2024-02-14T14:37:36Z] Slick-C STACK TRACE ******************************
stack[2024-02-14T14:37:36Z] Created on 2/14/2024 at 14:37:36 (225 ms)
stack[2024-02-14T14:37:36Z] SlickEdit Pro Version 28.0.1.0 Copyright 1988-2023 SlickEdit Inc.
stack[2024-02-14T14:37:36Z] Edit module and type "st -f <offset>" to get the
stack[2024-02-14T14:37:36Z] run-time error position
stack[2024-02-14T14:37:36Z]
stack[2024-02-14T14:37:36Z] error code=-33
stack[2024-02-14T14:37:36Z] Error reading file
stack[2024-02-14T14:37:36Z]
stack[2024-02-14T14:37:36Z]main.ex 1615 save_pos(<empty>,)  p_window_id: 275  p_object: OI_EDITOR  p_name: _search4  form_name: _tbsearch_form
stack[2024-02-14T14:37:36Z]stdprocs.ex 13889 set_switch_buffer_args(/home/rbresali/v/git/rbresali-large_skb/src/pss/node/build_last.log,<empty>,-1)  p_window_id: 5  p_object: OI_FORM  p_name:
stack[2024-02-14T14:37:36Z]moveedge.ex 638 close_window(,1)  p_window_id: 5  p_object: OI_FORM  p_name:
stack[2024-02-14T14:37:36Z]sellist.ex 5150 _save_non_active(/home/rbresali/v/git/rbresali-large_skb/src/pss/node/build_last.log,1,1,0)  p_window_id: 5  p_object: OI_FORM  p_name:
stack[2024-02-14T14:37:36Z]tbfilelist.ex 7986 tbfilelist:FileListQuitFile(/home/rbresali/v/git/rbresali-large_skb/src/pss/node/build_last.log)  p_window_id: 5  p_object: OI_FORM  p_name:
stack[2024-02-14T14:37:36Z]tbfilelist.ex 7769 _tbfilelist_form.ctl_close_button.lbutton_up()  p_window_id: 5  p_object: OI_FORM  p_name:
stack[2024-02-14T14:37:36Z]tbfilelist.ex 3436 _tbfilelist_form.ctl_file_list.a_c()  p_window_id: 86  p_object: OI_TREE_VIEW  p_name: ctl_file_list  form_name: _tbfilelist_form

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Error Opening File Stack
« Reply #5 on: March 19, 2024, 01:21:44 AM »
Looks like both stacks mention the "build_last.log" file, this is the logfile I was talking about that I log the last build with it. Sometimes I do this build outside of SlickEdit from the command line.

I like opening this build_last.log file instead of opening the process buffer because if I open the process buffer and do another build then I get junk characters instead of the colors (and see the \1, <SOH>), the same problem I describe here: https://community.slickedit.com/index.php/topic,18611.msg76234.html#msg76234

You said it was a timing dependent problem but it seems to always happen that the color characters turn to junk when I have the process buffer showing in an editor window. So I never put it in the editor window anymore, or if I do open the process buffer I try to close it before my next build. But now I load this log of my last build into an editor window and then the color characters don't turn to junk.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Error Opening File Stack
« Reply #6 on: March 19, 2024, 01:52:12 PM »
Is there a way in SlickC to turn off "Load partially for large files (use file locking)"?

I prefer to do all my configuration setting from SlickC so it is repeatable.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6877
  • Hero Points: 530
Re: Error Opening File Stack
« Reply #7 on: March 19, 2024, 05:12:42 PM »
Set the macro variable "def_load_partial" to 0