wxFSVolume中的bug

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
Post Reply
ccnyou
Knows some wx things
Knows some wx things
Posts: 33
Joined: Fri Sep 28, 2012 8:08 am

wxFSVolume中的bug

Post by ccnyou » Sat Jan 05, 2013 2:12 pm

环境:win7 X64 + vs2008sp1 + wxWidgets2.94
测试代码:

Code: Select all

#include <wx/wx.h>
#include <wx/volume.h>

int main(int argc, char* argv[])
{
	wxInitializer initlializer(argc,argv);
	wxFSVolume fsVolume;
	wxArrayString volumes = fsVolume.GetVolumes();
	return 0;
}
异常:wxFSVolumeBug.exe 中的 0x755fb727 处最可能的异常: 0x000006BA: RPC 服务器不可用。
截图:
bug.jpg

kipade
Earned some good credits
Earned some good credits
Posts: 118
Joined: Fri Nov 11, 2011 2:45 am
Location: China

Re: wxFSVolume中的bug

Post by kipade » Sun Jan 06, 2013 2:25 am

代码在你手上
你可以单步调试
我没用过win7,至少在xp下是没有问题的
希望你做下进一步的详细调查,再做定论
Slackware GNU/Linux
wxWidgets-3.0.3

ccnyou
Knows some wx things
Knows some wx things
Posts: 33
Joined: Fri Sep 28, 2012 8:08 am

Re: wxFSVolume中的bug

Post by ccnyou » Fri Jan 18, 2013 8:36 am

kipade wrote:代码在你手上
你可以单步调试
我没用过win7,至少在xp下是没有问题的
希望你做下进一步的详细调查,再做定论
当然有单步进去过,的确是wx的代码引发的异常,所以我才发出来滴。只要用windows7调试下就知道了

User avatar
doublemax
Moderator
Moderator
Posts: 13985
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxFSVolume中的bug

Post by doublemax » Fri Feb 22, 2013 11:53 pm

wxFSVolume::GetVolumes() is a static method.

Try this:

Code: Select all

wxArrayString volumes = wxFSVolume::GetVolumes();
Use the source, Luke!

kipade
Earned some good credits
Earned some good credits
Posts: 118
Joined: Fri Nov 11, 2011 2:45 am
Location: China

Re: wxFSVolume中的bug

Post by kipade » Wed Feb 27, 2013 2:00 am

真是没想到doublemax还懂中文
不过,这个真和调用方式没关系,一个类实例可以调用类定义过的任何public方法,哪怕它是static修饰
Slackware GNU/Linux
wxWidgets-3.0.3

ollydbg23
I live to help wx-kind
I live to help wx-kind
Posts: 188
Joined: Fri Dec 12, 2008 10:31 am

Re: wxFSVolume中的bug

Post by ollydbg23 » Mon Mar 04, 2013 4:13 am

是啊,我也是很惊奇的发现doublemax在这里回复。。。居然懂中文,厉害!!!

ccnyou
Knows some wx things
Knows some wx things
Posts: 33
Joined: Fri Sep 28, 2012 8:08 am

Re: wxFSVolume中的bug

Post by ccnyou » Thu Mar 28, 2013 11:02 am

doublemax wrote:wxFSVolume::GetVolumes() is a static method.

Try this:

Code: Select all

wxArrayString volumes = wxFSVolume::GetVolumes();
there is nothing about static, thanks

Post Reply