Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#262 closed bug (fixed)

Crash in Floattext.mui

Reported by: Andreas Falkenhahn Owned by: Thore Böckelmann
Priority: normal Milestone: 4.0-2015R4
Component: muimaster.library Version: 4.0-2015R3
Severity: minor Keywords:
Cc: OS Platform: All
Blocked By: Blocking:
Release Notes:

Added some explicit checks for NUL bytes instead of relying on the supplied text byte length only when calculating the text's graphical dimensions.

Description

Run the attached program and resize the window a little. The program will soon crash. I think it is related to the formatting in the Floattext object.

Attachments (2)

main.c (2.7 KB) - added by Andreas Falkenhahn 4 years ago.
Crashlog_a.out_2015-10-13_20-57-10.txt (24.0 KB) - added by Andreas Falkenhahn 4 years ago.

Download all attachments as: .zip

Change History (12)

Changed 4 years ago by Andreas Falkenhahn

Attachment: main.c added

comment:1 Changed 4 years ago by Thore Böckelmann

Telling about a crash without providing a crashlog is not a very good approach. Since your example program is definitely targetted at AmigaOS4 it should be easy to capture a crashlog.

Unfortunately I am currently lacking the time to investigate immediately here. Hence a crashlog is very appreciated, because it points directly to the location of the crash.

comment:2 Changed 4 years ago by Thore Böckelmann

I just managed to try the example program on AmigaOS3. Basically I just used the MUI-Demo source and replaced the floattext of the main window. There are no problems on AmigaOS3 with all bells and whistles enabled (Enforcer, Wipeout, etc).

So a crashlog is definitely required. Otherwise I have no clue where to look, as I have no time to test this myself on AmigaOS4.

Changed 4 years ago by Andreas Falkenhahn

comment:3 Changed 4 years ago by Andreas Falkenhahn

Here you go. Btw, it crashes on OS3 here, too. Not every time but regularly. On OS4 it always crashes.

comment:4 Changed 4 years ago by Thore Böckelmann

In 4962:

  • Floattext.c: reworked the wrapping process to use a private renderinfo pointer rather than a private rastport pointer as the latter is not used at all any more. This refs #262.

comment:5 Changed 4 years ago by Thore Böckelmann

Milestone: future release4.0-2015R4
Owner: set to Thore Böckelmann
Priority: undecidednormal
Status: newassigned

Please try to reproduce the crash with the next nightly build. So far I haven't been able to reproduce this issue myself. Perhaps my latest change already cures it.

comment:6 Changed 4 years ago by Andreas Falkenhahn

Nope, it still crashes every time on OS4 here when trying to resize the window of the example program I provided.

comment:7 Changed 4 years ago by Thore Böckelmann

Ok, while I was never able to reproduce this crash on AmigOS3 it happened instandly on AmigaOS4 for me as well.

Basically the bug is that the text engine tries to read beyond the intended number of bytes within the to be measured string while calculating the text's graphical dimensions. This never caused any problems on AmigaOS3, because here almost every address can be read without causing any havoc. I really wonder how you managed to make it crash on AmigaOS3…

comment:8 Changed 4 years ago by Thore Böckelmann

Component: Floattext.muimuimaster.library

comment:9 Changed 4 years ago by Thore Böckelmann

Resolution: fixed
Status: assignedclosed

In 4970:

  • mastertext.c: added some explicit checks for NUL bytes instead of relying on the supplied text byte length only when calculating the text's graphical dimensions. This closes #262.

comment:10 Changed 4 years ago by Thore Böckelmann

Release Notes: modified (diff)
Note: See TracTickets for help on using tickets.