Topics

V5.2 Migration - weird messages about a jpg #Bug


Adam Richards
 

Cross post from private email 

Firstly, thank you for your excellent work on this software. 
I have been using it for many years now.

I have also used SCARM for its 3D features, which work quite well, but a pain to get topography correct
and I find the track laying much more awkward than XTrackCAD and you can't run trains.
Just this week I tried the latest AnyRail ( last tried many years ago ) and while the track laying is good,
the 3D only applies to the track routes.

So today I checked and updated XTrackCAD to the latest version 5.2.0 GA
Previously I was using 5.1.2a

I am using Windows10.

When I try to open any  existing track plans I get this message:

 

<cnmakaiimooadjca.jpg>

 

If I reply "Yes" the track plan loads OK and appears to be all there.
I am using a number of custom items - 2D plans of my  Scalescene buildings
Looking in the specified folder I see:

<lnchablgpehkadgd.jpg>

If I resave a design and then try to reload it - I get a whole string of error messages !!
such as:   resolveindex: T231[1]:T494 doesn\\'t exist
Keep replying "Yes" -
   Then finally only part of the track plan is shown !!!

Tried a few other of my old intermediate designs, with the same result.

Being an elderly software bod who goes back to Fortran & punched paper tape !!!
I have learnt the hard way to keep lots of backups when developing software.

Also a SyncBack is run every morning so I have recovered all files - no problem

I needed to uninstall the v 5.2.0 and reinstall my previous versionl -
     as got messages about "no longer compatible" !

Has anyone else reported this problem?

 

Best regards

    Gavin Dewar


Adam Richards
 

Gavin,
Several things - 

0 - Attaching a copy of your v5.1.2a .xtc file would be much appreciated to aid diagnosis. 
1 - I am unaware of any official support for .jpg as part of either tracks or designs in V5.1.2a.  So that's weird for a start. In V5.2 we do have (new) .jpg support for a single background image. A snapshot of the message would be nice as I suspect it said more than a filename which would show which component it comes from. My thought might be that somehow you have a custom parm file entry pointing to a .jpg somehow (those names would come from the xtrkcad.ini file in your working directory) or perhaps the background image value is not being set/cleared correctly at startup.
2 - A copy of your V5.2 .xtc save file would also be interesting. The messages you are seeing suggest that some tracks are not being saved or the format is corrupt and so they are not being loaded correctly. By comparing the two files, we should be able to get some clues if you have not otherwise altered the contents before save.
3 - All major versions of the code remain on sourceforge in different folders under "Files" - should you wish to reinstall an earlier version. https://sourceforge.net/projects/xtrkcad-fork/files/XTrackCad/

The only other report of issues with reading old formats turned out to be a bad USB stick which was dropping bits - in response to your "has anyone else seen something similar"?

Adam


Dave Bullis
 

We've tightened up some of the checking we do on .xtc/.xtp files.
In particular you might see an error "Track segment ?? not on Path" or "Unknown segment type"
The indicate problems with the input files.

In general, as Adam says, we need the files in question and the exact steps involved.

Dave


Gavin Dewar
 

The "weird jpg" was just a screen stip I took of the error message which I had inclluded in my email to Adam.

I initially found the problem appeared to be a fault in a "custom turnout" I had setup
a number of years ago - a return loop with a couple of points included.
When I edited the parameters file to remove it - the original problem disappeared
 
But then I found I still had problems when saving in Version 5-2-0 GA
 and then getting errors when reloading the file, with only part of the layout being displayed.
 
After a lot of to & froing between 5-2-0 & 5-1-2a

        - Removing various layers & individual items:

a) Load original in 5-1 - remove layers/items & save with new name.
b) Load into 5-2 - looks fine - Save from  5-2
         Realised after a bit 5-2 crashed out immediately after saving ( or was it part through ?)
c) Load again into 5-2 - gives loads of error messages & eventually
                only loads part of the layout.

I seem to have narrowed the problem to embedded "Draw - Note - Comment" containers.

  When I remove the four of these I had in two layers, then the new version now works
     for me with no problem.


Gavin Dewar
 

The   <cnmakaiimooadjca.jpg> and <lnchablgpehkadgd.jpg> were screen snips I sent to Adam when I first contacted him about my problem with Version 5-2-0


Gavin Dewar
 

Just tried  a new blank file, then  Draw > Notes > Comment, Placed the default Note on drawing.

Then File > Save   and immediate crash out exit from file. !!

Restart 5-2  - Yes to Offer to recover  - blank file.  Also tried a few tracks - no problem.

Then again Draw > Notes > Commen, Placed the default Note on drawing. Immediate crash on Saveing.

So does seem to be a prblem with the "Comments"

Gavin Dewar


Adam Richards
 
Edited

