Author Topic: SE fails to launch from command line with +line +column  (Read 5066 times)

rowbearto

  • Senior Community Member
  • Posts: 2368
  • Hero Points: 132
SE fails to launch from command line with +line +column
« on: December 24, 2025, 10:04:24 PM »
I am using Linux x64 QT5 version of SlickEdit v29.0.4.0.

With the SE IDE already running and displayed I desire to run a command from outside SlickEdit to tell the running SE IDE GUI to put a file in the active editor window at a particular line and column number via command:

Code: [Select]
<SE_INSTALL_DIR>/bin/vs_exe +line 6 +column 29 /home/username/some_file.cc
This runs into a problem, I show the output below.

How to fix this issue?

I do not need a graphical environment for this particular command, I am only using it to wake up the existing vs_exe (which is already graphically displayed) at a particular file, line and column. Is there a way to tell SlickEdit to not use Qt or to tell it where the Qt dependency it is looking for is?

Maybe I need to define some environment variables before running SlickEdit to point to some SlickEdit install dir? Something else?

Running above vs_exe command yields output:

Code: [Select]
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc, xcb.

Aborted (core dumped)


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7128
  • Hero Points: 544
Re: SE fails to launch from command line with +line +column
« Reply #1 on: December 24, 2025, 10:42:14 PM »
SlickEdit has no invocation option +line nnn or +column nnn. There is a way to do this but this isn't correct.

Are you able to run SlickEdit at all because this type of issue is typically reproducable every time.

In order to communicate to an existing instance of SlickEdit you just need to run the same version of SlickEdit and specify the same configuration directory. Just leave out the +new option.
« Last Edit: December 24, 2025, 10:54:02 PM by Clark »

rowbearto

  • Senior Community Member
  • Posts: 2368
  • Hero Points: 132
Re: SE fails to launch from command line with +line +column
« Reply #2 on: December 24, 2025, 11:16:07 PM »
Quote
Are you able to run SlickEdit at all because this type of issue is typically reproducible every time.

Yes, I am able to run SlickEdit. I have a SlickEdit GUI running in my VNC session under XFCE in Rocky Linux 9.6.

Quote
There is a way to do this but this isn't correct.

Ah, AI hallucinations, joy! Copilot AI told me I could invoke SlickEdit this way.

Could you please tell me the correct way for a script running outside of SE to tell the already running SE GUI to open a desired file at the line and column and then come to the foreground?

If I invoke vs_exe without +new for the existing instance then what arguments to use to specify the line and column numbers to open the desired file at? I do not see any options in the SlickEdit GUI help that indicate how to specify the line and column number.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7128
  • Hero Points: 544
Re: SE fails to launch from command line with +line +column
« Reply #3 on: December 24, 2025, 11:29:06 PM »
Code: [Select]
vs filename "-#goto-line 2" "-#goto-col 3"

rowbearto

  • Senior Community Member
  • Posts: 2368
  • Hero Points: 132
Re: SE fails to launch from command line with +line +column
« Reply #4 on: December 25, 2025, 01:04:58 AM »
Thanks Clark!

Still having issues using your way to specify line and column.

Just to remind the SE gui is already running in my VNC session.

The SE GUI is the process with pid 1672268 as per the "ps -ef | grep vs_exe" output:

Code: [Select]
$ ps -ef | grep vs_exe
rbresali 1672268       1 20 19:59 pts/17   00:00:02 /home/rbresali/pen/slickedit/se_29000400_linux64qt5/bin/vs_exe -st 0 -sc /home/rbresali/pen/slickedit/config

Then from another terminal window I try to launch the same version of SlickEdit using the same configuration directory and this is what happens:

Code: [Select]
$ /home/rbresali/pen/slickedit/se_29000400_linux64qt5/bin/vs_exe /home/rbresali/.config/Code/User/keybindings.json "-#goto-line 2" "-#goto-col 25" -sc /home/rbresali/pen/slickedit/config
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc, xcb.

Aborted (core dumped)

I tried to set an environment variable I thought may be relevant:

Code: [Select]
$ export QT_QPA_PLATFORM=offscreen
This is what happened when I tried running vs_exe again after exporting QT_QPA_PLATFORM=offscreen:

Code: [Select]
$ /home/rbresali/pen/slickedit/se_29000400_linux64qt5/bin/vs_exe /home/rbresali/.config/Code/User/keybindings.json "-#goto-line 2" "-#goto-col 25" -sc /home/rbresali/pen/slickedit/config
Segmentation fault (core dumped)

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7128
  • Hero Points: 544
