News:

Precision Simulator update 10.173 (24 February 2024) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

Elvis needs glasses

Started by Ton van Bochove, Sat, 9 Nov 2019 13:22

Ton van Bochove

Quote from: martin on Sat, 16 Nov 2019 14:07
Hmm, that looks correctly like what you have in your ELVis.ini file...

I give up...
The only thing I can now think of is the suggestion made above and earlier already, namely to put some other path into ELVis.ini and then to see what happens.

UPDATE:
We may have found a suspect...

Instead of really giving up as promised, I had another look at my source code, and found something (embarrassing, to me! :-\).

¤ Could it be that in your ELVIs.ini file there is a blank (space) before the path, as indicated here by _:
     _/Users/tonvanbochove/Desktop/Aerowinx/Layouts

If that is the case, ELVis will not really hang but will pop up the message that he cannot find the folder; but that popup may be hidden behind other windows, and thus create the impression that ELVis has frozen.

If it's really there, please remove that space and try again.
(Note that a space at the end of the line does not matter.)

Let's hope this is the reason...

(Even though it would be a rather stupid mistake on my part. It's not really a bug but bad coding: a leading or trailing space should not matter at all when the path is read in. Probably I was relying, wrongly, on the Operating System(s) to ignore that space, but I did not actually test it... And so far everyone else seems to have avoided any leading spaces in their INI files, so I was never caught out :D)

Cheers,
Martin

I wish I could say  AND THE WINNER IS MARTIN ......but sorry, it did not work  :'(
Ton

Hardy Heinlin

Ton, are you sure you have just one single Elvis program installed? Maybe during the past days you have installed several Elvis copies at different places, and the Elvis ini file you are showing on the forum is perhaps not the ini file you are actually loading when clicking Elvis? I'm just asking to be 100% sure because such things happen to all of us sometimes.


|-|ardy

Ton van Bochove

Yes Hardy I am sure I only have one copy. But I deleted every Elvis on my drive, threw away my Elvis records and started from scratch.....same result
Ton

martin

Quote from: Ton...but sorry, it did not work
But what did not work, and how did it not work?

Here's a "checklist" about what "did not work" might mean here:

A. There is no space before the /Users/....  entry in ELVis.ini ?
     In this case see next post for new ideas of what else could be the problem.

B. As suggested earlier, you tried any other path in ELVis.ini ?
     (a path which has nothing to do with PSX but is definitely known to exist, with full Read/Write access)

B1. ELVis did open the directory to which this path points ?
     In which case you should be able to browse manually to the Layouts folder.

B2. ELVis really did not do or open anything at all and just "froze" without any error message ?
     (make sure not to overlook popups hidden behind other windows).

Stand by for some more in the next post which will be a bit more "technical".

Cheers,
Martin

PS(X) Please do recover your Elvis records from the garbage bin; sacrifices must sometimes be made, but I do not wish to be responsible for going that far! There is a reason why I stick to the correct spelling ELVis (not Elvis) -- precisely to prevent people from blaming the real Elvis or his records, and then throwing them away only because my silly Java program does not work!
:D

martin

It appears that by now my subconscious (if I have one) is also on the case: over night, two more thoughlets hatched, one trivial, one perhaps not (but it's a Mac/Catalina thing, so I cannot say how valid it is.)

1. end-of-line (EOL) markers

Ton had earlier uploaded his ELVis.ini file to Hoppie's website. I had so far viewed it only in the browser, where it looked OK, but now downloaded it for closer examination. In my usual ASCII editor it still looked OK, but that doesn't count because that editor converts some things (e.g. EOL markers) automatically.

But when opened in Notepad, there is a problem: several lines, including the important one, are "fused" :
What should (and must!) be 3 lines
...
# example for Mac (...)
#/users/owright/Desktop/Aerowinx/Layouts
/Users/tonvanbochove/Desktop/Aerowinx/Layouts
...


in Notepad is now 1 line
...
# example for Mac (...)#/users/owright/Desktop/Aerowinx/Layouts/Users/tonvanbochove/Desktop/Aerowinx/Layouts
...


The reason is trivial:
The original ELVis.ini file (as coming in the ZIP archive) was created under Windows, and thus uses the pair CR/LF (0x0D/0x0A) as EOL marker.
But when Ton added his own line on a Mac, only 0x0A is used for EOL, as per Unix standard.
When the resulting file is then transported back into Windows, Notepad (but not my real ASCII editor) does not recognise the critical EOL and thus produces one long line where there should be three.

So far so clear.
But does it really matter? I believe not, but don't know for sure as I don't know the Mac.

¤ If Ton uses a "one-liner", as he did, (just the one active entry, no comment lines), this problem should not exist.

¤ And on a Mac, this "fusing" issue should not exist at all anyway, for both CR/LF and single LF should be OK as EOL markers.
Correct?
Besides, Markus and Hardy seem not to have encountered this issue..

2. Mac / Catalina file system and permissions
Still a pet suspect of mine.

I tried to find a directory on Mac where full user access (Read/Write) is guaranteed, and which could therefore be recommended to be tried in ELVis.ini, instead of /User/<username>/Desktop/... (which I still suspect to be special somehow).
It seems that, as in Unix, there should always be a directory /tmp which I think is a good test case: it's a short and simple path, and I assume (correctly??) that full access here is guaranteed.
So I'd recommend that one for a test.

But in the course of checking this, I also found that Catalina apparently (haven't fully understood/followed up on the details) has introduced some changes in this context which may (or may not) be relevant (and different from standard Unix as I know it):
E.g.
¤ "Catalina introduces a new file system where there is a blend of read-only system files and a read-write user space interleaved on a folder by folder basis." (source)
No idea what exactly this means, but it sounds quite ominous...

¤ Apparently people have (in Microsoft/Windows fashion, one might say...) problems to uninstall certain pre-installed stuff.

¤ And in a list of standard directories under Unix/MacOS (Note: this may be older than Catalina), none of the descriptions sounds as if uninhibited access would be guaranteed, e.g. "/usr: Second major hierarchy, includes subdirectories that contain information, configuration files, and other essentials used by the operating system".

If all this is relevant or not for the ELVis (but not Elvis; he lives!) problem, I cannot say.
But for starters, it would be interesting to hear from Markus or Hardy which path they are successfully using in ELVis.

And now I rest myself case!

Have a pleasant Sunday, everyone*.
Cheers,
Martin

* sorry, couldn't find an Elvis Sunday song, nearest one is this perhaps




martin

Quote from: Hoppiethe dreaded BOM
There is that, too...  :-\

What is the standard encoding on Macs with Catalina? Unicode presumably?
The original ELVis.ini file from the distribution does not have a BOM (it was produced with an ASCII editor under an English Windows) .
And Ton's INI file as downloaded does not have any BOMs either, but of course they may have got Lost in Transportation (upload/download/switching OS).

Cheers,
Martin

Ton van Bochove

QuoteHere's a "checklist" about what "did not work" might mean here:

A. There is no space before the /Users/....  entry in ELVis.ini ?
     In this case see next post for new ideas of what else could be the problem.

B. As suggested earlier, you tried any other path in ELVis.ini ?
     (a path which has nothing to do with PSX but is definitely known to exist, with full Read/Write access)

B1. ELVis did open the directory to which this path points ?
     In which case you should be able to browse manually to the Layouts folder.

B2. ELVis really did not do or open anything at all and just "froze" without any error message ?
     (make sure not to overlook popups hidden behind other windows).

Stand by for some more in the next post which will be a bit more "technical".

A There is no space before the line

B Yes but with the same result ....alleged file etc.

B1 No see B2

B2 Yes in a single window


Quote2. Mac / Catalina file system and permissions
Still a pet suspect of mine.

Catalina could be the culprit......but I can open every program with a Jar. executable except our friend. Others have no problems with ELvis so I would say that is has to do with my particular setup

QuoteWhat is the standard encoding on Macs with Catalina? Unicode presumably?
The original ELVis.ini file from the distribution does not have a BOM (it was produced with an ASCII editor under an English Windows) .
And Ton's INI file as downloaded does not have any BOMs either, but of course they may have got Lost in Transportation (upload/download/switching OS).

Too techie for me but why don't others suffer with the BOM?

My Catalina update was a straight one without any mods , so what could be wrong???



Ton

martin


Thanks for the report, Ton!

Quote from: TonB Yes but with the same result ....alleged file etc

This means that ELVis cannot find any path/directory at all which exists on your Mac. This must be the core problem. But I have no idea how it can be explained. The fact that you do get the "Cannot find alleged folder" message proves however that ELVis is not really freezing abnormally; it just stops and then exits as per design in this situation.

Quote from: Tonbut I can open every program with a Jar. executable except our friend

Not quite correct: You can open and run ELVis just fine! The problem is that ELVis then cannot find the directory which the ELVis.ini file points to, and therefore the program then exits.
This difference is important, because it means you do not have a problem with Java or running the ELVis.jar file, but "only" with correctly reading the directory from ELVis.ini and then opening it.

Quote from: TonToo techie for me but why don't others suffer with the BOM?

Exactly. The BOM is a very unlikely culprit anyway (just grabbing at straws here); as with the other issues, it cannot really be the cause, for others on Mac/Catalina don't have these difficulties. So it must indeed be something special in your setup (but not with Java or JAR files, see above; rather some problem related to the configuration of the Operating System, is my guess).

Quote from: TonMy Catalina update was a straight one without any mods , so what could be wrong???

Probably nothing is really wrong with your Catalina per se; my guess is it might rather be some configuration or setting item specific to your setup which creates these problems (and which differs from other Macs with Catalina which therefore do not have these difficulties.)

Unfortunately, no new ideas have turned up, not even over night... :(

The last suggestion I have: You could try and create the ELVis.ini file yourself from scratch on your Mac:

¤ Write into it just one line with a path pointing to any existing directory; no comments etc.

¤ Take care to get the upper/lower case spelling of the file name right (ELVis.ini, not elvis.ini or Elvis.ini). I think on the Mac (as in Unix generally) this matters.

¤ Also make sure to use an ASCII editor which does not format the text in any way. In Windows, this would be Notepad. From what I read, the equivalent on the Mac is something called TextEdit (comes with the MacOS apparently), but make sure to use the option "Format > Make Plain Text" !

I don't really believe this will solve the issue, but it's all I can think of.

If that fails, too, as expected, we still don't give up: I'll send you a private message with my email address. If you wish, you could then send me your Layout files, and I'd create the ELVis images from them and send them back.

Cheers,
Martin a.k.a. "MacBaffled"

Jeroen Hoppenbrouwers

I see two possible problems.

1. The whole .ini file is not read, leading to the missing path. Does ELVis complain if it cannot find the .ini file, or does it default to something?

2. The .ini works but the directory pointed at does not. Wuh?!

This is going to require some experimental Java code, I bet.

Hoppie

martin

Quote from: HoppieDoes ELVis complain if it cannot find the .ini file...?
Yes. If ELVis cannot find or read the INI file, it complains with a different popup message and then (after the user has "OK"ed that message) simply exits:
Quote from: ELVisSome problem with reading your ELVis.ini file.
Please inform author... :-)
Exiting...

If it can find and read the INI file but not the directory it points to, the message is (as seen by Ton)
Quote from: ELVisCannot find alleged layout folder:
<path as read from INI file>
Please check your ELVis.ini file!
Exiting...

So it is Wuh?! indeed...

Quote from: HoppieThis is going to require some experimental Java code, I bet.
...with the added aspect (apart from the usual risk of introducing new interesting bugs) that it would have to be tested (also) on Ton's machine. Might be worth a try though, sort of a minimal Java application which does nothing but read a path from a file and then open the directory. It would almost certainly contain more error and sanity checks than ELVis currently does...

Cheers,
Martin
(who tends to not let go of this kind of thing, not so much because he is a terrier (terra = "Erde"...!) but because of a more general issue: the actual problem might be rather unimportant (poor ELVis not working is not the same as if PSX were not working for Ton...), but these little things are often symptoms of something more serious in the background which, if not fixed, will strike later elsewhere, probably at the least  convenient time, and when something is really important and urgent.)


Hardy Heinlin

Any Java SecurityManager code implemented in ELVis?

martin

Quote from: HardyAny Java SecurityManager code implemented in ELVis?
No.
("Security? In Windows? We've heard of it...")

If that is missing but required for Macs, would then the OS not have to issue some warning?

Cheers,
Martin
(now back at the drawing board to make a simple test Java application)

Hardy Heinlin

SecurityManager is not required.

Jeroen Hoppenbrouwers

Quote from: martin on Mon, 18 Nov 2019 09:35
... but these little things are often symptoms of something more serious in the background which, if not fixed, will strike later elsewhere, probably at the least  convenient time, and when something is really important and urgent.

Can I hire you? I have a few job openings over here.


Hoppie

martin

Greetings...
... to those who are not yet bored by our feeble attempts to resuscitate ELVis.

You can now try your hand with Findini .
(pronounced "finn-DEE-nee", to make it sound like a new kind of noodles, or a breakfast cereal)

Using the latest in Artificial Intelligence, this tiny Java program will
¤ try to find and read a file called tester.ini ,
     which contains an entry pointing to a directory;
¤ try to open aforesaid directory and list its content;
¤ let you select a file
     (nothing will be done with or to it, however)
¤ introduce new fascinating and entertaining bugs,
     in particular of the kind appearing on some computers but not others, across operating systems.

Here is the download link (8 KB).

Have fun!

Cheers,
Martin
(El Findinero)

martin

Quote from: HoppieCan I hire you? I have a few job openings over here.
But I can't imagine any Management that would hire certified murphologists...

Cheers,
Marvin

Jeroen Hoppenbrouwers


Jeroen Hoppenbrouwers

Quote from: martin on Mon, 18 Nov 2019 20:38
... to those who are not yet bored by our feeble attempts to resuscitate ELVis.

Completely unmodified. Unzip, click on .jar. Windows 10.

All went well. OK to exit.

Hardy Heinlin

Findinee works on my OSX 10.9.5 with Java 12.

martin

Hooray, officially platform-independent!

Thanks, guys!

Cheers,
Martini