Opened 3 months ago

Closed 2 months ago

Last modified 2 months ago

#417 closed bug (fixed)

Font requester often crashes

Reported by: Andreas Falkenhahn Owned by: Thore Böckelmann
Priority: normal Milestone: 5.0-2019R3
Component: Fontpanel.mui Version: 5.0-2019R2
Severity: minor Keywords:
Cc: OS Platform: AmigaOS3
Blocked By: Blocking:
Release Notes:

Description

When I select a font in the font requester and increase its size using the "+" button, the system often crashes completely on OS3.

I can always reproduce it by selecting XEN.font size 11. Increasing the font size using the "+" always make it crash once it has reached size 23 or so.

Attachments (1)

Fontpanel.lha (150.0 KB) - added by Thore Böckelmann 3 months ago.
Debug version of Fontpanel.mui

Download all attachments as: .zip

Change History (11)

comment:1 Changed 3 months ago by Andreas Falkenhahn

Note that holding down "+" doesn't cause crashes. You must use short clicks so that the preview is refreshed. I guess the crash is related to the font preview.

comment:2 Changed 3 months ago by Thore Böckelmann

Component: undefinedFontpanel.mui
OS Platform: undefinedAmigaOS3
Priority: undecidednormal
Status: newaccepted

A few more details would be nice. Please try to capture a crashlog (Enforcer, MungWall, etc) with the debug build.

Changed 3 months ago by Thore Böckelmann

Attachment: Fontpanel.lha added

Debug version of Fontpanel.mui

comment:3 Changed 2 months ago by Thore Böckelmann

I admit that I can reproduce this issue on AmigaOS3 (fs-uae on Linux, WinUAE on Windows), although not exactly the way as you describe it, but who cares…

On the other hand I am not able to reproduce the issue on AmigaOS4 (fs-uae on Linux).

There is absolutely no system dependent code in Fontpanel class which could explain this difference. From my point of view this looks like a bug in AmigaOS3's font handling (either diskfont.library or graphics.library). It is very obvious that loading TTF or Intelli fonts takes much longer on AmigaOS3 than it does on AmigaOS4, provided the same emulating machine. I assume PPC emulation to be more complex compared to M68K emulation. As such I must assume that the font handling os AmigaOS4 got certain bugs fixed which are still contained in AmigaOS3 and may cause undefined behavior and crashes.

comment:4 Changed 2 months ago by Andreas Falkenhahn

I don't think this is an OS bug. I wrote lots of text engine stuff on OS3 and I don't remember encountering any such bugs. The text stuff has always been very stable and I made lots of tests with lots of different fonts and the whole bullet.library shebang.

Keep in mind that on OS3 there are lots and lots of pitfalls when it comes to everything graphics because even on RTG some things are still done by the blitter (at least on Picasso96 and older CGfx versions as well) so you still need stuff like WaitBlit() at the right places, for instance.

I think you should just debug it and find out. You can reproduce it so it shouldn't be that complicated to nail it down to the specific part of the code that causes it. Just cut down the Fontpanel code one by one until the crash goes away.

Just saying "It's an OS bug" just because it works on OS4 sounds like a cheap excuse to me :)

comment:5 Changed 2 months ago by Thore Böckelmann

As it seems something in AmigaOS3's diskfont.library does not react too gracefully when being sent the CTRL-C signal. At least as soon as I switch to a different signal (i.e. CTRL-F) to wake up the asynchronous font reading process there are no more crashes.

So please don't tell me AmigaOS3 is bugfree… Everything works ok, as long as it isn't pleased to be interrupted, which is quite unlikely to happen in normal applications.

comment:6 Changed 2 months ago by Thore Böckelmann

Owner: set to Thore Böckelmann
Resolution: fixed
Status: acceptedclosed

In 6459:

  • Fontpanel.c: use a different signal than CTRL-C to wake up the asynchronous font processing. diskfont.library of AmigaOS3 doesn't like to be interrupted during OpenDiskFont() via CTRL-C and causes arbitrary crashes. This closes #417.

comment:7 Changed 2 months ago by Thore Böckelmann

In 6461:

  • Fontpanel.c: some comments about ticket 417.

comment:8 Changed 2 months ago by Thore Böckelmann

Milestone: future release5.0-2019R3

comment:9 in reply to:  5 Changed 2 months ago by Andreas Falkenhahn

Replying to Thore Böckelmann:

As it seems something in AmigaOS3's diskfont.library does not react too gracefully when being sent the CTRL-C signal. At least as soon as I switch to a different signal (i.e. CTRL-F) to wake up the asynchronous font reading process there are no more crashes.

Yeah, that sounds like asking for trouble. Why don't you allocate your own signals?

comment:10 Changed 2 months ago by Thore Böckelmann

In 6463:

  • Fontpanel.c: allocate a custom signal for waking up the asynchronous font processing instead of using a fixed system signal. This refs #417.
Note: See TracTickets for help on using tickets.