Re: SE fails to launch from command line with +line +column
« Reply #5 on: December 25, 2025, 08:00:06 PM »
I'm confused.

Why didn't the first instance crash or require you to mess with environment variables?

Looks like the second instance is crashing.

Does the crash only occur when there's already an existing instance running?
« Last Edit: December 25, 2025, 08:02:20 PM by Clark »

rowbearto

  • Senior Community Member
  • Posts: 2368
  • Hero Points: 132
Re: SE fails to launch from command line with +line +column
« Reply #6 on: December 25, 2025, 10:39:01 PM »
Quote
Why didn't the first instance crash

The first instance did crash, see at the end of the log for the first instance the log had:

Code: [Select]
Aborted (core dumped)
The first instance had the "Qt platform plugin" error message before crashing.

So I thought that maybe it was crashing due to the Qt error message.

So after an internet search I found that I could inform a Qt application such as Slickedit to use:

Code: [Select]
export QT_QPA_PLATFORM=offscreen
So the 2nd instance I set QT_QPA_PLATFORM to get rid of the Qt error message.

But unfortunately SlickEdit also crashed. So the purpose of showing both instances was to illustrate that with the Qt error message gone that SlickEdit still crashes. So maybe the crash is not related to Qt?

Quote
Does the crash only occur when there's already an existing instance running?

It happens regardless of whether there is already an existing instance running or not, I just checked that.

rowbearto

  • Senior Community Member
  • Posts: 2368
  • Hero Points: 132
Re: SE fails to launch from command line with +line +column
« Reply #7 on: December 25, 2025, 10:49:02 PM »
Now I can't get the SE GUI showing up anymore on that machine the way I'm used to running:

Code: [Select]
$ /home/rbresali/pen/slickedit/se_29000400_linux64qt5/bin/vs -st 0 +new -sc /home/rbresali/pen/slickedit/config
Segmentation fault (core dumped)

On another machine with same home file system I am able to run the same command, there is no segmentation fault, and the SE GUI displays in my VNC X session.

Any ideas how I can get it back to running on my original machine without reboot? reboot would be painful but can be done as last resort.

rowbearto

  • Senior Community Member
  • Posts: 2368
  • Hero Points: 132
Re: SE fails to launch from command line with +line +column
« Reply #8 on: December 25, 2025, 10:56:44 PM »
After a reboot I was able to launch vs without a segfault using command line:

Code: [Select]
/home/rbresali/pen/slickedit/se_29000400_linux64qt5/bin/vs -st 0 +new -sc /home/rbresali/pen/slickedit/config
Before rebooting I was getting a segfault doing that.

This was after doing the experiments of the previous messages trying to launch a 2nd vs instance to have the 1st vs instance come up with the file/line/col.

rowbearto

  • Senior Community Member
  • Posts: 2368
  • Hero Points: 132
Re: SE fails to launch from command line with +line +column
« Reply #9 on: December 25, 2025, 11:07:26 PM »
It seems the reboot is only needed (to be able to start SE GUI again) if I do the below without any vs_exe running:

Code: [Select]
/home/rbresali/pen/slickedit/se_29000400_linux64qt5/bin/vs_exe /home/rbresali/.config/Code/User/keybindings.json "-#goto-line 2" "-#goto-col 25" -sc /home/rbresali/pen/slickedit/config
If I only do the above while a vs_exe process is running then I can exit out of the SE GUI and restart it.

But if I try the above when a vs_exe process is NOT running then I can't launch an SE GUI again (get a segfault) and I have to reboot to be able to launch the SE GUI again.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7128
  • Hero Points: 544
Re: SE fails to launch from command line with +line +column
« Reply #10 on: December 26, 2025, 01:12:32 AM »
My best guess is that this issue has something to do with VNC but I haven't heard of this problem before.

You could try running the Qt4 installer to see if that helps at all.

rowbearto

  • Senior Community Member
  • Posts: 2368
  • Hero Points: 132
Re: SE fails to launch from command line with +line +column
« Reply #11 on: December 26, 2025, 02:57:22 AM »
With Qt4 installer and one small modification it works properly, no crash and SE opens the desired file/line/col.

I had to move the -sc option to vs earlier (just after the .../bin/vs instead of at the end of the command line).

So with a SlickEdit QT4 GUI already running I run this command with qt4:

Code: [Select]
/home/rbresali/pen/slickedit/se_29000400_linux64qt5/bin/vs_exe -sc /home/rbresali/pen/slickedit/config /home/rbresali/.config/Code/User/keybindings.json "-#goto-line 2" "-#goto-col 25"
and the existing SlickEdit GUI does open that file/line/col!