There does seem to be something "odd" about Notes in general (and not just Comments).  I am not seeing them added properly on Mac (the icon is not showing). They are being written out properly for me on save, though. So that's one thing to be addressed.

^^ Ignore me -> You have to be below scale 1:16 to see the note icons. :-(

Can we see your .xtc file (v5.1.2a) please?

Adam


Adam Richards
 

Also, can we get precision on which platforms people are using, please?   There are sometimes (as it seems in this case) differences - and we then can try running in the right place.

The only change I can find post V5.2 for Note is that I upped the largest note size that could be edited.  But that failure was soft (after editing in Modify the note was truncated before the fix). So this is something else. 

Adam

 

 


Gavin Dewar
 

Hi Adam
Of the three files I sent you in earler email:

The following two are from V5.1.2a  and contain the "Draw-Notes-Comments" in Layers 1 & 4,
they both load into V5.2.0 OK but are corrupted on saveing.

"Rowandale - 200"
is my full version with all Layers

"Rowandale - 200 -Layout Only -L1 L4"  - is cut down to just the two layers containing the four "Draw-Notes-Comments"

The following is modified to operate correctly in v5.2.0
  "Rowandale - 200 -Layout Only -L1 L4  - No Comments" is the one which V5.2.0   loads , saves  and re-loads OK
the only difference is that the comments have been removed.

I replied on the thread earlier - but maybe only Dave saw it?

So repeating direct to you
I initially found the problem appeared to be a fault in a "custom turnout" I had setup

a number of years ago - a return loop with a couple of points included.
When I edited the parameters file to remove it - the original problem disappeared
 
But then I found I still had problems when saving in Version 5-2-0 GA
 and then getting errors when reloading the file, with only part of the layout being displayed.
 
After a lot of to & froing between 5-2-0 & 5-1-2a

        - Removing various layers & individual items:

a) Load original in 5-1 - remove layers/items & save with new name.
b) Load into 5-2 - looks fine - Save from  5-2
         Realised after a bit 5-2 crashed out immediately after saving ( or was it part through ?)
c) Load again into 5-2 - gives loads of error messages & eventually
                only loads part of the layout.

I seem to have narrowed the problem to embedded "Draw - Note - Comment" containers.

  When I remove the four of these I had in two layers, then the new version now works
     for me with no problem.

 

Alsotried  a new blank file, then  Draw > Notes > Comment, Placed the default Note on drawing.
Then File > Save   and immediate crash out exit from file. !!
Restart 5-2  - Yes to Offer to recover  - blank file.  Also tried a few tracks - no problem.
Then again Draw > Notes > Commen, Placed the default Note on drawing. Immediate crash on Saveing.

So does seem to be a problem with the "Comments"

I am using Windows10 - with all updates.

Gavin




Adam Richards
 

Gavin,
As I sent in email just now, the original message forwarded to me by Martin was stripped of attachments and of images - hence why I thought the error involved .jpgs - because I thought that text was part of the two error messages!!

Please attach the .xtc here in the forum, or reply to the email I sent you directly with them. 

Thanks,
Adam

----------

Now we are homing in on Notes and Windows, involving bad loading and saving, we are getting somewhere because there are BOTH platform specific code parts AND the format of the Notes entries has changed a lot between versions.

The old code at parm <12 and >9 was a single line of setup, several lines of content and a terminating END

NOTE parm parm parm ...
Line1
Line2
Line3
END

the new format is just one line

NOTE parm parm parm .... "Lines with escaped linefeeds \n, doublequotes "" and backslashes \\"  

The text string(s) (for Windows is also UTF8 encoded rather than system codepage).

The new code should read in the old parmlevels of .xtc correctly, however.  I suspect that the issue is somewhere in all this.

By reading in a V5.1.2a NOTE badly it is likely mangling some definition following it (hence your missing stuff) and then writing the badly read note out in the new V5.2 format causes some exception (there is an assert if the type of the Note object is not >0 and <2, for example).  There even seems to be an issue with writing a simple note at V5.2 level on Windows based on other's observations as well. 

The input .xtc will show us a lot, I expect. 

Adam


Gavin Dewar
 

Martin
You should have received by email several .xtc files showing the problem.
Also an .xtc file with just the four Comments I had in the problem file.
  Sorry - not sure how to add filse to the forum yet - need to RTFM !

I see on the XtrxkCAD sourceforge page, under Project Activity, that Martin has fixed the problem.
Presumambly this will be ready to download in due course.

Thanks to you all.
   Gavin


Adam Richards
 
Edited

Thanks for the file, that helped a lot, Gavin.

There is another issue that I just found and have fixed with Note as well. Select was abending on Notes that were >76 characters long.

I confirmed that the 5.1.2a Note format of your file would read and then be rewritten properly in 5.2 format. 

Adam


Adam Richards
 

Here's how to add a file to a post