Recent

Author Topic: SIGSEGV - yet another one.  (Read 6163 times)

lucamar

  • Hero Member
  • *****
  • Posts: 3020
Re: SIGSEGV - yet another one.
« Reply #15 on: November 26, 2018, 08:24:04 pm »
It's a picture of another user
Damn right! Sorry. I am curious, does GTK2 on Windows work ok?

That's indeed an image from my (Linux) install. Thence the GTK2 widgetset :)

Re GTK2 on Windows, it works ... with some quirks, at least for the single app we tried to build before deciding to go Windows-all-the-way. Not that the Linux-GTK2 widgetset is free of quirks, which made difficult to ascertain if a quirk was because it was GTK or because it was Windows-gtk %)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.8/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

440bx

  • Hero Member
  • *****
  • Posts: 1994
Re: SIGSEGV - yet another one.
« Reply #16 on: November 26, 2018, 08:41:33 pm »
SOMETHING isn't being terminated after the run
that is very likely a correct conclusion and, also very likely, what is not being terminated is the debugger.  The reason why is far from obvious.

Another question: when you press shift-F9 between executions, do you get some message box asking you if you want to terminate the debugging session (or something to that effect) ?

My guess from what I saw in your path (good call by ASBzone) is that the Acronis stuff may be causing GDB not to terminate.  Just for kicks, can you make all the Acronis stuff end ?  if you can, try debugging your app using just F9 (instead of shift-F9) and see if ending all the Acronis stuff solved the problem.





FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

ASBzone

  • Sr. Member
  • ****
  • Posts: 461
  • Automation leads to relaxation...
    • Free BrainWaveCC Console Utilities
Re: SIGSEGV - yet another one.
« Reply #17 on: November 26, 2018, 09:08:38 pm »
Since I'm modifying this answer:

It took me a while to figure out how you managed to answer before I asked.  LOL


PATH=C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\IDM Computer Solutions\UltraCompare;C:\Program Files\dotnet\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile64\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Common Files\Acronis\FileProtector\;C:\Program Files (x86)\Common Files\Acronis\FileProtector64\;C:\Program Files (x86)\Common Files\eBook Technologies;C:\Users\alfre\AppData\Local\Microsoft\WindowsApps;C:\Users\alfre\AppData\Local\Microsoft\WindowsApps;

(( sorry, you did ask! :) ))

Well, you have a lot of items that are doubled up in your PATH.   That's not a crime, per se.   I wonder if "C:\ProgramData\Oracle\Java\javapath" is the problem? 

In addition to what @440bx suggested, can you try the following, in separate steps?   (These are temporary measures)

1. Adding the following paths to the very front of your PATH

{full_path_to_Lazarus}\fpc\3.0.4\bin\i386-win32;{full_path_to_Lazarus}\mingw\i386-win32\bin;

For me, that would be the following, since I installed Lazarus to C:\Programs\Lazarus

C:\Programs\Lazarus\fpc\3.0.4\bin\i386-win32;C:\Programs\Lazarus\mingw\i386-win32\bin;

My guess is that something in your Java folder or perhaps the OpenSSL folder or one of the other folders, is conflicting with the debugger.   (I have OpenSSL in my path too, but without your issue, so it might be some other folder)

Here's what I see in my Lazarus tree that might have conflicts elsewhere on your system.

>dir C:\Programs\Lazarus\g*.exe /s
Code: Pascal  [Select][+][-]
  1.  
  2.  Directory of C:\Programs\Lazarus\fpc\3.0.4\bin\i386-win32
  3.  
  4. 05/30/2005  08:05 PM            68,608 gcc.exe
  5. 05/30/2005  08:05 PM            19,456 gdate.exe
  6. 05/30/2005  08:05 PM             4,608 gecho.exe
  7. 05/30/2005  08:05 PM            18,944 ginstall.exe
  8. 05/30/2005  08:05 PM            13,824 gmkdir.exe
  9. 05/30/2005  08:05 PM            64,000 grep.exe
  10.                6 File(s)        189,440 bytes
  11.  
  12.  Directory of C:\Programs\Lazarus\mingw\i386-win32\bin
  13.  
  14. 12/04/2015  12:06 AM         5,668,366 gdb.exe
  15.                1 File(s)      5,668,366 bytes
  16.  
  17.  Directory of C:\Programs\Lazarus\mingw\x86_64-win64\bin
  18.  
  19. 09/27/2011  06:23 PM         4,062,208 gdb.exe
  20.                1 File(s)      4,062,208 bytes
  21.  
  22.      Total Files Listed:
  23.                8 File(s)      9,920,014 bytes
  24.  
  25.  

Where did you install Lazarus, btw?


2. Try moving that Java path to a later point in your PATH statement.
-ASB: https://www.BrainWaveCC.com

