View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032785 | Patches | Converter | public | 2017-12-06 07:40 | 2017-12-07 16:08 |
Reporter | Timl | Assigned To | Juha Manninen | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x86 | OS | Linux | ||
Product Version | 1.8 | ||||
Summary | 0032785: Crash converting a file | ||||
Description | Segmentation fault when converting a file | ||||
Tags | No tags attached. | ||||
Fixed in Revision | r56660 | ||||
LazTarget | - | ||||
Widgetset | GTK 2 | ||||
Attached Files |
|
|
converter.diff (461 bytes)
Index: converter/usedunits.pas =================================================================== --- converter/usedunits.pas (working copy) +++ converter/usedunits.pas (revision 56652) @@ -464,7 +464,6 @@ i, x: Integer; begin for i:=fMissingUnits.Count-1 downto 0 do begin - if assigned( ACommentedUnits ) then if ACommentedUnits.Find(fMissingUnits[i], x) then begin fUnitsToComment.Add(fMissingUnits[i]); fMissingUnits.Delete(i); |
|
If I am not completely wrong your patch removes the line "if assigned(ACommentedUnit) then". But looking at current and older source I never see this line. It would make sense to add it to prevent a seg fault. But beyond that: what are you doing? Yes, trying to "convert a file". But: which file? How? What do I have to do to see the error? |
|
Indeed! --- $ patch -p0 < ~/patch/converter.diff patching file converter/usedunits.pas patch unexpectedly ends in middle of line Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file converter/usedunits.pas.rej --- |
|
Ok, after realizing the patch was inverted I analysed the code and yes, ACommentedUnits can be Nil when converting a single unit. It is created for project and package conversion. I added the Assigned() test as suggested. Thanks. I wonder why it has not shown up in my tests. I have tested project conversion more that unit conversion but still... |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-12-06 07:40 | Timl | New Issue | |
2017-12-06 07:40 | Timl | File Added: converter.diff | |
2017-12-06 11:41 | wp | Note Added: 0104516 | |
2017-12-06 12:32 | Juha Manninen | Note Added: 0104524 | |
2017-12-07 15:48 | Juha Manninen | Assigned To | => Juha Manninen |
2017-12-07 15:48 | Juha Manninen | Status | new => assigned |
2017-12-07 16:08 | Juha Manninen | Fixed in Revision | => r56660 |
2017-12-07 16:08 | Juha Manninen | LazTarget | => - |
2017-12-07 16:08 | Juha Manninen | Note Added: 0104570 | |
2017-12-07 16:08 | Juha Manninen | Status | assigned => resolved |
2017-12-07 16:08 | Juha Manninen | Resolution | open => fixed |