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 »

环境: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: 126
Joined: Fri Nov 11, 2011 2:45 am
Location: China

Re: wxFSVolume中的bug

Post by kipade »

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

kipade wrote:代码在你手上
你可以单步调试
我没用过win7,至少在xp下是没有问题的
希望你做下进一步的详细调查,再做定论
当然有单步进去过,的确是wx的代码引发的异常,所以我才发出来滴。只要用windows7调试下就知道了
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxFSVolume中的bug

Post by doublemax »

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: 126
Joined: Fri Nov 11, 2011 2:45 am
Location: China

Re: wxFSVolume中的bug

Post by kipade »

真是没想到doublemax还懂中文
不过,这个真和调用方式没关系,一个类实例可以调用类定义过的任何public方法,哪怕它是static修饰
Slackware GNU/Linux x86_64
wxWidgets-3.3.0
ollydbg23
Super wx Problem Solver
Super wx Problem Solver
Posts: 438
Joined: Fri Dec 12, 2008 10:31 am

Re: wxFSVolume中的bug

Post by ollydbg23 »

是啊,我也是很惊奇的发现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 »

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