Lazarus v2.0.11 r63516 / FPC v3.2.1-r46879 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 2004 (Build 19041.508)
Other Systems: Windows 10 Pro x64, Version 2004 or greater

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3826
  • I like bugs.
Re: SIGSEGV - yet another one.
« Reply #18 on: November 26, 2018, 10:07:09 pm »
Aljones, one choice is to dump Windows and install a modern Linux distro. They are just cool nowadays and work well.
I understood this is a hobby for you, an employer does not push a particular OS for you.
The whole tool chain works better then.
Mostly Lazarus trunk on Manjaro Linux.

aljones

  • New Member
  • *
  • Posts: 14
Re: SIGSEGV - yet another one.
« Reply #19 on: November 26, 2018, 11:12:36 pm »
@juhamanninen - Believe me that has been a consideration for years. I have a couple of "shareware" utilities that I wrote in VB which is about the only reason I maintain a Windows box.  (( and don't even get me started with "You can always use VirtualBox", I do know that! ))

@ASBZone - why isn't it as simple as it used to be "Path=whatever> from a dos prompt?  (( My age is telling, yes?? ))
I changed the path so it now looks like:
"PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;c:\lazarus\fpc\3.0.4\bin\i386-win32;c:\lazarus\mingw\i386-win32\bin;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\Common Files\eBook Technologies;C:\Users\alfre\AppData\Local\Microsoft\WindowsApps;

Lazarus is at it's default installation "C:\Lazarus\" I would have put it in "Program Files" but was operating under the assumption that when the authors suggest another folder then they have a reason for it.

Of the programs you list, I do have a couple of them (grep and gdb) that reside in \standalone\basic\qb64 - they shouldn't be a problem since they aren't in the path. (( though gdb does bug me a bit ))

No significant change in function.  Build(success)->run(success) ... build(success)->run(fail)
Unload Lazarus and restart.  Build(success)->run(fail)

Looking through taskmanager, I see nothing that seems to be a holdover from Lazarus or an <unknown>.exe  But for that matter, Lazarus doesn't show as a running process either <?????> 
But lazarus.exe does show in taskmanager->details ... odd!  Now, unless the debugger uses the same name as the 'program' then it's the program itself that isn't completing.  "Test1.exe" (I know, how imaginative) shows in taskmanager->details on it's first run and exits; on its next run it doesn't hit the writeln before giving the sigsecv error. 

I'm confused .....

aljones

  • New Member
  • *
  • Posts: 14
Re: SIGSEGV - yet another one.
« Reply #20 on: November 27, 2018, 01:30:48 am »
... and at this point I concede defeat.  Apparently others are using Laz/fpc without problem but I can't make it work.

440bx

  • Hero Member
  • *****
  • Posts: 1994
Re: SIGSEGV - yet another one.
« Reply #21 on: November 27, 2018, 02:42:07 am »
... and at this point I concede defeat.  Apparently others are using Laz/fpc without problem but I can't make it work.
The problem is, there is something in your machine configuration that is preventing the debugger from terminating.  Finding out what that is in a system that is loaded with a bunch of stuff as yours is, is no picnic but, here is something you can do if you are inclined to having a working FPC/Lazarus installation and possibly eventually figuring out what is causing the problem.

This is what you do:

1. Use VM software.  VirtualBox, VMware workstation or whatever else you like that works.
2. Create a _clean_ Windows installation in the VM. (install _nothing_ other than a minimal Windows installation)  (Make a clone of that installation, it will be useful in the future.)
3. Install FPC/Lazarus in the VM.
4. Test that installation.  Odds are quite good, it will work.

5. if you'd like to figure out what in your current system is causing the problem, proceed as follows:

6. Take a snapshot of the VM you can revert back to anytime you want
7. Install _one_ piece of software that is currently in your physical system into the VM.
8. Test your FPC/Lazarus configuration.
9. if it still works, repeat the process from step 6 until something breaks the installation. 

Once your installation breaks, revert to the previous snapshot, verify things work as they should, reinstall whatever caused the installation to break and see if it breaks it again (it likely will).  At that point, you know the culprit for a fact.

The above, in addition to allowing you to find the culprit, gives you a VM where things work, with a set of snapshots you can revert back to anytime you want and you can clone anytime. 

The "moral" of the story is, don't install software on the O/S that manages the physical hardware.  Always install software in a VM, that way the O/S that manages the hardware isn't getting saddled with a bunch application garbage.  Most important, don't ever, ever access the internet from the O/S on your physical machine.  Access the net only from a VM (one or more) dedicated to that.  That way, when they get screwed up (and they will), you can revert to a previous clean snapshot.

VMs make life much easier by making disposable O/S installations while keeping the one installation that really counts (that is, the one that manages your hardware), clean.

HTH.

FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

creaothceann

  • Full Member
  • ***
  • Posts: 109
Re: SIGSEGV - yet another one.
« Reply #22 on: November 27, 2018, 05:17:46 am »
dos prompt  (( My age is telling, yes?? ))
Yes, it's a console window :)

aljones

  • New Member
  • *
  • Posts: 14
Re: SIGSEGV - yet another one.
« Reply #23 on: November 27, 2018, 03:45:41 pm »
dos prompt  (( My age is telling, yes?? ))
Yes, it's a console window :)

To you it might be a console window, to me it's a dos prompt.  :)  Or, maybe if I'm in a generous mood, it's a system prompt ...  It's interesting that the way terminology over the years has changed.

aljones

  • New Member
  • *
  • Posts: 14
Re: SIGSEGV - yet another one.
« Reply #24 on: November 27, 2018, 03:54:05 pm »
@440bx  Oh, I quite agree that it's something on my system that's the culprit.  I installed Lazarus on my old, slow laptop and it ran without a hitch.  Simple program ran 5 or 6 times without a SIGSEGV and oddly, much of the same software is installed there as here.  Same AntiVirus which I expected to be the culprit ... to put a resolution to this, I might continue primarily for someone else who wanders into this 'bug.'

I've tried to do some VB development on the laptop and end up making coffee while something compiles ... not, emphatically NOT a place I want to do any real development. 

I have a VBox set up as I'm following the work being done on REACTOS - it's an interesting attempt to bring a free Windows clone to life and one of the better attempts I've seen.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3826
  • I like bugs.
Re: SIGSEGV - yet another one.
« Reply #25 on: November 27, 2018, 08:32:09 pm »
The "moral" of the story is, don't install software on the O/S that manages the physical hardware.  Always install software in a VM, that way the O/S that manages the hardware isn't getting saddled with a bunch application garbage.  Most important, don't ever, ever access the internet from the O/S on your physical machine.  Access the net only from a VM (one or more) dedicated to that.  That way, when they get screwed up (and they will), you can revert to a previous clean snapshot.
It may be true for Windows. A rolling Manjaro Linux however appears to work on physical hardware for years without problems or slowdowns. Recommended.
I have a passively cooled ASRock Beebox with Celeron N3000 as my main computer. It still feels quick and snappy.

To you it might be a console window, to me it's a dos prompt.  :)  Or, maybe if I'm in a generous mood, it's a system prompt ...  It's interesting that the way terminology over the years has changed.
Terminology has changed because DOS is there no more. Yes, Windows was built on top of DOS a long time ago but things have improved.
Mostly Lazarus trunk on Manjaro Linux.

aljones

  • New Member
  • *
  • Posts: 14
Re: SIGSEGV - yet another one.
« Reply #26 on: November 27, 2018, 08:45:13 pm »
Excuse an old man who doesn't mean any disrespect but DOS is still around - remember that it stands for "Disk Operating System" and unless I miss my guess, you're probably booting a DOS system.....

and, yes, I remember booting a computer from a cassette (just like the cassettes we all carried in our Walkman's) - that was an older Burroughs system but 'state of the art' at the time.  Now if that doesn't make your day - try booting a computer from a deck of Hollerith cards ...  I've done that a few (thousand!) times - that was an old IBM-360 that did transfer control to the disk packs after it was booted.

I'll take any "DOS" any day .....
« Last Edit: November 27, 2018, 08:52:33 pm by aljones »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3826
  • I like bugs.
Re: SIGSEGV - yet another one.
« Reply #27 on: November 27, 2018, 08:52:06 pm »
Excuse an old man who doesn't mean any disrespect but DOS is still around - remember that it stands for "Disk Operating System" and unless I miss my guess, you're probably booting a DOS system.....
No. I am booting Linux. :)
DOS exists, true, but Windows is not built on top of it any more. Windows 98 or ME was the last one to have DOS.
Mostly Lazarus trunk on Manjaro Linux.

aljones

  • New Member
  • *
  • Posts: 14
Re: SIGSEGV - yet another one.
« Reply #28 on: November 27, 2018, 08:54:07 pm »
No, you're booting a DOS - You are in fact booting a Disk Operating System ... pedants beware!!

The term DOS was generically used by any of the computer manufacturers before Microsoft seemed to usurp the term.  Most of the very early PC's type computers (Apple, CBM, Atari, etc) did NOT boot from disk.  Some were based in RAM and some were cassette loaded before they adopted a DOS based system (or went out of business).  (Note my use in that last sentences does NOT refer to MS's DOS but to ANY DOS!)
« Last Edit: November 27, 2018, 09:02:44 pm by aljones »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3826
  • I like bugs.
Re: SIGSEGV - yet another one.
« Reply #29 on: November 27, 2018, 09:44:38 pm »
The term DOS was generically used by any of the computer manufacturers before Microsoft seemed to usurp the term.
Ok, I did not remember that meaning for the term.
Mostly Lazarus trunk on Manjaro Linux.

 

TinyPortal © 2005-2018