Robert Valentino Well-Known Member Licensed User Longtime User Saturday 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 Sunday 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?
Robert Valentino Well-Known Member Licensed User Longtime User Yesterday at 8:44 PM #3 Cleared Log (not other message) before single stepping into code Code: Copy An error occurred: (Line: 297) 297 java.lang.ClassNotFoundException: java.lang.b4j.FridayNightPoker.b4xmainpage._scard Code works Perfect in all mode (Debug or Release) In Debug mode the code is fine unless I single step into it and then that's when the crash happens Upvote 0
Cleared Log (not other message) before single stepping into code Code: Copy An error occurred: (Line: 297) 297 java.lang.ClassNotFoundException: java.lang.b4j.FridayNightPoker.b4xmainpage._scard Code works Perfect in all mode (Debug or Release) In Debug mode the code is fine unless I single step into it and then that's when the crash happens
Erel B4X founder Staff member Licensed User Longtime User Today at 5:44 AM #4 If the project isn't too large you can send it to me ([email protected]) and I'll check it. Upvote 0