How to corrupt an APP

Published 2008-07-02    Printer-friendly version

Sometimes software can be in use for years before someone stumbles across a major bug. The other day Lee White needed to add an image resource to a C6 application, and to help pick out the file he needed from a directory with a lot of images he began the file name with --, as in --yada--.bmp.

The app saved and compiled fine, but the image file corrupted the project. Result: next time Lee opened the app he got a "Syntax error in project file" and the .APP file was unusable.

The problem won't happen if you have a single leading dash in the file name; you need two dashes. Lee suspects the parser is getting confused because two dashes are used to denote comments:

#compile "junk_BC0.CLW" -- GENERATED
#compile "JUNK_BC.CLW" -- GENERATED
#compile "junk.clw" -- GENERATED
#compile "junk001.clw" -- GENERATED

The solution is to hex edit the APP file, find the offending file name in the project data and change the -- to some other string. After that your app should be usable again. Just remember to make a backup copy before you do the hex edit.

Printer-friendly version

 
 

Search

 

Advanced Search
Topical Index

Subscribe to
ClarionMag

One year: $189

(includes all back issues since '99)

Renewals from $139

Two years: $289

Renewals from $239

More Info

Subscribe Now!

ClarionMag Blog

RSS Feeds

Updates via Email

Enter your Email


Powered by FeedBlitz

Quick Links