Author Topic: SE stack while getting a file's history from git  (Read 2038 times)

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
SE stack while getting a file's history from git
« on: February 11, 2020, 02:45:30 PM »
Version Control -> History of ...  produced this stack dump. 
I had to truncate and obfuscate it for confidentiality reasons, but you might get enough information from it.

git version 2.24.1.windows.2

Code: [Select]
Slick-C STACK TRACE ******************************
 Created on 2/11/2020 at 7:27:58 (733 ms)
 SlickEdit Pro Version 24.0.1.0 Copyright 1988-2019 SlickEdit Inc.
 Edit module and type "st -f <offset>" to get the
 run-time error position

 error code=-3015
 Invalid argument

svchistory.ex 1869 svchistory:setVersionInfo(133,
   2:   [0]=e9fc47447339399e2446ff8235d1230222370740
   2:   [1]=George Washington
   2:   [2]=2013-04-16 02:51:44
   2:   [3]=<empty>
   2:   [4]=
   2:   [5]=3825
   2:   [6]=-1
   2:   [7]=134
   2:   [8]=-1
   2:   [9]=-1
   2:   [10]=0
   2:   [11]=0
   2:   [12]=Extend flags to include Delaware crossings
   2:   [13]=<empty>
   2:   [14]=<empty>
   2:   [15]=strategies/StrategyStatus.java
   p_window_id: 276
   p_object: OI_TREE_VIEW
   p_name: ctltree1
svchistory.ex 2462 svchistory:fillInTreeRecursive(@22947,
...

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: SE stack while getting a file's history from git
« Reply #1 on: February 11, 2020, 04:13:28 PM »
I'll take a look into this, I may be able to send you something that's already fixed.

Does this happen to every git file, or just a particular one?

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
Re: SE stack while getting a file's history from git
« Reply #2 on: February 11, 2020, 06:41:39 PM »
So far I noticed it only on one particular file. As you can tell from the date, it is quite an old commit that caused the problem.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: SE stack while getting a file's history from git
« Reply #3 on: February 11, 2020, 08:08:55 PM »
Could this be a version where the name of the file changed?

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
Re: SE stack while getting a file's history from git
« Reply #4 on: February 11, 2020, 08:18:51 PM »
Yes, a definite possibility.  The whole bleeping repo was reshuffled some years back to make the directory structures Maven-conformant.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: SE stack while getting a file's history from git
« Reply #5 on: February 19, 2020, 03:44:45 PM »
Sorry for the slow reply.  This should be fixed in 24.0.2.

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
Re: SE stack while getting a file's history from git
« Reply #6 on: April 04, 2020, 02:46:02 PM »
Not fixed in 24.0.2.  Provisional patch:
Code: [Select]
svchistory.e 295
   // Replace comment string line endings with <br> to preserve formatting
+   _str commentBR = '';
+  if ( historyInfo.comment != null ) {
+     commentBR = stranslate(historyInfo.comment, '<br>', '\n', 'l');
+  }
-   commentBR := stranslate(historyInfo.comment, '<br>', '\n', 'l');
   if ( commentBR!="" ) {



Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: SE stack while getting a file's history from git
« Reply #7 on: April 04, 2020, 03:14:28 PM »
This doesn't seem to be the original problem I thought.  Does this happen on only certain files, or all the time?

Does History Diff work on this file?
« Last Edit: April 04, 2020, 04:40:21 PM by Dan »

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
Re: SE stack while getting a file's history from git
« Reply #8 on: April 04, 2020, 07:23:10 PM »
This crash happens on every file whose history contains an entry with a null SVCHistoryInfo.comment ([3]). However, the SVCHistoryInfo.revisionCaption ([12]) contains the original git commit message, which should be mirrored in .comment (see my earlier sample post). I looked at the commit causing the problem and couldn't see anything out of the ordinary.

I don't know what individual steps SE goes through to collect the history, otherwise I could pull the raw data and look for abnormalities. 

At any rate, my little hack allows me to once again pull up file histories.

p.s. Almost forgot: yes, there are other files in the repo that crash, caused by different commits. Because the commits are all quite old (2012-2013), they could be a result of a faulty git client.
« Last Edit: April 04, 2020, 07:29:40 PM by Marcel »

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: SE stack while getting a file's history from git
« Reply #9 on: April 06, 2020, 12:35:49 PM »
This is the same problem I'm fixing.  I use git log --pretty=... For some reason, occasionally (version specific), it doesn't put all of the characters on the last entry (I reverse the order).

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: SE stack while getting a file's history from git
« Reply #10 on: April 06, 2020, 01:30:37 PM »
p.s. Almost forgot: yes, there are other files in the repo that crash, caused by different commits. Because the commits are all quite old (2012-2013), they could be a result of a faulty git client.

I'm not sure if it's the client or not, but there are cases where there are not newlines where I am expecting them.

In the meantime you can use History Diff (on the Version Control menu) as a workaround.  It is actually a better feature (I think).

SlickEdit Support

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 384
  • Hero Points: 29
Re: SE stack while getting a file's history from git
« Reply #11 on: April 06, 2020, 09:47:10 PM »
PM sent Marcel.

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
Re: SE stack while getting a file's history from git
« Reply #12 on: April 07, 2020, 02:55:04 AM »
Yay! No more crashes with the new dll.

Thanks Dan.