Author Topic: Directory diff seg faults  (Read 735 times)

astromme

  • Senior Community Member
  • Posts: 154
  • Hero Points: 1
Directory diff seg faults
« on: September 06, 2023, 06:28:29 PM »
SlickEdit Pro 2023 (v28.0.0.2 64-bit Qt4) on Ubuntu 22.04.2 LTS.

I configure git to use vsdiff as its diff and directory diff tool.  When I try to do a diff between commits, vsdiff seg faults.

This also seg faults on Beta 1, but not Slickedit 2021.

[diff]
    tool = vsdiff
    submodule = log
    mnemonicprefix = true
[difftool]
    prompt = false
[difftool "vsdiff"]
    cmd = "~/bin/vsdiff" "$LOCAL" "$REMOTE"

!"git difftool --dir-diff"

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2902
  • Hero Points: 153
Re: Directory diff seg faults
« Reply #1 on: September 06, 2023, 06:42:45 PM »
I will look into this.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2902
  • Hero Points: 153
Re: Directory diff seg faults
« Reply #2 on: September 06, 2023, 08:15:01 PM »
 I haven't been able to get it to run vsdiff so far.  I seem to remember that there is another setting elsewhere to tweak (in another file), or an environment variable?

astromme

  • Senior Community Member
  • Posts: 154
  • Hero Points: 1
Re: Directory diff seg faults
« Reply #3 on: September 06, 2023, 09:54:22 PM »
I don't have anything else in my environment related to it..

I do have this in my .gitconfig:


[alias]
    dd = !"git difftool --dir-diff"


The above instead of the partial line starting with the ! in the initial post.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6905
  • Hero Points: 531
Re: Directory diff seg faults
« Reply #4 on: September 06, 2023, 11:24:35 PM »
Dan, make sure you specify a file that is modified. Otherwise, it won't even try to run your configured diff tool.

Code: [Select]
git difftool readme.html
git dd

where readme.html is modified.

This works fine for me. No crash. I tested beta 1 and beta 2. I tested Linux Mint 21 and Ubuntu 22.
« Last Edit: September 06, 2023, 11:29:03 PM by Clark »

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2902
  • Hero Points: 153
Re: Directory diff seg faults
« Reply #5 on: September 07, 2023, 03:04:19 PM »
Does it crash if you run git difftool on a single file?

astromme

  • Senior Community Member
  • Posts: 154
  • Hero Points: 1
Re: Directory diff seg faults
« Reply #6 on: September 07, 2023, 04:51:45 PM »
Does it crash if you run git difftool on a single file?

It does not.  I tried running
Code: [Select]
git difftool <commit> <file> and it didn't crash.

I also tried running
Code: [Select]
git difftool <commit> WITHOUT a file, and it didn't crash; it just shows vsdiff as a single window with the first file.. when I exit that diff, it opens another vsdiff window with the next file, etc.

When I run
Code: [Select]
git difftool --dir-diff <commit> a window titled "Multi-File Diff Finding Files" with the temp directories briefly opens with no content (just a gray background) then closes after a second, and the shell says
Code: [Select]
Segmentation fault (core dumped)
Previous working behavior is to open the multifile diff window that shows the tree.
« Last Edit: September 07, 2023, 05:05:19 PM by astromme »

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2902
  • Hero Points: 153
Re: Directory diff seg faults
« Reply #7 on: September 13, 2023, 08:23:11 PM »
Sorry it took a while to reply.
When I run
Code: [Select]
git difftool --dir-diff <commit> a window titled "Multi-File Diff Finding Files" with the temp directories briefly opens with no content (just a gray background) then closes after a second, and the shell says
Code: [Select]
Segmentation fault (core dumped)
Previous working behavior is to open the multifile diff window that shows the tree.

When you say <commit> you're giving the SHA hash for the commit?  The full one, or an abbreviation?  I have tried this, and I still don't get a crash.

I'm using the Qt4 version of Beta 2. Is there anything about your system that you could tell us that might help?
« Last Edit: September 13, 2023, 08:27:03 PM by Dan »

astromme

  • Senior Community Member
  • Posts: 154
  • Hero Points: 1
Re: Directory diff seg faults
« Reply #8 on: September 13, 2023, 09:20:25 PM »
When you say <commit> you're giving the SHA hash for the commit?  The full one, or an abbreviation?  I have tried this, and I still don't get a crash.
Generally the short version, or a short version.

I'm using the Qt4 version of Beta 2. Is there anything about your system that you could tell us that might help?
It's more or less vanilla Ubuntu..
Code: [Select]
SlickEdit Pro 2023 (v28.0.0.2 64-bit Qt4)
Serial number: <I usually block this out.. does nobody care if I leave this in?>
License type: Beta License
License expiration: 2023-10-19 18:00:00
License file: /opt/slickedit-pro2023beta2/bin/slickedit.lic
Build Date: August 21, 2023
Emulation: Brief
OS: Linux
OS Version: Ubuntu 22.04.2 LTS
Kernel Level: 6.2.0-060200-generic
Build Version: #202302191831 SMP PREEMPT_DYNAMIC Sun Feb 19 23:37:22 UTC 2023
Processor Architecture: x86_64
X Server Vendor: The X.Org Foundation
Window Manager: GNOME Shell
Display manager: /usr/sbin/gdm3
Memory: 94% Load, 22788MB/24081MB Virtual
Shell Information: "/opt/slickedit-pro2023beta2/bin/secsh" -i
Screen Size: 1920 x 1080, 3840 x 2160, 3840 x 2160, 3840 x 2160
Project Type: Gnuc
Language: .json (JSON)
Encoding: UTF-8, no signature
Installation Directory: /opt/slickedit-pro2023beta2/
Configuration Directory: /home/stromme/.slickedit/28.0.0/
Migrated from: /home/stromme/.slickedit/26.0.3/
Spill File: /tmp/slkspill.stromme.2998666


