Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#3798 closed Bug (Fixed)

SciTE4AutoIt incompatibilty with SSE instruction set

Reported by: Ant Owned by: Jos
Milestone: 3.3.15.4 Component: SciTE4AutoIt
Version: Other Severity: None
Keywords: Cc:

Description

SciTE4AutoIt (version 19.1127.1402.0) crashes immediately.

Experience with other applications tells me this is because the editor's executable hasn't been compiled for compatibility with the SSE instruction set. (The chip in this case is an Intel Celeron, alias Coppermine-128.) Windows reports, "SciTE - a Scintilla based Text Editor modified by Jos f has encountered a problem and needs to close. We are sorry for the inconvenience."

The "Lite" version of SciTE packaged with AutoIt (version 3.3.14.5) works fine. This is my first time trying to use SciTE4AutoIt, so the issue may have been present for some time. Would really appreciate SSE instruction set-compatibility so I can take advantage of the configuration tool.

Here's a link to a similar ticket, although the issue there concerns compiled scripts rather than the editor itself.

https://www.autoitscript.com/trac/autoit/ticket/2576

Attachments (0)

Change History (25)

comment:1 follow-up: Changed 4 years ago by Jos

Strange as the full version and the lite version use the same project file.
Does the current Beta version also have this problem?
https://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/

By the way: The referred ticket talks about disabling the SSE option:
Dang. Visual Studio 2012 enables the SSE option by default even though I'd not explicitly set it. I'll have force it to be disabled. I'll recompile it with this option for any 3.3.10.2+ release.

Last edited 4 years ago by Jos (previous) (diff)

comment:2 in reply to: ↑ 1 ; follow-up: Changed 4 years ago by Ant

Yes. I spotted that too late. Replaced the existing SciTE.exe with the beta. Yep. Same again. Also tried dropping the rest of the beta files (except the SciTELite and discontinued folders) into the SciTE folder just in case.

Would Windows' error report be any help? I could also give you a list of the instruction sets, etc. that the target machine does/doesn't support.

comment:3 in reply to: ↑ 2 ; follow-up: Changed 4 years ago by Jos

Replying to Ant:

Yes. I spotted that too late. Replaced the existing SciTE.exe with the beta. Yep. Same again. Also tried dropping the rest of the beta files (except the SciTELite and discontinued folders) into the SciTE folder just in case.

Would Windows' error report be any help? I could also give you a list of the instruction sets, etc. that the target machine does/doesn't support.

Could you first try the version in the subdirectory ia32?
You require both SciTE.exe & scilexer.dll
Thanks, Jos

comment:4 in reply to: ↑ 3 Changed 4 years ago by Ant

No. The ia32 files give the same result.

Apologies. I've just discovered it's not possible to copy and paste Windows' error report.

This is the error signature.

AppName: scite.exe
AppVer: 4.2.0.0
ModName: scite.exe
ModVer: 4.2.0.0
Offset: 000415ce

Here's the CPU-related info.

CPU Properties:

CPU Type..........Intel Celeron, 1100 MHz (11 x 100)
CPU Alias..........Coppermine-128
CPU Stepping..........cD0
Instruction Set..........x86, MMX, SSE
Original Clock..........1100 MHz
L1 Code Cache..........16 KB
L1 Data Cache..........16 KB
L2 Cache..........128 KB (On-Die, ATC, Full-Speed)

Instruction Set:

