wxDirDialog and Linux

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
skelly
In need of some credit
In need of some credit
Posts: 9
Joined: Thu May 12, 2005 4:35 pm
Location: Massachusetts, U.S.A.

wxDirDialog and Linux

Post by skelly » Mon Jul 18, 2005 10:32 pm

wxDirDialog gives me a permission denied error when I specify a default directory. This occurs on wxX11 and wxGTK, but not wxMSW. On wxGTK, this apparently causes a free() error later on (I do not know why yet), but not on wxX11. Another odd thing is that this permission denied error only occurs on the first dialog creation.

I have found references to an error just like this in the mailing list archives, but could not find a resolution. I may try using the wxFileDialog instead. I see that the wxFileDialog is native, but the wxDirDialog for wxGTK uses the common dialog.

leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Re: wxDirDialog and Linux

Post by leio » Mon Jul 18, 2005 11:32 pm

skelly wrote:wxDirDialog gives me a permission denied error when I specify a default directory. This occurs on wxX11 and wxGTK, but not wxMSW. On wxGTK, this apparently causes a free() error later on (I do not know why yet), but not on wxX11. Another odd thing is that this permission denied error only occurs on the first dialog creation.
Difference between wxX11 and wxGTK there are curious, especially if wxGTK has problems that wxX11 doesn't. That all cause wxDirDialog is the same generic one for both ports as you too state below.

Are you capable of providing a bug report with a little patch to one of the samples that will reproduce the problem? (If a patch is needed at all, but I haven't experienced this problem).

I'd be willing to take a look. And I'd be maybe also willing to implement wxDirDialog natively on wxGTK if well motivated ;) Though I think the API is a pain for that, as usual - but would see then better.
skelly wrote:I have found references to an error just like this in the mailing list archives, but could not find a resolution. I may try using the wxFileDialog instead. I see that the wxFileDialog is native, but the wxDirDialog for wxGTK uses the common dialog.
Personally I don't understand why are wxFileDialog and wxDirDialog a different class at all.
As for wxFileDialog being usable for your case - I'd doubt that based on my memory from the time I reimplemented wxGTK's native wxFileDialog a couple months back to get rid lots of problems (made it into version 2.5.5).
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/

skelly
In need of some credit
In need of some credit
Posts: 9
Joined: Thu May 12, 2005 4:35 pm
Location: Massachusetts, U.S.A.

Re: wxDirDialog and Linux

Post by skelly » Tue Jul 19, 2005 4:08 pm

leio wrote:Difference between wxX11 and wxGTK there are curious, especially if wxGTK has problems that wxX11 doesn't. That all cause wxDirDialog is the same generic one for both ports as you too state below.
I've noticed that although they both give a permission denied message, only wxGTK displays this in a message box, while wxX11 simply sends it to stdout. My guess is that the free() error has something to do with this message box. I'm not very experienced with debugging in linux. I might try to hunt this pointer down, but it doesn't seem worth it at this time.
leio wrote:Are you capable of providing a bug report with a little patch to one of the samples that will reproduce the problem? (If a patch is needed at all, but I haven't experienced this problem).
No patch was needed for the dialogs sample. The denial is always for /usr/share/mimelnk/audio/x-ms-wax.desktop. The default directory is the user home directory via wxGetUserHome(). Why this dialog needs to look down the /usr tree when I'm asking for something under /home is beyond me.

I suppose I could submit a bug report. I never have before. I guess I always assume that it's my fault and not wxWidgets'.
leio wrote:I'd be willing to take a look. And I'd be maybe also willing to implement wxDirDialog natively on wxGTK if well motivated ;) Though I think the API is a pain for that, as usual - but would see then better.

Personally I don't understand why are wxFileDialog and wxDirDialog a different class at all.
As for wxFileDialog being usable for your case - I'd doubt that based on my memory from the time I reimplemented wxGTK's native wxFileDialog a couple months back to get rid lots of problems (made it into version 2.5.5).
I'd a appreciate a look at a native implementation, but I don't think it is that important. My current layout requires a directory choice, but it won't be that big of a deal to replace it with a file choice. However, other developers may not have such an option and it is rather annoying not being able to use a dialog as common as this.

I should have mentioned earlier that I'm using wxWidgets 2.6.1, gtk+ 2.6.8-1 and linux kernel 2.6.10 (Mepis 3.3).

wxX11 vs wxGTK is rather funny to me. I have had far more trouble with wxGTK, yet it's wxX11 that is labeled "beta".

leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Re: wxDirDialog and Linux

Post by leio » Tue Jul 19, 2005 4:27 pm