One thing that may or may not be relevant - I wanted to create a single directory link to switch between versions of Slickedit when I install a new one, but sometimes I run into difficulties..

Code: [Select]
stromme@WORK:~$ ls -la ~/bin
total 44
drwxrwxr-x  2 stromme stromme 4096 Sep  7 10:43 .
drwxr-x--- 37 stromme stromme 4096 Sep 12 12:00 ..
lrwxrwxrwx  1 stromme stromme   13 Oct 27  2022 Grep -> /usr/bin/grep
lrwxrwxrwx  1 stromme stromme   23 Aug 10 16:56 old-slickedit-dir -> /opt/slickedit-pro2021/
lrwxrwxrwx  1 stromme stromme   28 Sep  6 15:52 slickedit-dir -> /opt/slickedit-pro2023beta2/
lrwxrwxrwx  1 stromme stromme   28 Sep  5 12:59 slickedit-dir.bak -> /opt/slickedit-pro2023beta2/
-rwxrwxr-x  1 stromme stromme   15 Jan 24  2023 ubuntu_version
lrwxrwxrwx  1 stromme stromme   34 Sep  5 12:59 vs -> ./slickedir-dir/bin/vs
lrwxrwxrwx  1 stromme stromme   24 Aug 10 16:56 vsdiff -> slickedit-dir/bin/vsdiff
-rwxr-xr-x  1 stromme stromme   38 Aug 10  2022 vs-git
lrwxrwxrwx  1 stromme stromme   25 Aug 10 16:56 vsmerge -> slickedit-dir/bin/vsmerge

I tried this, but ran into some issues where vs didn't want to start.

Then I tried replacing the link from vs to slickedit-dir to this script:
Code: [Select]
#!/bin/bash
$(dirname "$0")/slickedit-dir/bin/vs
but that didn't really work right either, so I gave up and just did this:
Code: [Select]
vs -> /opt/slickedit-pro2023beta2/bin/vs
Could these links be causing weird behavior?

The main behavior I want is to type "vs somefile" from any shell anywhere and have it open in my Slickedit instance.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6905
  • Hero Points: 531
Re: Directory diff seg faults
« Reply #9 on: September 13, 2023, 11:04:27 PM »
Using a symbolic link (i.e. 'ln -s /opt/slickedit-pro2023beta2/bin/vs vs") will have no effect on this. "bin/vs" is a script which resolves symbolic links. Take a look at the script source and you'll see the loop which resolves symbolic links.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6905
  • Hero Points: 531
Re: Directory diff seg faults
« Reply #10 on: September 17, 2023, 01:15:16 PM »
I built an installer with added debug in vsdiff that hopefully will tell us something. Please install and test with this debug vsdiff.

vsdiff may be crashing when diffing a particular file. If so, this test will let us know which file. I removed the theading (this uses only 1 thread), so that the debug info will be much easier to figure out.

The debug will be written to /home/<username>/.slickedit/28.0.0/logs/vs.log

After vsdiff crashes, dump the contents of vs.log. If it looks like it crashed on a particular file. Run it again and see if it still crashes on the same file. Keep me posted.

v28 beta 2 installer with debug for vsdiff:

https://support.slickedit.com/outbound/2800/se_28000002_linux64qt5_beta2_vsdiff_debug1.tar.gz

astromme

  • Senior Community Member
  • Posts: 154
  • Hero Points: 1
Re: Directory diff seg faults
« Reply #11 on: September 18, 2023, 05:18:25 PM »
Incidentally, I switched to qt5 version (via softlinks) we talked about here: https://community.slickedit.com/index.php/topic,19267.msg76904.html#msg76904 and it doesn't crash.. I switched back to to the "original" 2023 beta 2 and it crashes again.

Would you still like me to try the debug version you created?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6905
  • Hero Points: 531
Re: Directory diff seg faults
« Reply #12 on: September 18, 2023, 05:32:02 PM »
Not sure I completely follow your post.

Does the Qt 5 v28 beta 2 vsdiff work for you?

astromme

  • Senior Community Member
  • Posts: 154
  • Hero Points: 1
Re: Directory diff seg faults
« Reply #13 on: September 18, 2023, 05:38:48 PM »
Yes.

SlickEdit Pro 2023 (v28.0.0.2 64-bit Qt5) vsdiff works fine.

SlickEdit Pro 2023 (v28.0.0.2 64-bit Qt4) vsdiff crashes as described earlier.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6905
  • Hero Points: 531
Re: Directory diff seg faults
« Reply #14 on: September 18, 2023, 05:41:14 PM »
No need to test this installer. Glad Qt 5 vsdiff works!