Ok, so now I am back. After a few years absence from Xojo, even from coding itself I have to update an App I wrote and compiled in 2011 with RB 2011r3. Since then it has been running without any bigger problems. Basically it is a networked desktop app with a cubeSQl database. So I bought a new license and started working. I want to compile for linux 64bit.
After resizing almost the complete UI due to bigger controls in 2018r11 I started a test run. Wow, worked. This is a big relief at first.
But: there is some code using the Reportviewer that works flawlessly in the old IDE but now hangs forever. I debugged the relevant piece of the app and got down to this pece of code:
[code]Dim sql as string
sql = "SELECT * FROM Heimbewohner WHERE UPPER(HB_key = " + str(App.SeekID) + “)”
dim rs as RecordSet = ServerDB.AppDB.SQLSelect(sql)
wndMain.HB_Geburtstag = rs.Field(“Geburtsdatum”).DateValue.ShortDate
rs.Close
sql = “SELECT * FROM Heimbewohner,Krankenkassen WHERE UPPER(Heimbewohner.HB_key = " + str(App.SeekID) + " AND Heimbewohner.KK_key = Krankenkassen.KK_key)”
rs = ServerDB.AppDB.SQLSelect(sql)
if rs <> Nil then
if rs.Field(“KK_Name”) <> Nil then
wndMain.HB_KK_key = rs.Field(“KK_Name”).StringValue
else
wndMain.HB_KK_key = “”
end if
else
wndMain.HB_KK_key = “”
end if
rs.Close
// Display search
Dim ps As New PrinterSetup
Dim rpt As Report
sql = “SELECT Medi_Name, Dosierung,MediArt,abgesetzt FROM Medikationen WHERE (HB_key = " + str(App.SeekID) + " AND MediArt <> ‘Hilfsmittel’ AND NOT abgesetzt) ORDER BY MediArt DESC”
rpt = New Rep_Begleitschein
rs = ServerDB.AppDB.SQLSelect(sql)
If rs = Nil then
beep
MsgBox “No medication found”
wndRepVorsch.Close
else
If rpt.Run( rs, ps ) Then
//copy the report to the ReportViewer for preview
if rpt.Document <> Nil Then
ReportViewer1.SetDocument( rpt.Document )
End If
End If
End If [/code]
It runs down to the line ‘If rpt.Run( rs, ps ) Then’ and hangs there forever. I can’t even press the stop button of the IDE to stop the debugger. I have to kill the window of the running app to get back to my xojo IDE. The system looks it is waiting for something to happen. Looks like the report viewer examples of the IDE don’t work either. If I choose Examples - Printing and reporting - all the examples stop at the same point where they should actually display data.
If you stop the program right before this line and look at the variables they all have the content they should have… Once again - the same code works on 2011r3 and displays in an instant - even over a openvpn connection.
I’m out of ideas here - maybe there is someone with more knowledge who at least can point me in the right direction
I thought about that and tried 2017r2.1. But the project has been saved with 2018r11 and 2017r3 says this could lead to serious errors… Hope I can dig out some older copies of my project.
The warning is normal, and if you didn’t change anything, only save, you may open with older version without the “serious errors”. Then you can save in older version. At least most of the time (from what I read in the forum).
You said you want to compile for Linux, and you said:
Are you running the examples from Xojo for Linux (Windows or Mac)?
I guess you can’t fix your code if the examples are not running on the platform you are working. The examples should run and until someone helps you to find what is the problem (maybe a library missing) then there is no point on trying to change your code.
Sorry I can’t help more, but I’m sure others with more experience will try to help you.
this did not do the trick. I have eliminated all depreceated elements in 2016r3 and have no errors at all left. Code runs in 2016R3 and hangs in 2017r2.1… Analyzing code in 2017r2.1 as well has no errors at all.
thank you for the help. It is greatly appreceated.
Currently I am downloading step by step all the old version to see where it breaks. I am now up to 2016r4.1 and the code is running. Let’s see where it fails. Definitely with 2017r2.1. BTW, aren’t they both 32 bit?
@Dave: Yes, there is a plugin involved (cubeSQL) but this is 32 and 64 bit capable. That shouldn’t be the culprit.
@ Alberto: Yes I use the GasReport example for testing. It works in 2016r4.1 but not in 2017r2.1 - no output on the screen there.
Ok, next step. 2017r1.1 still works. My own code and the GasReport example. GTK-3 for Linux looks like a hot tip. Currently download 2017r2 just to make sure.
I guess something is missing on your Archlinux installation (or not supported). I bet if you can make the GasReport example work in your system, your code will work too.
That’s why I posted the output of ‘ldd Xojo’ for 2018r1.1 in first place. It looks like everything is there that is needed. Due to archlinux being a rolling release distro it could be that something is too new for Xojo. Maybe someone with the knowledge can have a look at the ldd output?
FWIW: Here is the console output while debugging my app (using 2017r2):
code: GLib-GObject-WARNING **: 18:24:13.669: cannot register existing type ‘GdkScreen’
2017r1.1 does not give any of these errors. This is funny, because gtk3 is the same version (3.22.30) in both 32 and 64 bit…
Edit: and yes, as of 2017r2 the GasReport example is not working either…
I see that at minimum GTK+ 3.4.1 is needed for Xojo.
I see the latest stable version 3.22.30 from 2018-04-16, so you have the latest.
Maybe someone else with other Linux installation with GTK+ 3.22.30 could tell you if the GasReport example works. Or you can install a VM with one of the Linux that Xojo support to see what GTK+ they use.
For the errors that you get, it looks like GDK has some issues and I read it is part or at least should be installed with GTK.
Thank you Tim, can you check the GTK+ version to see if it is 3.22.30?, Archlinux is using that version, so Heinrich can keep looking where the problem is.
Note: I know Archlinux is not one from the list that Xojo supports, just trying to confirm if newer GTK+ could present some problems.