Robert Valentino Well-Known Member Licensed User Longtime User Yesterday at 4:58 PM #1 I have a class called cCards that has a type structure called sCARD Code: Copy Type sCARD(Width As Int, Height As Int, Card As Long, CardBitmap As B4XBitmap) All the code works fine normally but when I go to debug into some of the routines (this is one of them) Code: Copy Public Sub IsSuitHearts(xCard As Object) As Boolean Dim CheckCard As Int If xCard Is sCARD Then CheckCard = xCard.As(sCARD).Card Else CheckCard = xCard End If Return Bit.And(CheckCard, cCARDS_CARDSUIT_HEARTS) = cCARDS_CARDSUIT_HEARTS End Sub I get the follow crash when I get to the if xCard is sCARD I tried moving the Type definition from the cCards class to the b4xmainpage class but still get the crash. IF I am not stepping into the code everything works perfectly NOW, days ago this wasn't happening. It just started happening and I cannot figure (other then getting rid of sCARD how to fix it. BobVal PS: the crash is happening on the line If xCard Is sCARD Then
I have a class called cCards that has a type structure called sCARD Code: Copy Type sCARD(Width As Int, Height As Int, Card As Long, CardBitmap As B4XBitmap) All the code works fine normally but when I go to debug into some of the routines (this is one of them) Code: Copy Public Sub IsSuitHearts(xCard As Object) As Boolean Dim CheckCard As Int If xCard Is sCARD Then CheckCard = xCard.As(sCARD).Card Else CheckCard = xCard End If Return Bit.And(CheckCard, cCARDS_CARDSUIT_HEARTS) = cCARDS_CARDSUIT_HEARTS End Sub I get the follow crash when I get to the if xCard is sCARD I tried moving the Type definition from the cCards class to the b4xmainpage class but still get the crash. IF I am not stepping into the code everything works perfectly NOW, days ago this wasn't happening. It just started happening and I cannot figure (other then getting rid of sCARD how to fix it. BobVal PS: the crash is happening on the line If xCard Is sCARD Then
Erel B4X founder Staff member Licensed User Longtime User Today at 7:48 AM #2 Sounds like a debugger issue. 1. Can you post the full error message from the logs (right click to copy)? 2. Does it work properly in release mode? Upvote 0
Sounds like a debugger issue. 1. Can you post the full error message from the logs (right click to copy)? 2. Does it work properly in release mode?