Author Topic: uTaskerFileCreate.exe - application error  (Read 9536 times)

Offline jnewcomb

  • Newbie
  • *
  • Posts: 5
    • View Profile
uTaskerFileCreate.exe - application error
« on: March 17, 2010, 05:42:45 PM »
Hello,
Having a problem with uTaskerFileCreate.exe generating an application error.
I have put together a test case that shows an example of it crashing.
Run the 'RunMe.bat' file

. The table generated looks like this:
static const USER_FILE user_files[] = {
{"eimg.jpg", (unsigned char *)_eimg, sizeof(_eimg), MIME_JPG, FILE_VISIBLE},
{"fimg.jpg", (unsigned char *)_fimg, sizeof(_fimg), MIME_JPG, FILE_VISIBLE},
{"gimg.jpg", (unsigned char *)_gimg, sizeof(_gimg), MIME_JPG, FILE_VISIBLE},
{"himg.jpg", (unsigned char *)_himg, sizeof(_himg), MIME_JPG, FILE_VISIBLE},
{"iimg.jpg", (unsigned char *)_iimg, sizeof(_iimg), MIME_JPG, FILE_VISIBLE},
{"jimg.jpg", (unsigned char *)_jimg, sizeof(_jimg), MIME_JPG, FILE_VISIBLE},
{"kimg.jpg", (unsigned char *)_kimg, sizeof(_kimg), MIME_JPG, FILE_VISIBLE},
{"limg.jpg", (unsigned char *)_limg, sizeof(_limg), MIME_JPG, FILE_VISIBLE},
{"mimg.jpg", (unsigned char *)_mimg, sizeof(_mimg), MIME_JPG, FILE_VISIBLE},
{"nimg.jpg", (unsigned char *)_nimg, sizeof(_nimg), MIME_JPG, FILE_VISIBLE},
{"oimg.jpg", (unsigned char *)_oimg, sizeof(_oimg), MIME_JPG, FILE_VISIBLE},
{"pimg.jpg", (unsigned char *)_pimg, sizeof(_pimg), MIME_JPG, FILE_VISIBLE},
{"qimg.jpg", (unsigned char *)_qimg, sizeof(_qimg), MIME_JPG, FILE_VISIBLE},
{"rimg.jpgÿØÿà JFIF   d d  ÿì Ducky     d  ÿî Adobe dÀ   ÿÛ „ {0} // end of list
};


If you comment out any one of the jpg files in userfiles.txt, the problem goes away.

Has anyone managed to work around this one or knows what causes the application error?
Thanks.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: uTaskerFileCreate.exe - application error
« Reply #1 on: March 17, 2010, 08:03:45 PM »
Hi

The problem was with an internal buffer which was dimensioned too small to build up the file table. It was limited to 1024 characters and the overrun caused the crash and the junk at the end.

After increasing the table limit to 128k (should be adequate for any practical cases) it no longer has this problem.

The new version V1.1 is attached.

Regards

Mark



Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: uTaskerFileCreate.exe - application error
« Reply #2 on: May 27, 2010, 01:42:49 AM »
Hi All

Attached is a new version of uTaskerFileCreate - V1.2

A problem was found when creating files containing HTML and binary files (like JPG). When the ordering of generation is first HTML and then binary, the flag to remove white space remains stuck and so binary corruption can occur. This is corrected in V1.2.

Regards

Mark