Recent

Author Topic: Lazarus won't start  (Read 8598 times)

mrsopeda

  • New member
  • *
  • Posts: 7
Lazarus won't start
« on: May 28, 2017, 01:20:28 am »
Windows 10 64bit
processor intel skylake 2cores 4thread

already tested installing this versions separately:
-lazarus-1.8RC1-fpc-3.0.2-win64
-lazarus-1.6.4-fpc-3.0.2-win64
-lazarus-1.6.4-fpc-3.0.2-win32

Every time I open lazarus.exe a process shows up on task manager consuming 25% processor and 4mb ram (those values change little to nothing) but, even though I tried waiting, it won't start :c

Anyone?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus won't start
« Reply #1 on: May 28, 2017, 01:41:07 am »
start it with the option
lazarus.exe --debug-log=c:\lazlog.txt

or wherever you want the file to be.
Wait a minute, then check the file (post here, if you arent sure)

Also you may try to (backup first) remove your config, and see if any of them causes the issue.
C:\Users\USERNAME\AppData\Local\lazarus\*.*

mrsopeda

  • New member
  • *
  • Posts: 7
Re: Lazarus won't start
« Reply #2 on: May 28, 2017, 06:00:14 pm »
start it with the option
lazarus.exe --debug-log=c:\lazlog.txt

or wherever you want the file to be.
Wait a minute, then check the file (post here, if you arent sure)

Also you may try to (backup first) remove your config, and see if any of them causes the issue.
C:\Users\USERNAME\AppData\Local\lazarus\*.*

Thanks for answering so fast, but unfortunately already tried deleting config file but nothing, and also tried to debug but  "lazarus.exe --debug-log=c:\lazlog.txt" in launch options doesn't seem to be doing anithing (also tried "set lazarus_debuglog=c:\lazarus\debug.txt" in cmd).

I created a dump file from the task manager. it's 90 Mb and it says:

Quote
Microsoft (R) Windows Debugger Version 10.0.15063.400 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [D:\tmp\lazarus.DMP]
User Mini Dump File with Full Memory: Only application data is available

Symbol search path is: srv*
Executable search path is:
Windows 10 Version 15063 MP (4 procs) Free x64
Product: WinNt, suite: SingleUserTS
15063.0.amd64fre.rs2_release.170317-1834
Machine Name:
Debug session time: Sun May 28 12:54:34.000 2017 (UTC - 3:00)
System Uptime: 0 days 22:13:15.933
Process Uptime: 0 days 0:04:26.000
.......................................
*** ERROR: Module load completed but symbols could not be loaded for lazarus.exe
lazarus+0x1000:
00000001`00001000 ff2562934e01    jmp     qword ptr [lazarus+0x14ea368 (00000001`014ea368)] ds:00000001`014ea368={kernel32!GetLastErrorStub (00007ff8`ebe733c0)}


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus won't start
« Reply #3 on: May 28, 2017, 09:32:35 pm »
and also tried to debug but  "lazarus.exe --debug-log=c:\lazlog.txt" in launch options doesn't seem to be doing anithing (also tried "set lazarus_debuglog=c:\lazarus\debug.txt" in cmd).

The debug option will not change the error. But there should then be a log file. Could you attach that logfile? There may be a hint in there.




You may want to wait with the below, until after the logfile.

The dump file may not help, as windows can not read the debug info (different format).
GDB can, so running Lazarus in gdb may help

Open a console in the lazarus directory (c:\lazarus)
and run
Code: [Select]
.\mingw\i386-win32\bin\gdb.exe .\lazarus.exe
this may take a few seconds, you should get a prompt "(gdb)"
enter "r" (without the quotes) and hit return

It may either stop with an error (and you get the (gdb) prompt again)
Or you wait till it hangs, and you press ctrl-c

enter all of the following commands, and copy the output.
bt
info threads

For each ID in the output of info threads (eg 1 and 3) enter
t 1
bt




avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Lazarus won't start
« Reply #4 on: May 29, 2017, 01:50:33 am »
Test it with antivirus switched off
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

mrsopeda

  • New member
  • *
  • Posts: 7
