开发者

Runtime error: 28 out of stack space in Vb 6.0

I am getting out of stack space error while running my VB 6.0 Project.

I understand that Out of stack space means something is continuously pushing data onto the stack and when it gets full the stack has no more space.

Can any one help on how to go about fixing this error?

The problem occurs in the following scenario: I have around 20 Property Get and Set Statements in my code and this problem occurs when my code tries to assign a value (lets say for 9th property)

Public Property Get Language() As String
    Language = m_strLanguage
End Property
开发者_运维百科
Public Property Let Language(ByVal strLanguage As String)
    m_strLanguage = strLanguage
End Property

My code goes in to a recursive loop.


Do you have a logic error that's causing a recursive loop? Have you looked back down the call stack to see why the recursive loop is occurring?


Thanks for your suggestions. You were right . I have fixed the problem and the code is now running fine.

The problem was with how the Let property was set : I have passed the wrong variable which is now corrected.

Public Property Let Language(ByVal strLanguage As String) 
   Language = strLanguage 
End Property 

which made the code to go an recursive loop,

The correct code is:

Public Property Let Language(ByVal strLanguage As String) 
   m_strLanguage= strLanguage 
End Property 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