Recent

Author Topic: if SelectDirectoryDialog1.Execute then crash...  (Read 13187 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
if SelectDirectoryDialog1.Execute then crash...
« on: July 27, 2011, 07:39:46 pm »
Hello everybody.
I just have recompiled my app from GTK2 to Qt.

But if i ask :

Code: [Select]
if DirectoryDialog1.Execute then...
It crash the application, before DirectoryDialog1 is show  :(

Is there a cure ?  :-\
« Last Edit: July 28, 2011, 10:23:33 pm by Fred vS »
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: if DirectoryDialog1.Execute then crash...
« Reply #1 on: July 27, 2011, 07:56:45 pm »
I assume then DirectoryDialog1 is TSelectDirectoryDialog. I just tried and works well (all properties are default).
Specify your dialog's properties, I will try it.
Lazarus 2.1.0 r61214:62238 FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: if DirectoryDialog1.Execute then crash...
« Reply #2 on: July 27, 2011, 08:13:55 pm »
Hello Mr Blaazen.

Of course it is TSelectDirectoryDialog.

I have the same problem with DirectoryEdit  :-\

Quote
exception de class 'External: SIGSEGV'.

Quote
BF5A52175 movdqa %xmn.....

It appends if i click on the button to change directory.

I have try with a SelectDirectoryDialog original, with no special option, i get the same error.

Does it exist a other component to select directory ?

Thanks
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: if DirectoryDialog1.Execute then crash...
« Reply #3 on: July 27, 2011, 08:31:54 pm »
In which operating system?

Which qt version do you have?

How have you installed the qt4pascal library? Which version of it do you use?

Can you post a gdb backtrack of the crash? (Search for instructions on the wiki about how to create one)

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: if DirectoryDialog1.Execute then crash...
« Reply #4 on: July 27, 2011, 10:38:44 pm »
Hello felipemdc
I use Ubuntu 10.10, installed lazarus-ide-qt4-0.9.30_0.9.30-0_i386.deb, lcl-qt4-0.9.30_0.9.30-0_i386.deb,
from Lazarus download.

Quote
How have you installed the qt4pascal library?

Hum, it part of the deb Qt no ?
Must i install something else ?

PS If i create a new application, with only a SelectDirectoryDialog,
it load without problems.

PS2 Maybe i have to rewrite the code with ShellListView and ShellTreeView (it do not crash in the application) but it is lot of more work... :-X

Thanks
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: if DirectoryDialog1.Execute then crash...
« Reply #5 on: July 27, 2011, 10:53:04 pm »
Quote
Hum, it part of the deb Qt no ?
Must i install something else ?
He means version of "libQt4pas.so" in /usr/lib.
Didn't you download it from here: http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html ?
Lazarus 2.1.0 r61214:62238 FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: if DirectoryDialog1.Execute then crash...
« Reply #6 on: July 28, 2011, 03:52:52 pm »
Hello Mr Blaazen

Quote
He means version of "libQt4pas.so" in /usr/lib.

Does it mean that the user have to install libQt4pas.so if he want to use miXimum compiled with Qt4 ?

Code: [Select]
Didn't you download it from here: http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html ?
No, Is it better ?

I went to the site but, excuse me, the download page is impossible to understand, what must i download, how, ... (why must it be so confused ?  :-X)

If you go on the download part of the site you see :
Quote
Downloads : Refresh your page (F5) if you have link problems
   %) (I have refresh the page, but nothing...)




Code: [Select]
I have try with a SelectDirectoryDialog original, with no special option, i get the same error.

Does it exist a other component to select directory ?

Ouf, i have use Shelltreeview in place of SelectDirectoryDialog and DirectoryEdit1 and it works like charms.
The only thing i have to change is :

Quote
FileListBox1.directory := DirectoryEdit1.Directory 

become

Quote
FileListBox1.directory := ShellTreeView1.GetSelectedNodePath()

Happy that FileListBox1.directory have no problem in Qt otherwise it gonna be a big work to convert it.

Other thing i see : when loading big graphical procedure (like resize form) it works better if i load the procedure with Try... except...end otherwise i get sometimes a "Duplicate ID error"  :-X

By the way, what is that  "Duplicate ID error", is it a problem of allocation or what ? I never get that error with GTK2 (but GTK2 works good only for 1 hour !)

Now my opinion : Qt4 is much more fair than GTK2.
If something goes wrong, Qt crash directly the application.
It is much better for debugging.

I have try miXimum compiled with Qt4 with the worst conditions (full effects in sound + equalizer on, stretching the song, playing the graphics in live motion, resizing form while playing songs, mixing songs each 10 seconds and that for hours.)
Of course i get sometimes "Duplicate error id" in beginning of translation but now, with some application.processmessage and try... except..., it works perfectly and faster that GTK2 (and for day-night long).

Im happy  :P

Many thanks

Thanks
« Last Edit: July 28, 2011, 04:55:22 pm by Fred vS »
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: if DirectoryDialog1.Execute then crash...
« Reply #7 on: July 28, 2011, 07:48:22 pm »
You probably have Qt4pas.so version 2.1 from Ubuntu repositories. If you have problems with it, try another version from mentioned link. There are links below "Downloads" (search for 'V2.4 (Qt 4.5.X, compatible till Qt 4.7.X)' or other, it also depends on your Qt version). I had never problems with dialogs on Qt-lazarus, so I believe it is only wrong combination Qt and bindings.
Lazarus 2.1.0 r61214:62238 FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: if DirectoryDialog1.Execute then crash...
« Reply #8 on: July 28, 2011, 10:19:13 pm »
Hello Mr Blaazen, hello everybody.

Quote
I had never problems with dialogs on Qt-lazarus

Maybe but i prefer to forget Dialogs and im happy with the new combination ShellTreeView-FileListBox  ::)

