Recently a client called me in to investigate an issue they were having with SureTrak 3.0 by Primavera. The program would crash whenever they tried to print a schedule. This is legacy software and no longer being updated or supported. Primavera product line was recently bought by Oracle but backward compatability is not guaranteed and this particular client frequently works with old data files so backward compatibility is an absolute must.
The Suretrak software states that it is compatible with Windows 98 and ME but not XP. My initial review of the issue indicated a software incompatibility with XP however the software had been working fine and the issue had appeared out of nowhere and was causing Suretrak to crash on all systems when attempting to print. The solution was not apparent but after a number of tests I was able to conclusively determine that the problem was due to path length limits from the MS DOS era.
(TLDR; Shorten your path and/or filename so it does not exceed the maximum length of 79 characters.)
It has been nearly 20 years since I was developing software for MS DOS so I needed to refresh my memory on the subject. DOS paths are limited to 64 characters; 66 if you count the storage designation (drive letter and colon) I’m sure more seasoned DOS coders will remember the magic number as being 80 characters for allocating string buffers. The following helpful excerpt was taken from: http://www.datman.com/tbul/dmtb_018.htm
The longest filename string including the drive letter and colon is 79 characters (many programmers remember the magic number to be 80 which includes the terminating "nul" character at the end). Another limit many users overlook is the 64-character limit on the pathname. In this context, the 64-character limit starts with the first backslash which represents the root directory. If you add the common volume specifier (a drive letter plus a colon), the maximum length for the pathname will be 66. Now, the longest name (the "lastname") in the so-called 8.3 DOS naming convention is 12 characters. Therefore, the total is 66 + 1 + 12 = 79 The "+ 1" in the middle is for the last backslash. Adding the terminating nul character at the end will make up the magic number of 80 bytes which most people remember. The better way to remember the limits is to remember that the longest subdirectory name allowed in DOS is 66 characters. The 80-character limit commonly sited should be only for programmers who need to allocate a buffer of 80 bytes. If you remember the 66-character limit, then the 79 character limit can be derived.
That says it all right there. Needless to say identifying the issue was the hard part, the solution was easy. Keep your path lengths reasonably short and you will never have to deal with this elusive and obscure bug!
5 replies on “SureTrak 3.0 Printing Issues”
Thank You for the analysis of the problem, I am having the same problem. I am just an end user and I need to get the print function working. Could you please explain your solution in steps so I can get the print function in Surtrak 3. working?
Thanks
Tom
When I read this, I thought DOS path length? I had not heard of that in years. How can this have anything to do with this problem? However, I had no other ideas, so I tried it and IT WORKED!
Thank you so much for the information. Now, our project manager will not have to explain to our CEO why the schedule is all in his head instead of on paper. Thanks again.
Your solution worked great. Thanks
Excellent. Just shorten the file name until it prints. Worked like a charm. Thanks
Your post from over 5 YEARS AGO just saved me a lot of headache!!! Thank you!