SlickEdit GUI does not come to the foreground though. Is there something I could add to the command line to make SlickEdit come to the foreground?

I tried moving the -sc option earlier with the qt5 installation but the qt5 installation still crashes the same ways.

I looked at the stack traces for the core dumps with the qt5 install and it looked like it was crashing inside QT functions. I can provide those stacktraces/core dumps if needed.

I was only using qt5 because it seems "newer", is there any disadvantage for using qt4?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7128
  • Hero Points: 544
Re: SE fails to launch from command line with +line +column
« Reply #12 on: December 26, 2025, 03:29:49 PM »
In general, the Qt5 version runs better on newer linux systems. At this point, pretty much everyone is running newer linux systems. I suspect VNC is a very old technology. Bottom line. Run the installer which works better for your Linux setup.

SlickEdit is already trying to bring itself to the front when you give that command line. It simply doesn't work. Different window managers (in this case VNC) have different bugs.

You can prove this by taking VNC out of the equation and using a local display.

rowbearto

  • Senior Community Member
  • Posts: 2368
  • Hero Points: 132
Re: SE fails to launch from command line with +line +column
« Reply #13 on: December 26, 2025, 10:00:32 PM »
With local display SE QT5 version also crashes with core dump on a modern linux, so this proves VNC is not the issue.

To test with local display I had to use a different system than the original one and I also had to use SE 28.02 instead (I don't have a license for SE 29 on the system with local display).

The linux with the local display is pretty modern (Ubuntu 24.04.3 LTS), see SlickEdit's "Help->About" output below for the details.

Before running the command that failed, SlickEdit is running and on the local display with the following command line seen from ps command:

Code: [Select]
$ ps -ef | grep vs_exe
rbres      36045       1 11 16:55 pts/0    00:00:01 /home/rbres/pen/slickedit/se_28000200_linux64qt5/bin/vs_exe -st 0 -sc /home/rbres/.slickedit

Then when I try to get that existing vs_exe to come up with the file/line/col with below command, SlickEdit crashes (note the 'Aborted (core dumped)' at the end):

Code: [Select]
$ /home/rbres/pen/slickedit/se_28000200_linux64qt5/bin/vs_exe -sc /home/rbres/.slickedit /home/rbres/.bashrc "-#goto-line 97" "-#goto-col 37"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc, xcb.

Aborted (core dumped)

If I try the above command again when a SlickEdit instance is NOT running, it also crashes.

SlickEdit's "Help->About":

SlickEdit Pro 2023 (v28.0.2.0 64-bit Qt5)

Serial number: XXXXXX
Licensed number of users: Single user
License file: /home/rbres/pen/slickedit/se_28000200_linux64qt5/bin/slickedit.lic

Build Date: April 3, 2024   (State file: September 19, 2024)
Emulation: CUA

OS: Linux
OS Version: Ubuntu 24.04.3 LTS
Kernel Level: 6.8.0-90-generic
Build Version: #91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 14:14:30 UTC 2025
Processor Architecture: x86_64

X Server Vendor: The X.Org Foundation
Window Manager: Xfwm4
Display manager: /usr/sbin/lightdm

Memory: 71% Load, 2857MB/4018MB Virtual
Shell Information: /home/rbres/pen/slickedit/se_28000200_linux64qt5/bin/secsh -i
Screen Size: 2048 x 1152 (0 0)

Project Type: Single file project - Other
Language: .sh (Bourne Shell)
Encoding: UTF-8, no signature

Installation Directory: /home/rbres/pen/slickedit/se_28000200_linux64qt5/
Configuration Directory: /home/rbres/.slickedit/28.0.2/
Imported options from: 28.0.2.0

Hotfixes:
/home/rbres/.slickedit/28.0.2/hotfixes/hotfix_se2802_19_cumulative.zip Revision: 19   (currently loaded)
/home/rbres/.slickedit/28.0.2/hotfixes/hotfix_se2802_16_cumulative.zip Revision: 16   (superseded)
« Last Edit: December 26, 2025, 10:06:03 PM by rowbearto »

rowbearto

  • Senior Community Member
  • Posts: 2368
  • Hero Points: 132
Re: SE fails to launch from command line with +line +column
« Reply #14 on: December 26, 2025, 10:10:24 PM »
On the modern linux with local display when I use 'vs' instead of 'vs_exe' it seems to work and not crash:

Code: [Select]
/home/rbres/pen/slickedit/se_28000200_linux64qt5/bin/vs -sc /home/rbres/.slickedit /home/rbres/.bashrc "-#goto-line 97" "-#goto-col 37"