64-bit x86 Extension (AMD64, Intel64)..........Not Supported
AMD 3DNow!..........Not Supported
AMD 3DNow! Professional..........Not Supported
AMD 3DNowPrefetch ..........Not Supported
AMD Enhanced 3DNow!..........Not Supported
AMD Extended MMX..........Not Supported
AMD FMA4..........Not Supported
AMD MisAligned SSE..........Not Supported
AMD SSE4A..........Not Supported
AMD XOP..........Not Supported
Cyrix Extended MMX..........Not Supported
Enhanced REP MOVSB/STOSB..........Not Supported
Galois Field New Instructions (GFNI)..........Not Supported
Float-16 Conversion Instructions..........Not Supported
IA-64..........Not Supported
IA AES Extensions..........Not Supported
IA AVX..........Not Supported
IA AVX2..........Not Supported
IA AVX-512 (AVX512F)..........Not Supported
IA AVX-512 4x Fused Multiply-Add Single Precision (AVX512_4FMAPS)..........Not Supported
IA AVX-512 4x Neural Network Instructions (AVX512_4VNNIW)..........Not Supported
IA AVX-512 52-bit Integer Multiply-Add Instructions (AVX512_IFMA)..........Not Supported
IA AVX-512 Bit Algorithm (AVX512_BITALG)..........Not Supported
IA AVX-512 Byte and Word Instructions (AVX512BW)..........Not Supported
IA AVX-512 Conflict Detection Instructions (AVX512CD)..........Not Supported
IA AVX-512 Doubleword and Quadword Instructions (AVX512DQ)..........Not Supported
IA AVX-512 Exponential and Reciprocal Instructions (AVX512ER)..........Not Supported
IA AVX-512 Neural Network Instructions (AVX512_VNNI)..........Not Supported
IA AVX-512 Prefetch Instructions (AVX512PF)..........Not Supported
IA AVX-512 Vector Bit Manipulation Instructions (AVX512_VBMI)..........Not Supported
IA AVX-512 Vector Bit Manipulation Instructions 2 (AVX512_VBMI2)..........Not Supported
IA AVX-512 Vector Length Extensions (AVX512VL)..........Not Supported
IA AVX-512 VPOPCNTDQ..........Not Supported
IA BMI1..........Not Supported
IA BMI2..........Not Supported
IA FMA..........Not Supported
IA MMX..........Supported
IA SHA Extensions..........Not Supported
IA SSE..........Supported
IA SSE2..........Not Supported
IA SSE3..........Not Supported
IA Supplemental SSE3..........Not Supported
IA SSE4.1..........Not Supported
IA SSE4.2..........Not Supported
Vector AES (VAES)..........Not Supported
VIA Alternate Instruction Set..........Not Supported
ADCX / ADOX Instruction..........Not Supported
CLDEMOTE Instruction..........Not Supported
CLFLUSH Instruction..........Not Supported
CLFLUSHOPT Instruction..........Not Supported
CLWB Instruction..........Not Supported
CLZERO Instruction..........Not Supported
CMPXCHG8B Instruction..........Supported
CMPXCHG16B Instruction..........Not Supported
Conditional Move Instruction..........Supported
Fast Short REP MOV Instruction..........Not Supported
INVPCID Instruction..........Not Supported
LAHF / SAHF Instruction..........Not Supported
LZCNT Instruction..........Not Supported
MONITOR / MWAIT Instruction..........Not Supported
MONITORX / MWAITX Instruction..........Not Supported
MOVBE Instruction..........Not Supported
MOVDIR64B Instruction..........Not Supported
MOVDIRI Instruction..........Not Supported
PCLMULQDQ Instruction..........Not Supported
PCOMMIT Instruction..........Not Supported
PCONFIG Instruction..........Not Supported
POPCNT Instruction..........Not Supported
PREFETCHWT1 Instruction..........Not Supported
PTWRITE Instruction..........Not Supported
RDFSBASE / RDGSBASE / WRFSBASE / WRGSBASE Instruction..........Not Supported
RDRAND Instruction..........Not Supported
RDSEED Instruction..........Not Supported
RDTSCP Instruction..........Not Supported
SKINIT / STGI Instruction..........Not Supported
SYSCALL / SYSRET Instruction..........Not Supported
SYSENTER / SYSEXIT Instruction..........Supported
Trailing Bit Manipulation Instructions..........Not Supported
VIA FEMMS Instruction..........Not Supported
VPCLMULQDQ Instruction..........Not Supported
WBNOINVD Instruction..........Not Supported

comment:5 follow-up: Changed 4 years ago by Jos

Does the standard SciTE binary work for you? available here: https://www.scintilla.org/wscite32_446.zip

Could you also redownload the files from ia32 and test those as I think I have used the wrong mak parameter the last time.

Thanks
Jos

Last edited 4 years ago by Jos (previous) (diff)

comment:6 in reply to: ↑ 5 Changed 4 years ago by Ant

