unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: emacs won't start interactively
@ 2019-05-28 17:30 Joe Trivers via help-gnu-emacs
  2019-05-28 18:55 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Joe Trivers via help-gnu-emacs @ 2019-05-28 17:30 UTC (permalink / raw)
  To: help-gnu-emacs

From: help-gnu-emacs On Behalf Of Eli Zaretskii
Sent: 28 May, 2019 10:48 AM

>> Date: Tue, 28 May 2019 01:09:23 +0000
>> From: Joe Trivers via help-gnu-emacs <help-gnu-emacs@gnu.org>
>>
>> Any further thoughts about what might be happening here? And on how gdb could be making it work correctly?
>
> I'd have a good look at the environment variables you have set.  Are
> some of them Emacs related, perhaps?  Any suspicious ones?  Maybe post
> the whole list of them here, perhaps someone will spot something.

Nothing looks relevant, other than PATH. Is there a way in cmd.exe (like env in bash) to get such a list?

> Also, do you see anything in the Windows' Event Logger, under
> Application, around the times when you start Emacs and it immediately
> exits?

You may have something there.

Log Name: Application
Source: CbDefense
Information: The application "C:\gnu\emacs-26.1\bin\emacs-26.1.exe" attempted to inject code into the process "C:\GNU\emacs-26.1\bin\emacs-26.1.exe" by calling the function "SetWindowsHookExA". The operation was blocked and the application terminated by Confer.

CbDefense is Carbon Black Antivirus, mandated by our IT department. It also runs on the laptop where emacs 26.1 works properly. Perhaps there's a way to whitelist emacs?
Incidentally, when I typed the command into the Windows command prompt I used capital letters for "GNU".

HAH! I renamed the C:\GNU directory to C:\gnu (in lower case) and now it works properly. Maybe CbDefense lowercases one string but not the other?
And, yes, the "gnu" directory name is in lower case on the laptop where emacs has been working since last year. [facepalm]

Thanks for all your help. Who'd'a thunk it?  /Joe
The content of this message is APPLIED MATERIALS CONFIDENTIAL. If you are not the intended recipient, please notify me, delete this email and do not use or distribute this email.



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: emacs won't start interactively
@ 2019-05-28  1:09 Joe Trivers via help-gnu-emacs
  2019-05-28  2:10 ` Óscar Fuentes
  2019-05-28 14:48 ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Joe Trivers via help-gnu-emacs @ 2019-05-28  1:09 UTC (permalink / raw)
  To: help-gnu-emacs

[I hope "Re:" in the subject line does the Right Thing.]

From:Óscar Fuentes

> What's the exit code of emacs?
>
> emacs.exe -nw
> echo %errorlevel%

1

> If, on the command line, you set PATH to the bare minimum
> (c:\windows\system32) and then run emacs.exe, does it work?

Same result.

> You can try installing Dependencies [1] and see if there is some missing
> dll or a mismatch.

It shows a _lot_ of dependencies, 81  lines in the Module subwindow. They're all in or under C:\Windows\system32, near as I can tell. Not sure how to find incompatible ones. All are shown as Machine: AMD64. Many are api-ms-win-core-*.dll -> C:\Windows\system32\kernel32.dll or kernelbase.dll or powrprof.dll or sechost.dll or a few other ones.

I installed enough of MinGW to get gdb going, and then noticed it appears to be 32-bit only so I re-unpacked the emacs-26.2-i686 zip that I tried the first time. It, too, exits immediately when I run bin\emacs.exe or runemacs.exe. I ran emacs.exe with gdb and gave it an "r" command, hoping for a stack trace when something broke. To my astonishment, emacs popped up in a window and looked perfect.

Very interesting, I thought. I tried to run the 64-bit emacs.exe with gdb but it said it didn't recognize the format of the executable.

I then installed mingw-w64 and ran the 64-bit emacs-26.1.exe with that gdb, and it also produced a perfectly cromulent emacs window. So apparently whatever goes wrong is cured by running under gdb.

Any further thoughts about what might be happening here? And on how gdb could be making it work correctly?

The content of this message is APPLIED MATERIALS CONFIDENTIAL. If you are not the intended recipient, please notify me, delete this email and do not use or distribute this email.



^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <BN6P102MB00661ACF5A35AD540DAC0C10EE1D0@BN6P102MB0066.NAMP102.PROD.OUTLOOK.COM>]
* emacs won't start interactively
@ 2019-05-26  3:27 Joe_Trivers--- via help-gnu-emacs
  2019-05-26 13:43 ` Óscar Fuentes
  2019-05-26 14:41 ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Joe_Trivers--- via help-gnu-emacs @ 2019-05-26  3:27 UTC (permalink / raw)
  To: help-gnu-emacs

O great emacs wizards,

I am trying to install emacs on a new (to me) desktop Windows 10 PC. After following the download instructions for Windows, clicking on the runemacs.exe icon has no apparent effect. Running emacs from the command prompt with a --help argument produces the Usage: line and list of command line options. Running emacs as:
 emacs-26.1\bin\emacs --batch -eval (message \"hi there\")
produces the expected string:
  hi there
so apparently command line parsing and elisp execution works. However, running just emacs-26.1\bin\emacs returns almost immediately with no output, and so does emacs-26.1\bin\emacs -nw.

First I downloaded and unpacked emacs-26.2-i686.zip from a mirror and it didn't work. I then tried emacs-26.2-x86_64.zip emacs-26.1-x86_64.zip from the ftp.gnu.org site, as well as the no-deps version with emacs-26-x86_64-deps unpacked on top. None of them worked. I moved the unpacked tree from <me>\Downloads to c:\GNU but that didn't seem to help either.

I installed 26.1-x86_64 on a Windows 10 laptop last year (in c:\GNU) and it works just fine. Both PCs are set up by my employer's IT department, presumably using the same procedure. I can't figure out what's different on this system. Using "run as administrator" doesn't seem to make any difference.

Can someone please advise me what might be wrong, or what I can try next?

/Joe

The content of this message is APPLIED MATERIALS CONFIDENTIAL. If you are not the intended recipient, please notify me, delete this email and do not use or distribute this email.



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-05-28 18:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-28 17:30 emacs won't start interactively Joe Trivers via help-gnu-emacs
2019-05-28 18:55 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2019-05-28  1:09 Joe Trivers via help-gnu-emacs
2019-05-28  2:10 ` Óscar Fuentes
2019-05-28 14:51   ` Eli Zaretskii
2019-05-28 14:48 ` Eli Zaretskii
     [not found] <BN6P102MB00661ACF5A35AD540DAC0C10EE1D0@BN6P102MB0066.NAMP102.PROD.OUTLOOK.COM>
2019-05-27 16:59 ` Eli Zaretskii
2019-05-27 17:09   ` Óscar Fuentes
2019-05-26  3:27 Joe_Trivers--- via help-gnu-emacs
2019-05-26 13:43 ` Óscar Fuentes
2019-05-26 14:41 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).