After the crash with no evidence of debugger/webapp.exe errors, system restart required (event error on ucrtbase.dll)

unable to re-run the application.exe or the debugger of xojo then the crash without evidence of debugger or webapp errors

to be able to continue using debug or application you need to reboot the system

Strange behavior of application executable and ide / debugger after using prepared statmen created an undetectable error and the application or debugger crashed.

I use a mySql db and I use the prepared statements to check the validity of a username and password with the following code

mp = Session.dbMysql.Prepare (“select * from tblUsers where user =? and psw =?”)
mp.BindType (0, MySQLPreparedStatement.MYSQL_TYPE_STRING)
mp.BindType (1, MySQLPreparedStatement.MYSQL_TYPE_STRING)
mp.Bind (0, txtUser.Text)
mp.bind (1, txtPsw.Text)
try
rs = mp.SelectSQL
if rs <> nil and rs.Column (“id”). Value <> nil then
'… go to main webPage
else
MessageBox “Wrong user or psw”
exit sub
end if

Catch eerrrr as RuntimeException
MessageBox eerrrr.Message
'…the error is not caught and this piece of code is not executed
end Try

if I pass in parameter 0, user (ie I insert in txtUser.text) the value “a%” or “b%” or any value followed by %
and I pass in parameter 1, psw (i.e. I insert in txtPsw.text) the value “%”

both the executable of the webApp and the ide / debugger of xojo (I’m talking about the 2021r1.1 ) crash but without showing any errors.
THE MOST PROBLEMATIC THING IS THAT THE SYSTEM WILL BE RESTARTED BECAUSE BOTH THE WEBAPP AND THE DEBUG / IDE WILL NO LONGER RUN THAT PROJECT / EXECUTABLE

going to look in the log of events, to understand what happens I notice that there are events of this type

  • 1000 0 2 100 0 0x80000000000000 6258 Application PCLenovoJury
  • DebugAPPTEST.exe 1.0.0.42 00000000 ucrtbase.dll 10.0.19041.789 2bd748bf c0000005 0000000000025f31 12ac 01d74888805d16bb C: \ xojo \ PROGET ~ 1 \ INSTAL ~ 1 \ DEBUGI ~ 1 \ DebugAPPTEST.exe C: \ WINDOWS \ System32 \ ucrtbase.dll 09013675-7048-4e32-86db-22d827785557

but from now on it will be impossible to reopen the webapp or execute its code in the xojo ide

Has anyone noticed similar things and knows how to prevent errors of this type, which however do not seem manageable?

Did you get to the bottom of this Jury?

No

What version of Xojo are you using here?

2021r1.1

As you step through the code does it crash on rs = mp.SelectSQL ?

rs = mp.SelectSQL

running this line creates the crash

Could you do me a quick favour and on the line just before

mp = Session.dbMysql.Prepare (“select * from tblUsers where user =? and psw =?”)

Could you close and reconnect to the database just to make sure its not a previously known (and maybe missed fixed) bug?

Tried, it crashes even if before the line I close and reopen the db

Thanks for trying, are you able to replicate this in a brand new tiny project with just two controls for the text input and the database code?

not now but yes, as soon as I can I do it to you

Thanks, I look forward to it, if we don’t get anywhere, I’ll try to reproduce it here.

1 Like

The debuger has many problems, I had some issues like that when trying to debug a second web app while already debugging another one.

When the debugger crashes (happens a lot), leaves behind some orphaned processes, this locks the executable file preventing the IDE deleting it and compile a new one to debug (yup, crapy design, never tells you that there is a problem creating the file, it just silently fails)

Instead of restarting the PC, try to just kill those processes.
image

As for the bug, it is better if you can reproduce it in a sample proyect and share it, that way you could have more answers from other users.

By the way, it is a shame to see that the staff have the time to go and praise at the moderator that lock a complaing thread but not the time to give you actual support to avoid the complains in the first place:

:roll_eyes:

3 Likes

it seems that xojo web 2 is very tricky with text encodings.
take good care that all the string you send back to the xojo web kernel are utf8
or you may get big crashes.

1 Like

Also because now the excuse of contacting engineers privately no longer holds up. Every time I write to them privately or on the forum the answer is “we’ll see what we can do” and then months/years go by…

2 Likes

Ciao Jury, visto che stai usando la versione 2021r1 potresti provare ad utilizzare la versione del bind delle api 2.0. Trovi la documentazione qui. Ti basterà passare come parametro un vettore di Variant al comando SelectSQL.

1 Like

grazie mille , provo

1 Like