skelly wrote: No patch was needed for the dialogs sample. The denial is always for /usr/share/mimelnk/audio/x-ms-wax.desktop. The default directory is the user home directory via wxGetUserHome(). Why this dialog needs to look down the /usr tree when I'm asking for something under /home is beyond me.
Works without problems for me.
wxWidgets CVS HEAD from a couple days ago, gtk+-2.6.8, kernel is 2.6.12-gentoo-r6 (not relevant).
Never seen the problem with earlier versions (including 2.6.1 state of CVS) either.
skelly wrote:wxX11 vs wxGTK is rather funny to me. I have had far more trouble with wxGTK, yet it's wxX11 that is labeled "beta".
I hope you have noted these problems and are capable of reporting them.
And wxX11 is quite unusable if you ask me. wxGTK is the port that is quite complete, while wxX11 has lots of problems and unimplemented classes/methods.
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/

skelly
In need of some credit
In need of some credit
Posts: 9
Joined: Thu May 12, 2005 4:35 pm
Location: Massachusetts, U.S.A.

Re: wxDirDialog and Linux

Post by skelly » Tue Jul 19, 2005 6:25 pm

leio wrote:Works without problems for me.
wxWidgets CVS HEAD from a couple days ago, gtk+-2.6.8, kernel is 2.6.12-gentoo-r6 (not relevant).
Never seen the problem with earlier versions (including 2.6.1 state of CVS) either.
You noted that your linux distribution is irrelevant, but it appears to be the only difference between our setups. When I looked at the permissions of that file, there was no read access except for root. But why should this cause a permission denial when I want a directory listing, especially of a directory in a completely different branch, even a different partition?

It seems to me that there are two (maybe three) bugs here. One is that it gives a denial at all. Konquerer and the console have no problem giving me a directory listing with that file. The second bug is that it attempts to list a directory that I don't care about. The potential bug is the one involving the free() error. That could be my fault, but as I mentioned before, it doesn't occure in wxX11 or wxMSW.
leio wrote:
skelly wrote:wxX11 vs wxGTK is rather funny to me. I have had far more trouble with wxGTK, yet it's wxX11 that is labeled "beta".
I hope you have noted these problems and are capable of reporting them.
And wxX11 is quite unusable if you ask me. wxGTK is the port that is quite complete, while wxX11 has lots of problems and unimplemented classes/methods.
The only problem I've had with wxX11 is a missing event on wxTextCtrl. Most of the problems I've had with wxGTK are related to wxGlCanvas, which has given me issues in almost every platform I've tried at one time or another, and linking. The linking issues were due to my inexperiece with linux, but none of them occured with wxX11.

I will try to report more bugs in the future. I guess it just feels too official to me. I suppose if I'm wrong and it's all my fault someone will just delete the report. What do wxWidgets developers look at most, the mailing list or bug reports (I assume this forum least)?

leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Re: wxDirDialog and Linux

Post by leio » Tue Jul 19, 2005 6:50 pm

skelly wrote:I will try to report more bugs in the future. I guess it just feels too official to me. I suppose if I'm wrong and it's all my fault someone will just delete the report. What do wxWidgets developers look at most, the mailing list or bug reports (I assume this forum least)?
I think only ABX and me are residents here, of people who also have CVS access, at least.
I would say sf.net trackers and wx-dev mailing list are your best bets, followed by wx-users mailing-list.
If you are unsure, you could discuss it here of course to make sure it isn't a problem in wx (in other words a problem of yours). But keep in mind that sometimes a problem gets unconfirmed, but if others from this crowd here aren't able to confirm it and it isn't a problem from your part, then it's still a problem (sorry for the messy sentence).

In case of wxGTK problems, you CAN contact me also directly, but I'd prefer that other people familiar with wxGTK, especially Robert as the main guy, could have access to the discussion through some medium.
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/

User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Re: wxDirDialog and Linux

Post by ABX » Tue Jul 19, 2005 6:50 pm

skelly wrote:What do wxWidgets developers look at most, the mailing list or bug reports (I assume this forum least)?
It's something like:

If the problem is urgent and related to current development in CVS Head (some commit destroyed some builds, introduced new bug, there is one day to next release but something serious wasn't fixed etc.) then it's best to report to wx-dev mailing list - that's the place where current development is discussed most and core developers are required to read.

If the bug/patch is related to existing distribution then trackers at sourceforge.net are best - things can be easily prioritized, categorized, commented, assigned to developers etc.

Finally if the submitter is unsure about whether this is a bug or user misunderstanding then wx-users mailing list or wxforum is for discutting it to death (with a note that more wxW core developers read wx-users than wxforum).

Of course that's ideal plan. People (including core developers) mix it in every direction ;-)

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2

Post Reply