SkyLined / BugId

Detect, analyze and uniquely identify crashes in Windows applications
https://bugid.skylined.nl
Other
500 stars 90 forks source link

fix write file bug when using --repeat #112

Closed dms1lva closed 1 year ago

dms1lva commented 1 year ago

Fix issue when using the --repeat argument:


× Statistics file all_reports\2022-12-09 11։10։23.106165 Reproduction statistics.txt could not be saved!
Traceback (most recent call last):
  File "D:\BugId\BugId.py", line 1273, in fMain
    oStatisticsFile.fCreateAsFile(sStatistics, bCreateParents = True);
  File "D:\BugId\modules\mDebugOutput\ShowDebugOutput.py", line 138, in fxFunctionWrapper
    return fxFunction(*txCallArgumentValues, **dxCallArgumentValues);
  File "D:\BugId\modules\mFileSystemItem\cFileSystemItem\cFileSystemItem.py", line 410, in fCreateAsFile
    fAssertType("sbData", sbData, bytes);
  File "D:\BugId\modules\mNotProvided\fAssertType.py", line 107, in fAssertType
    assert fbIsOfType(xValue, *txTypes), \
AssertionError: 'sbData' must be 'bytes', not 'str' ('2 × AVR:Unallocated 3f8.dd0.1d9.ab0 @ 1 × No crash (33%)\r\n')
  'sbData' must be 'bytes', not 'str' ('2 × AVR:Unallocated 3f8.dd0.1d9.ab0 @ 1 × No crash (33%)\r\n')
SkyLined commented 1 year ago

Hey thanks for the bug report and especially for the fix! I'm having a look now to see if I can just generate ASCII bytes strings instead, so we do not need to use utf-8 encoding, I suspect I cannot guaranteed there are no Unicode chars in there, in which case I will use your fix.

SkyLined commented 1 year ago

Yes, it may contain Unicode, so your fix is the best one I can think of, thank you!