Now the verdict (i do no talk about the 1 hour problem of GTK2).
I have compiled the same source with GTK2 and Qt.

On the run :

The graphical rendering of Qt is much, much faster than the one of GTK2. (+- 80 % faster).
Really Qt change my view for developing graphics.
GTK2 is much slower vs Win32 (and forget to develop a animation prog with GTK2). Qt can challenge Win32.

And (the most important) Qt is safe and strong. Till now (+-48 hours) miXimum version Qt is working perfectly and fast (miXimum version GTK2 is sleeping for 46 hours already  :-X)

Code: [Select]
You probably have Qt4pas.so version 2.1 from Ubuntu repositories
Yes, maybe...

Is it possible to dynamically load Qt4pas.so, so i can choose a version that i trust, in the directory that i want (/miximum/lib) and incorporate it in the setup ?
Like i do for LibBass.so, the audio lib, (usualy you have to copy it to /usr/lib but i prefer to dynamically load it from /miximum/lib, and so i do not have problems with root protected-folders)

Thanks an bravo to Qt  ;)



« Last Edit: July 28, 2011, 10:28:42 pm by Fred vS »
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: if SelectDirectoryDialog1.Execute then crash...
« Reply #9 on: July 28, 2011, 10:41:00 pm »
Hum, one more question.
If i compile with Qt, do the user need Qt4pas.so installed on his computer to run it ?
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: if SelectDirectoryDialog1.Execute then crash...
« Reply #10 on: July 28, 2011, 10:57:22 pm »
Yes. And of course, your users need Qt4 itself or GTK2 with some Qt appearance. The best is KDE4 based linux distribution but many Gnome based distros have in repositories support for Qt applications.
Lazarus 2.1.0 r61214:62238 FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: if SelectDirectoryDialog1.Execute then crash...
« Reply #11 on: July 28, 2011, 11:06:14 pm »
OK (hope Ubuntu have it by default, it is the most used...)
Then maybe 2 Linux version, one GTK, one Qt
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

DenJean

  • New Member
  • *
  • Posts: 18
Re: if DirectoryDialog1.Execute then crash...
« Reply #12 on: July 29, 2011, 03:26:52 pm »
I went to the site but, excuse me, the download page is impossible to understand, what must i download, how, ... (why must it be so confused ?  :-X)



Thx for the excuses.

Den Jean
Author Download page  ;)

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: if SelectDirectoryDialog1.Execute then crash...
« Reply #13 on: July 30, 2011, 08:16:56 pm »
@ Mijnheer Den Jean. Zeg, it was only my opinion... :-[
If you want complimenten see here:
http://www.lazarus.freepascal.org/index.php/topic,13893.0.html   ::)

By the way i announce you that the new version of miXimum for Linux with Qt is ready to download (Windows and Mac version too).
You can download it here :

https://sites.google.com/site/fiensprototyping/home
« Last Edit: July 30, 2011, 08:33:14 pm by Fred vS »
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs