BMK Crash
Archives Forums/BlitzMax Bug Reports/BMK Crash
| ||
Under certain circumstance, BMK will blow up when attempting to access a field on a Null object. The problem lies in the MakeSrc() function in bmk_make.bmx Specifically, it is possible for this line : Local src_file:TSourceFile=ParseSourceFile( src_path ) to result in src_file being Null, if the file extension in src_path is undetermined (for example .hh) In this case we should probably return from MakeSrc() immediately, since there's no point continuing to read a filetype we don't understand. I would suggest adding If Not src_file Return immediately after the aforementioned line, rather than fall over later in the function. |
| ||
just returning would be the wrong behavior. it has to output the error (so users know they aren't fullfilling the requirements) and potentially stop the whole compile execution. |
| ||
it has to output the error (so users know they aren't fullfilling the requirements) Well, no. It does that already. This is mainly concerned with parsing a source file, and finding a link to another source file in that. In my example, a C++ file had an #include to a file with a .hh extension. Since there is nothing wrong with that, it should fail silently, rather than popping up an error or warning and potentially confusing the user - because there is no error. Of course, the other "fix" would be to add more "valid" file extensions to the list that BMK understands. |