Re: Lazarus won't start
« Reply #5 on: May 29, 2017, 02:39:25 am »

The debug option will not change the error. But there should then be a log file. Could you attach that logfile? There may be a hint in there.


I know, what I'm saying is that the logfile isn't generating.

Quote
You may want to wait with the below, until after the logfile.

The dump file may not help, as windows can not read the debug info (different format).
GDB can, so running Lazarus in gdb may help

Open a console in the lazarus directory (c:\lazarus)
and run
Code: [Select]
.\mingw\i386-win32\bin\gdb.exe .\lazarus.exe
this may take a few seconds, you should get a prompt "(gdb)"
enter "r" (without the quotes) and hit return

It may either stop with an error (and you get the (gdb) prompt again)
+ Attachments and other options
shortcuts: hit alt+s to submit/post or alt+p to preview
Post  Preview

Topic Summary
Posted by: avra
« on: Today at 01:50:33 am » Insert Quote
Test it with antivirus switched off
Or you wait till it hangs, and you press ctrl-c

enter all of the following commands, and copy the output.
bt
info threads

For each ID in the output of info threads (eg 1 and 3) enter
t 1
bt

-my gdb path is C:\lazarus\mingw\x86_64-win64\bin\gdb.exe

-when i runned:
Code: [Select]
.\mingw\x86_64-win64\bin\gdb.exe .\lazarus.exe
it returned
Code: [Select]
GNU gdb (GDB) 7.3.50.20110510-cvs
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from c:\lazarus/.\lazarus.exe...(no debugging symbols found)...done.
(gdb) r
Starting program: c:\lazarus/.\lazarus.exe
Error creating process c:\lazarus/.\lazarus.exe, (error 740).

(gdb) bt
No stack.
(gdb) info threads
No threads.


seems like i'm doing something wrong..

mrsopeda

  • New member
  • *
  • Posts: 7
Re: Lazarus won't start
« Reply #6 on: May 29, 2017, 02:41:12 am »
Test it with antivirus switched off

Currently using no anti-virus. Already tried disabling windows defender and adding lazarus folder + lazarus.exe to windows defender exceptions

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus won't start
« Reply #7 on: May 29, 2017, 03:22:18 am »
well error 740 is at least a hint.
https://answers.microsoft.com/en-us/windows/forum/windows_7-security/error-740-createprocess/b81a0a48-1de9-4127-92a0-d6ee22ebefc1

For some reason Win thinks Lazarus needs admin? It should not need that...

