{"id":37,"date":"2009-10-29T16:51:01","date_gmt":"2009-10-30T00:51:01","guid":{"rendered":"http:\/\/www.jwdev.com\/?p=37"},"modified":"2015-03-19T15:10:33","modified_gmt":"2015-03-19T23:10:33","slug":"suretrak-3-0-printing-issues","status":"publish","type":"post","link":"https:\/\/www.jwdev.com\/?p=37","title":{"rendered":"SureTrak 3.0 Printing Issues"},"content":{"rendered":"<p>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.<\/p>\n<p>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.<\/p>\n<p>(TLDR; Shorten your path and\/or filename so it does not exceed the maximum length of 79 characters.)<\/p>\n<p>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&#8217;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: <a href=\"http:\/\/www.datman.com\/tbul\/dmtb_018.htm\">http:\/\/www.datman.com\/tbul\/dmtb_018.htm<\/a><\/p>\n<pre><strong>The longest filename string including the drive letter and colon is\r\n79 characters (many programmers remember the magic number to be 80\r\n\u00a0which includes the terminating \"nul\" character at the end).\r\n\r\nAnother limit many users overlook is the 64-character limit on the\r\npathname.  In this context, the 64-character limit starts with the\r\nfirst backslash which represents the root directory.  If you add\r\nthe common volume specifier (a drive letter plus a colon), the\r\nmaximum length for the pathname will be 66.   Now, the longest name\r\n(the \"lastname\") in the so-called 8.3 DOS naming convention is 12\r\ncharacters.  Therefore, the total is\r\n\r\n   66 + 1 + 12 = 79\r\n\r\nThe \"+ 1\" in the middle is for the last backslash.  Adding the\r\nterminating nul character at the end will make up the magic number\r\nof 80 bytes which most people remember.\r\n\r\nThe better way to remember the limits is to remember that the\r\nlongest subdirectory name allowed in DOS is 66 characters.  The\r\n80-character limit commonly sited should be only for programmers\r\nwho need to allocate a buffer of 80 bytes.  If you remember the\r\n66-character limit, then the 79 character limit can be derived.<\/strong>\r\n<\/pre>\n<p>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!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-37","post","type-post","status-publish","format-standard","hentry","category-software"],"_links":{"self":[{"href":"https:\/\/www.jwdev.com\/index.php?rest_route=\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jwdev.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jwdev.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jwdev.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jwdev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=37"}],"version-history":[{"count":8,"href":"https:\/\/www.jwdev.com\/index.php?rest_route=\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":56,"href":"https:\/\/www.jwdev.com\/index.php?rest_route=\/wp\/v2\/posts\/37\/revisions\/56"}],"wp:attachment":[{"href":"https:\/\/www.jwdev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jwdev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jwdev.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}