Author Topic: Windows vs Linux version No error trap activated . Must I use different code?  (Read 2937 times)

0 Members and 1 Guest are viewing this topic.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Hy Guys
I have already met this issue: the same code has different result in different OSes,

for example
1. my child windows demonstration have an issue in the Linux version pointed out by keybone  (see here https://www.qb64.org/forum/index.php?topic=2124.msg114479#msg114479) and that I have verified on my VirtualBox Lubuntu 14 6.

2. my Simple Game engine 2D (see here https://www.qb64.org/forum/index.php?topic=2361.msg115818#msg115818) has a strange issue about Handle of images, so running the compiled program I get "Invalid Handle on line...." where is a _PUTIMAGE using the handle got before by a _LOADIMAGE and verifying the result with IF THEN before to try to load the image... Also putting "./" at start of string of path of the file image the results are the same.

3.
Smart Snake of Bplus  crashes quickly under running in my Lubuntu 14 in emulation, but the issue has been pointed by [banned user] that uses another linux, while the version used by Ashish runs well (see here https://www.qb64.org/forum/index.php?topic=2348.msg115887#msg115887).

So for a language multiplatform and not crossplatform we must establish if there are different rules to use programming in different OSes or if mustn't  QB64 coders  have this issue to solve and can they go to write and then compile in different OSes without any problem.

Thanks to read
Thanks to talk about
Programming isn't difficult, only it's  consuming time and coffee

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
I run with Linux Mint 19.2 and had a couple of "Invalid handles" with your rpg engine.

Turned out to be filename references. Line 117. The "bg" directory is "BG" and the filename "bg.png" is "BG.png"

Had the same problem in line 125. The "idle" character. Filename uses capital "I"... The same for "Walk" and "Jump" filenames.

As you know, Linux is VERY choosy, about file locations and filenames. "My" rule of thumb is to keep everything lowercase.

After those mods the engine ran very well. Great Job!
Logic is the beginning of wisdom.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Thanks Johnno56
You stated a first rule to avoid problems while we code both for Windows both for Linux

All path in the code and All files and folders used into the program must be written in LowerCase!

Thanks to fix my issue for The simple 2D engine demonstration.
Programming isn't difficult, only it's  consuming time and coffee