Upgrading an app from 2011r3 to 2018r11

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

Greetings
Harvey

Try hitting some of the intervening Xojo releases to see where it breaks.

I would go with 2012r2.1, then 2013r3, then 2016r3, and finally 2017r3.

You can download these from the Archived Versions after logging into your account.

Tim,

thank you for your input.

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.

Greetings
Harvey

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).

Ok, so I went down the road and R2016r3 runs my code without error. What now?

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.

It is a little difficult to view the system requirements for Xojo as they only define supported distributions.

FWIW, here’s the output of ‘ldd Xojo’ for 2018r1.1

[quote]root@gruenix /opt/xojo # ldd Xojo
linux-vdso.so.1 (0x00007ffc9a7ad000)
XojoGUIFramework64.so => /opt/xojo/./Xojo Libs/XojoGUIFramework64.so (0x00007f6ae25de000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f6ae2222000)
libgtk-3.so.0 => /usr/lib/libgtk-3.so.0 (0x00007f6ae1913000)
libgdk-3.so.0 => /usr/lib/libgdk-3.so.0 (0x00007f6ae161e000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00007f6ae13f8000)
libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007f6ae1058000)
libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f6ae0e4b000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f6ae0c27000)
libcairo-gobject.so.2 => /usr/lib/libcairo-gobject.so.2 (0x00007f6ae0a1e000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f6ae07d7000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f6ae04b4000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f6ae0260000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f6adff49000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f6adfc0a000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f6adf875000)
librt.so.1 => /usr/lib/librt.so.1 (0x00007f6adf66d000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f6adf469000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007f6adf267000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f6adf049000)
libunwind.so.8 => /usr/lib/libunwind.so.8 (0x00007f6adee2f000)
libunwind-x86_64.so.8 => /usr/lib/libunwind-x86_64.so.8 (0x00007f6adec10000)
libc++.so.1 => /opt/xojo/./Xojo Libs/libc++.so.1 (0x00007f6ade85f000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f6ade647000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f6ae4a44000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007f6ade443000)
libXi.so.6 => /usr/lib/libXi.so.6 (0x00007f6ade232000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f6ade02c000)
libatk-bridge-2.0.so.0 => /usr/lib/libatk-bridge-2.0.so.0 (0x00007f6adddfa000)
libepoxy.so.0 => /usr/lib/libepoxy.so.0 (0x00007f6addacd000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f6add8b9000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f6add676000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007f6add473000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007f6add268000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00007f6add05e000)
libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x00007f6adce5b000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f6adcc58000)
libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0x00007f6adca19000)
libwayland-cursor.so.0 => /usr/lib/libwayland-cursor.so.0 (0x00007f6adc811000)
libwayland-egl.so.1 => /usr/lib/libwayland-egl.so.1 (0x00007f6adc60f000)
libwayland-client.so.0 => /usr/lib/libwayland-client.so.0 (0x00007f6adc400000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f6adc1ee000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f6adbfd7000)
libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f6adbdc0000)
libmount.so.1 => /usr/lib/libmount.so.1 (0x00007f6adbb68000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f6adb89f000)
libthai.so.0 => /usr/lib/libthai.so.0 (0x00007f6adb695000)
libfribidi.so.0 => /usr/lib/libfribidi.so.0 (0x00007f6adb479000)
libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f6adb1d1000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f6adaf9b000)
libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f6adad97000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f6adab6e000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f6ada960000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f6ada755000)
libffi.so.6 => /usr/lib/libffi.so.6 (0x00007f6ada54c000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f6ada2da000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f6ada0b4000)
libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x00007f6ad9e63000)
libatspi.so.0 => /usr/lib/libatspi.so.0 (0x00007f6ad9c31000)
libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f6ad9985000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f6ad9753000)
libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f6ad954c000)
libblkid.so.1 => /usr/lib/libblkid.so.1 (0x00007f6ad92fc000)
libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f6ad90ec000)
libdatrie.so.1 => /usr/lib/libdatrie.so.1 (0x00007f6ad8ee5000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f6ad8ce1000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f6ad8adb000)
libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f6ad8851000)
libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f6ad8625000)
liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f6ad8408000)
libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f6ad80ec000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f6ad7ecc000)[/quote]

In my eyes this looks as if all depedencies are fulfilled.

Edit: I am running the examples on the same system I want to compile the code with. Archlinux 64bit with all updates until today installed.

Greetings
Harvey

In the error listing, look what is deprecated and change that prior moving to the recent version.

Detlev,

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.

Hmmm.

Greetings
Harvey

Are there any plugins involved? if so are they 32bit, and you are trying to compile for 64bit?

The Examples - Printing and Reporting, work in 2017r2.1? I think you said they don’t in 2018r1.1, I guess they do work with 2016r3, right?

Folks,

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.

2017r2 introduced GTK3 for Linux (I really don’t know what it is or if that could be the issue)

http://developer.xojo.com/2017r2-release-notes

Edit: I see that you have libgtk-3 already installed.

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.

Is Archlinux based on one of the distributions that Xojo support?

Check the Linux section for 2017r2: http://developer.xojo.com/system-requirements-2017r2
and for the latest Xojo version: http://developer.xojo.com/system-requirements

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’

(DebugMedikamentenverwaltung:4067): GLib-CRITICAL **: 18:24:13.669: g_once_init_leave: assertion ‘result != 0’ failed

(DebugMedikamentenverwaltung:4067): Gdk-CRITICAL **: 18:24:13.669: IA__gdk_screen_get_width_mm: assertion ‘GDK_IS_SCREEN (screen)’ failed
[/code]

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.

I hope you can make it work. Good luck.

I just ran the GasReport project using 18r1.1 under a bone stock CentOS 7.5 installation and it runs as expected.

Of course, the Adwaita theme is playing havoc with button sizes, but everything - including printing - works.

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.

Edit: I think GTK+ on CentOS 7.5 is 3.22.26 (info from this package mirror)

It’s gtk3-3.22.26-4.el7_5.x86_64.

I’ll also check an Arch install (may take longer since you have to manually install everything with pacman.