No. Neither the standard SciTE nor the new ia32 files work. (Did a full installation for both.)

comment:7 follow-up: Changed 4 years ago by Jos

Full install? You only need to copy the 2 files right?

comment:8 in reply to: ↑ 7 Changed 4 years ago by Ant

Yes... dropping the two files into a full / fresh installation of SciTE4AutoIt. (I don't know what the dependencies are.) Plus, my working environment is SciTE-Lite and I don't want to break it.

comment:9 Changed 4 years ago by Jos

Ok, well I have no idea at this moment why the full version crashes and have no means to test.
When the official version of SciTE also crashes, it does make sense my full version does too as that is more or less similar. I do not see any obvious difference between the lite and full builds of SciTE.
I have done a recompile of the lite and the full version with visual studio 2017 and put them in this directory in their own subdirectory: https://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/ia32/
Could you try both version to see if it is still the case that the lite version works and the full version crashes?

Jos

Last edited 4 years ago by Jos (previous) (diff)

comment:10 Changed 4 years ago by Ant

Sorry for taking a while to reply.

Both sets of files when placed in their respective installations produce an application error message reporting that the file MSVCP140.DLL is missing.

Presumably, this is a runtime file that's been added to the project, perhaps by Visual Studio, but isn't included as a distributable with any of the AutoIt, SciTE or beta packages (and is therefore unrelated to the original error).

If the file is needed, are you able to include it with the beta files?

comment:11 follow-up: Changed 4 years ago by Jos

I feels like you are running on a (very) old/limited OS as these files are part of the standard Microsoft Visual C ++ Redistributable package, which I believe are standardly installed these days. So it could very well be that older systems aren't compatible with the latest version of the VisualStudio compiler and SciTE options set for the compiler/linker.
When this is the case, you will have to use the latest version available of WinXP on the downloadpage, unless you have other ideas.

Jos

comment:12 in reply to: ↑ 11 ; follow-up: Changed 4 years ago by mLipok

Replying to Jos:

.....which I believe are standardly installed these days.......

Unfortunately not.
I have similar issue at my work, when we install some software on fully udpated Win10 Pro, then we must to especially install this following vcredist pack.

@Ant
Try to install those 3 following MS Visual C++ Redistributable package:
vcredist_x86_2005.exe
vcredist_x86_2008.exe
vcredist_x86_2015.exe

EN version->vcredist_x86_2015.exe

Last edited 4 years ago by Jos (previous) (diff)

comment:13 Changed 4 years ago by Ant

We have progress.

Having successfully installed the (2015) redistributable package, both the lite and the full versions of SciTE that you compiled with Visual Studio (in "comment9") open and seem to run fine when dropped into the beta set-up.

So this means the recent Visual Studio SciTE compilations have something (that ensures compatibility with my device) that the published versions don't.

comment:14 in reply to: ↑ 12 Changed 4 years ago by Ant

Btw, thanks very much for that, mLipok. I only just spotted the new username.

comment:15 follow-up: Changed 4 years ago by Jos

Ok, adding this in the vcxproj file does the trick then for the VC2017 build:

<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>

Previously I added this to the standard scite.mak and scitilla.mak files but that doesn't seem to work:

CCFLAGS=-TC -MP -W3 -wd4244 -D_CRT_SECURE_NO_DEPRECATE=1 -DLUA_USER_H=\"scite_lua_win.h\" $(XP_DEFINE)
CCFLAGS=$(CCFLAGS) /arch:IA32

Found somewhere another option to try:

CXXFLAGS=$(CXXFLAGS) -DUSE_MSVC_SSE=OFF

.. and uploaded that to https://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/ia32/mak/
Could you try that version for me to see if that fixes it?

Jos

Last edited 4 years ago by Jos (previous) (diff)

comment:16 in reply to: ↑ 15 Changed 4 years ago by anonymous

Unfortunately, it doesn't.

When dropped into each of the beta, AutoIt3 and SciTE4AutoIt3 set-ups, the original error occurs.

I'm way out of my depth here, but could the desired command line options be as follows?

-DUSE_MSVC_SSE=ON -DUSE_MSVC_SSE2=OFF

In other words, use SSE (compatible with my machine) but don't use SSE2 (incompatible with my machine). Feel free to ignore me; this is an uninformed stab in the dark. If it exists, I can't find the on-line documentation for these options.

comment:18 follow-up: Changed 4 years ago by Jos

I have added 2 versions to the ia32 directory:
maknono compiled mak file with:
-DUSE_MSVC_SSE=OFF -DUSE_MSVC_SSE2=OFF
makyesno compiled mak file with:
-DUSE_MSVC_SSE=ON -DUSE_MSVC_SSE2=OFF
Have a go and see if that solves anything... else I might have to consider doing the compile with Visual Studio instead of nmake.

Version 0, edited 4 years ago by Jos (next)

comment:19 in reply to: ↑ 18 ; follow-up: Changed 4 years ago by Ant

Sadly, neither did the trick. Tried them in the beta, AutoIt3 and SciTE4AutoIt3 set-ups.

So, to summarise:

  1. the full version of ScITE fails,
  2. the "lite" version runs fine, even though it uses the same project file as the full version, and
  3. the full version runs fine when compiled under Visual Studio 2017 with the <EnableEnhancedInstructionSet> option set to NoExtensions.

The /arch:IA32 compiler option seems to be the right one. A Visual Studio bug that causes SSE2 code to be generated unintentionally with that option is described here.

comment:20 in reply to: ↑ 19 ; follow-up: Changed 4 years ago by Jos

Replying to Ant:

Sadly, neither did the trick. Tried them in the beta, AutoIt3 and SciTE4AutoIt3 set-ups.

So, to summarise:

  1. the full version of ScITE fails,
  2. the "lite" version runs fine, even though it uses the same project file as the full version, and
  3. the full version runs fine when compiled under Visual Studio 2017 with the <EnableEnhancedInstructionSet> option set to NoExtensions.

The /arch:IA32 compiler option seems to be the right one. A Visual Studio bug that causes SSE2 code to be generated unintentionally with that option is described here.

Thanks for your feedback. I had a look at that article and it does sound similar but I am not seeing that /fp: build flag so am not sure it is. To test, I changed the buildflags to:

CCFLAGS=$(CCFLAGS) /arch:IA32 /d2Qvec-mathlib-

as they indicate that the second parameter shold be a tempory workaround.

The result is stored in directory ia32/namkeia32. Could you try that set aswell?

Thanks
Jos

comment:21 in reply to: ↑ 20 ; follow-up: Changed 4 years ago by Ant

Unfortunately, it didn't work with any of the set-ups. It was worth a shot, though.

By the way, I tried the software on another almost identical machine, just to rule out some kind of glitch in my device / set-up. The same error occurred, albeit with a slightly different offset in the signature. Both machines are up-to-date (as much as they can be).

comment:22 in reply to: ↑ 21 Changed 4 years ago by Ant

Not sure if it's any help, but I came across this predefined macro.

You may well know about it already. If not, it indicates at run time which /arch option was set. Maybe it can be used to check whether the /arch:IA32 option is actually being picked up by compiler.

comment:23 follow-up: Changed 4 years ago by Jos

Think the easiest solution is going to be to build SciTE & ScilLexer with VC in stead on nmake for the time being, like we do with the lite version.
I have made these now available in directory /ia32 and removed all other test compiles.
Could you try those once more, and when working, will move them into the Beta so that will be the next standard for Production?

Thanks for your testing!
Jos

comment:23 follow-up: Changed 4 years ago by Jos

  • Milestone set to 3.3.15.4
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [12482] in version: 3.3.15.4

comment:24 in reply to: ↑ 23 ; follow-up: Changed 4 years ago by Ant

Yes. They work fine when dropped into the SciTE4AutoIt set-up.

No problem! It's just frustrating knowing the answer's out there. Thanks for persisting and for going to the trouble of accommodating earlier processors. :)

comment:25 in reply to: ↑ 24 Changed 4 years ago by Jos

Replying to Ant:

Yes. They work fine when dropped into the SciTE4AutoIt set-up.

No problem! It's just frustrating knowing the answer's out there. Thanks for persisting and for going to the trouble of accommodating earlier processors. :)

Thanks for letting me know. :)

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jos.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.