But before going any further, it may be that this error is just by gdb, because gdb does not run as admin. Otherwise you would have gotten some error when launching the IDE without gdb too. (So maybe the IDE runs into other permission issues at some later stage.

I know the install to C:/lazarus is problematic nowadays.
You can try to change it, not sure if it will work. I think the problem is the resource compiler (if you ever need it), because it is 3rd party and doesnt take spaces in the path (but then that is about where you save your projects)....

So try uninstall all, then running the installer as normal user, and install into a location that you have permission.

Or change permission on all files of your current install (and remove any "need admin" that may be set)

Then if the problem persists, with a "no admin needed" install, try gdb again.

---------------
Also maybe a logfile will be written, if you specify a location writeable to your user?

mrsopeda

  • New member
  • *
  • Posts: 7
Re: Lazarus won't start
« Reply #8 on: May 29, 2017, 05:54:53 am »
well error 740 is at least a hint.
https://answers.microsoft.com/en-us/windows/forum/windows_7-security/error-740-createprocess/b81a0a48-1de9-4127-92a0-d6ee22ebefc1

For some reason Win thinks Lazarus needs admin? It should not need that...

But before going any further, it may be that this error is just by gdb, because gdb does not run as admin. Otherwise you would have gotten some error when launching the IDE without gdb too. (So maybe the IDE runs into other permission issues at some later stage.

I know the install to C:/lazarus is problematic nowadays.
You can try to change it, not sure if it will work. I think the problem is the resource compiler (if you ever need it), because it is 3rd party and doesnt take spaces in the path (but then that is about where you save your projects)....

So try uninstall all, then running the installer as normal user, and install into a location that you have permission.

Or change permission on all files of your current install (and remove any "need admin" that may be set)

Then if the problem persists, with a "no admin needed" install, try gdb again.

---------------
Also maybe a logfile will be written, if you specify a location writeable to your user?

ok fresh install, new path

seems like I had admin privileges but wasn't on admin group so also changed that

Code: [Select]
Microsoft Windows [Versión 10.0.15063]
(c) 2017 Microsoft Corporation. Todos los derechos reservados.

C:\WINDOWS\system32>"D:\Programas\laz\mingw\i386-win32\bin\gdb.exe" "D:\Programas\laz\lazarus.exe"
GNU gdb (GDB) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from D:\Programas\laz\lazarus.exe...(no debugging symbols found)...done.
(gdb) r
Starting program: D:\Programas\laz\lazarus.exe
[New Thread 4028.0x134c]
[New Thread 4028.0x10ec]
[New Thread 4028.0x5f4]
[New Thread 4028.0xa20]
[Thread 4028.0xa20 exited with code 0]
[Thread 4028.0x5f4 exited with code 0]
[Thread 4028.0x10ec exited with code 0]
[New Thread 4028.0x238]
[New Thread 4028.0xc0]

control + c doesn't stop anything so i can't use the other commands
« Last Edit: May 29, 2017, 06:23:24 am by mrsopeda »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus won't start
« Reply #9 on: May 29, 2017, 10:36:15 pm »
Did you try the logfile again, making sure to specify a write-able location?

control + c doesn't stop anything so i can't use the other commands

Strange... I tested this on my windows, but I don't have win10.

Really silly question, you did focus the gdb window again (since focus would move to any (potentially hidden) window, that may have opened)?


I am running out of ideas here.

When it stalls, using cpu, is there any disk activity? Then maybe it is trying to find the fpc.exe. But usually that is never a problem, unless you have lots of (over 10) different fpc installed. (I guess you have not)


Random things to try:
edit your environmentoptions.xml (in the user/AppData/lazarus folder)
Code: XML  [Select][+][-]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <CONFIG>
  3.   <EnvironmentOptions>
  4.     <Version Value="110" Lazarus="1.9.0"/>
  5.     <MultipleInstances Value="AlwaysStartNew"/>
  6.  
ADD the last line / Dont worry if you have a diff version, leave the version as it is.


create or edit a file editormacroscript.xml (in the same folder)
Code: XML  [Select][+][-]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <CONFIG>
  3.   <EMS>
  4.     <Settings SelfTestFailed="1" SelfTestError="failed last time"/>
  5.   </EMS>
  6. </CONFIG>
  7.  


Btw config: IIRC, you said you cleared those files before? Did it create them from scratch? (It should)
C:\Users\USERNAME\AppData\Local\lazarus\*.*

mrsopeda

  • New member
  • *
  • Posts: 7
Re: Lazarus won't start
« Reply #10 on: May 30, 2017, 01:21:56 am »
Did you try the logfile again, making sure to specify a write-able location?

control + c doesn't stop anything so i can't use the other commands

Strange... I tested this on my windows, but I don't have win10.

Really silly question, you did focus the gdb window again (since focus would move to any (potentially hidden) window, that may have opened)?


I am running out of ideas here.

When it stalls, using cpu, is there any disk activity? Then maybe it is trying to find the fpc.exe. But usually that is never a problem, unless you have lots of (over 10) different fpc installed. (I guess you have not)


Random things to try:
edit your environmentoptions.xml (in the user/AppData/lazarus folder)
Code: XML  [Select][+][-]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <CONFIG>
  3.   <EnvironmentOptions>
  4.     <Version Value="110" Lazarus="1.9.0"/>
  5.     <MultipleInstances Value="AlwaysStartNew"/>
  6.  
ADD the last line / Dont worry if you have a diff version, leave the version as it is.


create or edit a file editormacroscript.xml (in the same folder)
Code: XML  [Select][+][-]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <CONFIG>
  3.   <EMS>
  4.     <Settings SelfTestFailed="1" SelfTestError="failed last time"/>
  5.   </EMS>
  6. </CONFIG>
  7.  


Btw config: IIRC, you said you cleared those files before? Did it create them from scratch? (It should)
C:\Users\USERNAME\AppData\Local\lazarus\*.*

tried modifying/adding files, nothing.

there ir no lazarus folder in appdata/local

ps: men you are putting a lot of effort in trying to solve this silly problem, I really apreaciate that and I wanted to say thanks. Also it's ok if you give up, really like lazarus but seems like i'll have to get other ide :c

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Lazarus won't start
« Reply #11 on: May 30, 2017, 04:20:20 am »
If the issue is not caused by antivirus, then the culprit could be virus.

Can you make sure your computer is virus free? You should get some free antiviruses to scan your computer, after that you can uninstall them if you don't like them. My recommendation are:

- Avast Free Antivirus
- Malwarebytes Antivirus
- AVG Free Antivirus
- Kaspersky Virus Removal Tool
- Sophos Virus Removal Tool
- Emsisoft Emergency Kit
- McAfee Stringer
- G Data Clean up

Most antiviruses usually offer free version and tools. I am sure all the mentioned above are free because I use them to fix my clients' computers. No antivirus can detect 100% of viruses, so you should to use several or all of them to have better chances of success.

mrsopeda

  • New member
  • *
  • Posts: 7
Re: Lazarus won't start
« Reply #12 on: May 30, 2017, 04:23:46 am »
If the issue is not caused by antivirus, then the culprit could be virus.

Can you make sure your computer is virus free? You should get some free antiviruses to scan your computer, after that you can uninstall them if you don't like them. My recommendation are:

- Avast Free Antivirus
- Malwarebytes Antivirus
- AVG Free Antivirus
- Kaspersky Virus Removal Tool
- Sophos Virus Removal Tool
- Emsisoft Emergency Kit
- McAfee Stringer
- G Data Clean up

Most antiviruses usually offer free version and tools. I am sure all the mentioned above are free because I use them to fix my clients' computers. No antivirus can detect 100% of viruses, so you should to use several or all of them to have better chances of success.

thanks for answering, already tried and nothing

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Lazarus won't start
« Reply #13 on: May 30, 2017, 04:47:23 am »
Might the problem be something similar as described here for winzip ?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus won't start
« Reply #14 on: May 30, 2017, 01:03:18 pm »
Ok so either win 10 changed the location for appdata, or lazarus is not creating its config.

try
Code: Pascal  [Select][+][-]
  1. lazarus --primary-config-path=D:\laz_conf
  2.  
replace D:\laz_conf with a folder that is writable to everyone.

See if any files are created in there.

-----------
What happens if you run (in the lazarus directory)
Code: [Select]
lazbuild.exe --build-ide="-O- -gw -Criot -Sa"you need to open a console for that.
It should take a while, and rebuild the IDE. Test the new one.

(If this works you may skip the download in the next part, as the rebuild IDE will have console-output and debug info. (Though the download has some added bugfixes, as it is from a newer code base)

-----------
I uploaded a build of the 1.8 fixes branch (only Lazarus.exe / 32 bit) to
http://www.friebe-net.de/lazarus.exe

This is build with console output. If you open it, it should open a console window (black msdos like text), on which (hopefully) there should be some output.

It is also a good deal bigger (200MB), as it contains debug info.

You can scan the file prior to using:
https://virustotal.com/
(scan url, the file is to big for upload)

You can scan the file online after striping debug info. Make a copy and in your lazarus folder run
fpc\bin\i386-win32\strip.exe lazarus-copy.exe
Also at https://www.metadefender.com/#!/scan-file


Copy the file into your lazarus dir, and run it there.

-----------
as for gdb you can try attach once it hangs.
Start Lazarus (just the normal way, or with --primary-conf.... option)
Again start gdb with
  .\mingw\i386-win32\bin\gdb.exe .\lazarus.exe
Use the windows task manager, to get the PID of the hanging lazarus.
In gdb type
attach 1111
(where 1111 is the PID)
then
t 1
bt
and all the rest from my previous gdb post.




 

TinyPortal © 2005-2018