Recent

Author Topic: Is this a bug?  (Read 2423 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 3442
    • StrumPract is the musicians best friend
Re: Is this a bug?
« Reply #15 on: January 10, 2025, 08:39:59 pm »
Point is whether this should be reported as a bug,
The first point would be to provide a short demo program that shows the problem.
The code you gave in the first post does not help, we cannot reproduce the error.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

scasparz

  • Jr. Member
  • **
  • Posts: 68
Re: Is this a bug?
« Reply #16 on: January 11, 2025, 12:56:41 am »
Respectfully let me disagree. A short demo will be unable to replicate the problem. Will upload the entire app, besides it is not that big anyway.

A few things you should know:
  • compiled by Laz 4.0 RC2 project runs without issues on every linux platform I have it tested. Good news.
  • standard laz directories backup and lib have been erased due to forum size restrictions. Expect Laz will have them recreated.
  • the backup file that has to be restored is located into the guard subdirectory named appointments.bdb. It is a known bug app does not ensure this is an sqlite3 backup database. Am working on that.
  • critical point is line 1853 in unit USZEdAppointments
  • simply extract directory 08. final and go, AFAIK no need to modify anything
  • if needed, can provide both executables (Laz 3.6 & Laz 4) on chunks of 500kb each, stripped


s

Fred vS

  • Hero Member
  • *****
  • Posts: 3442
    • StrumPract is the musicians best friend
Re: Is this a bug?
« Reply #17 on: January 11, 2025, 01:16:56 am »
  • compiled by Laz 4.0 RC2 project runs without issues on every linux platform I have it tested. Good news.

Yep!  ;D

I did test your zip demo here on  on XUbuntu 24.04 + Lazarus 3.6 + fpc 3.2.2.
It was out-of-the-box, without error.
See video:
https://github.com/user-attachments/assets/ab197d61-1e0b-46f6-bd60-7f79dfc9e900

Anyway, I am happy it works for you too now.

Fre;D
« Last Edit: January 11, 2025, 01:19:30 am by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

scasparz

  • Jr. Member
  • **
  • Posts: 68
Re: Is this a bug?
« Reply #18 on: January 11, 2025, 01:38:52 am »
Thanks for trying and for the video. Have watched it.

However the problem has not been in backing database but in restoring the backup.
Backing db has always been working well.
Will be surprised if restoring will work, been compiled by Laz 3.6.
Then maybe you should give it another run.


s

 

Fred vS

  • Hero Member
  • *****
  • Posts: 3442
    • StrumPract is the musicians best friend
Re: Is this a bug?
« Reply #19 on: January 11, 2025, 01:54:35 am »
However the problem has not been in backing database but in restoring the backup.

Ooops, indeed, there is a problem there.  :-\
https://github.com/user-attachments/assets/4ff1ad43-6b89-4db9-b127-5376b48e1271
« Last Edit: January 11, 2025, 02:19:57 am by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 3442
    • StrumPract is the musicians best friend
Re: Is this a bug?
« Reply #20 on: January 11, 2025, 03:02:22 am »
Allez, the last for tonight.

@scasparz: about this post:
https://forum.lazarus.freepascal.org/index.php/topic,69823.msg543088.html#msg543088

Did you really try it?

Here, with this code it works ok:
https://github.com/user-attachments/assets/82864dc4-f8d1-464c-a83a-f188eafab509

Code: Pascal  [Select][+][-]
  1.  IF MessageDlg(BL_DialogCaption, 'you will lose all current appointments, are you sure?', mtConfirmation, [mbYes, mbNo], 0) = mrYes THEN BEGIN
  2.  
  3.  application.ProcessMessages;
  4.  sleep(100);
  5.  
  6.     VLOC_OpenDialog := tOpenDialog.Create(NIL);
« Last Edit: January 11, 2025, 03:23:23 am by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

scasparz

  • Jr. Member
  • **
  • Posts: 68
Re: Is this a bug?
« Reply #21 on: January 11, 2025, 08:26:52 am »
Have tried ProcessMessages with Form.Refresh.
Did not use Sleep though. Looks Sleep made the difference.
Still IMHO Laz 4.0 RC2 seems a better approach.



s
« Last Edit: January 11, 2025, 08:29:20 am by scasparz »

Fred vS

  • Hero Member
  • *****
  • Posts: 3442
    • StrumPract is the musicians best friend
Re: Is this a bug?
« Reply #22 on: January 11, 2025, 12:09:22 pm »
Have tried ProcessMessages with Form.Refresh.
Did not use Sleep though. Looks Sleep made the difference.
Still IMHO Laz 4.0 RC2 seems a better approach.
s

You are the boss (but I would add it, even using Laz 4.0, for security...).
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

scasparz

  • Jr. Member
  • **
  • Posts: 68
Re: Is this a bug?
« Reply #23 on: January 11, 2025, 04:27:34 pm »
This is a jolly good idea.


s

Fred vS

  • Hero Member
  • *****
  • Posts: 3442
    • StrumPract is the musicians best friend
Re: Is this a bug?
« Reply #24 on: January 11, 2025, 05:24:38 pm »
This is a jolly good idea.

 :D

In fact the problem is the conflict between 2  modal forms: MessageDlg vs VLOC_OpenDialog.
In your code, there is a creation of a modal form by a modal form.

It could be that in some case, the modal-MessageDlg-form is not yet completely freed before creating/show modal-VLOC_OpenDialog-form.
(Your code show one of this case but I did not understand what it is, in my simple test code it works)

To resume better give time to the system to completely finish his work.

My 0.001 cent, of course.
« Last Edit: January 11, 2025, 05:51:03 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

 

TinyPortal © 2005-2018