Recent

Author Topic: Program lock up  (Read 3241 times)

user5

  • Sr. Member
  • ****
  • Posts: 357
Program lock up
« on: June 18, 2018, 03:51:33 am »
    On one occasion I stretched the bottom border of a Lazarus program page down into the task bar area of the computer screen and when I released the border that page and the whole program it was a part of locked up so bad that I had to use the Task Manager to shut the main program down. It was as if the program was lost in an unescapable loop but I know that no loop was running. This problem has never happened again but it's particularly disturbing because it apparently has nothing to do with the program code which unfortunately means that there's nothing I can change to fix it. That page worked fine after the main program was restarted.
    Perhaps it was just a fluke, one-time event. I don't expect that this odd problem will ring a bell with anyone but I have to ask just in case it's happened to someone else.
    If it ever happens again but I still can't find the solution then one thing I could do which I've done on other occasions would be to make a separate program out of that page. That way, if it ever locks up again then at least it could be shut down without needing to shut down the main program. It would be better to understand what happened. I'm using Windows 10 and Lazarus 1.0.10. All praise to Lazarus.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Program lock up
« Reply #1 on: June 18, 2018, 04:36:33 am »
Was it a program created using Lazarus or the Lazarus itself? I never experienced such the thing you mentioned. But I remember the older versions of Lazarus were buggy. Your Lazarus IDE is very old, you should the use newer versions. Many features have been added, less bugs and more stable. Maybe the bug you experienced is already fixed too.

Thaddy

  • Hero Member
  • *****
  • Posts: 14213
  • Probably until I exterminate Putin.
Re: Program lock up
« Reply #2 on: June 18, 2018, 11:54:00 am »
Indeed the Laz version is very old! And do not forget to use the latest FPC version as well. (3.0.4) that makes it also easier to give you support. Old cars may drive but often fail. New cars have likely less issues.
Specialize a type, not a var.

user5

  • Sr. Member
  • ****
  • Posts: 357
Re: Program lock up
« Reply #3 on: June 18, 2018, 06:47:58 pm »
    The page I mentioned was part of a program compiled by Lazarus, not a Lazarus editor page. The program was originally built on a Windows XP machine with Lazarus1.0.10 and after some adaptation changes the program runs fine on Windows 10.
    I moved all of the program code to the Windows 10 machine, installed Lazarus1.8.4, installed three component packages and then loaded the program into Lazarus.
    When I tried to compile the program I got an error message reading: Error: Identifier not found "IrsUnableToCreateConfigDirectory5". The Source Editor opened and a highlighted line in winlazfileutils.inc (line 467) read: raise EInOutError.Create(Format(lrsUnableToCreateConfigDirectory5,{Result]));
    I have tried several times to compile this program with Lazarus1.2.0 but it just won't work because of some incompatibility somewhere along the line. I guess that I'm stuck with using Lazarus1.0.10 for this program.
    I wouldn't have thought that this would be true. I would have thought that any program compiled on an old version of Lazarus would compile on a newer version (Write once... Compile Anywhere) regardless of the operating system used.
    This problem could have something to do with paths... The program compiles and builds fine when I use Lazarus1.0.10 on the Windows 10 machine but even then it won't run from the compiler because (I think) there is a space in the user name for this computer! It seems that Lazarus is unable to establish a path because of that space and to remove that space in the user name would be a lot of trouble and work. Thanks.

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Program lock up
« Reply #4 on: June 18, 2018, 06:51:53 pm »
Paths must be quoted.. to avoid that 'space' problems.

Edit: config should be in a writable directory, even better on Windows in %AppData% of your application.

Try GetConfigDir function.
« Last Edit: June 18, 2018, 06:54:34 pm by lainz »

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: Program lock up
« Reply #5 on: June 18, 2018, 10:32:33 pm »
    When I tried to compile the program I got an error message reading: Error: Identifier not found "IrsUnableToCreateConfigDirectory5". The Source Editor opened and a highlighted line in winlazfileutils.inc (line 467) read: raise EInOutError.Create(Format(lrsUnableToCreateConfigDirectory5,{Result]));

Is that the only error you received?
What folder or folders is the application trying to create?
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

user5

  • Sr. Member
  • ****
  • Posts: 357
Re: Program lock up
« Reply #6 on: June 18, 2018, 11:26:43 pm »
    Yes, the errors I included in my last message were all the error messages that I got. I don't know what you meant when you mentioned folders. I wasn't running any application other than Lazarus. The error messages appeared when I tried to compile a Lazarus project. I'm familiar with the necessity to sometimes include quotes but I don't know where to put them.
    The path to the folder where the project (.lpi) file resides is something like: C:\Users\John Doe\Desktop\bin25\project1.lpi
    I've always wanted to remove that space in the path but my research indicates that isn't easy to do in Windows10. It's no big deal to do that in WindowsXP.

    Aside from the compiler problem, I was able to recreate the border sizing lockup problem and have instituted some quick, easy temporary fixes that prevent any program lockups but the original problem remains unsolved. Alphablend doesn't seem to have anything to do with it.
    What I really need is some way to prevent any form border from being stretched into the computer screen task bar area. There is one forrm in the program that won't stretch into the task bar area but I can't find any difference between it and the other forms. Thanks again.

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Program lock up
« Reply #7 on: June 19, 2018, 12:20:25 am »
Ok, the folder thing is because your second message, I understood that it was your program, not Lazarus.

Maybe its the FPC Config or IDE Config that can't be created in that folder.. or even the binary of your application itself.

Move it to somewhere else with no spaces in the path.
« Last Edit: June 19, 2018, 12:22:30 am by lainz »

 

TinyPortal © 2005-2018