View Issue Details

IDProjectCategoryView StatusLast Update
0005819Dwarf FortressDwarf Mode -- Interface, Textpublic2021-11-04 22:26
ReporterMNICY Assigned ToBaughn  
PrioritynormalSeveritycrashReproducibilityalways
Status confirmedResolutionopen 
OSLinuxOS VersionUbuntu 11.10 
Product Version0.34.07 
Summary0005819: Build menu causes crash when zoomed with TrueType
DescriptionIf I am zoomed all the way in and press the b key, the game crashes. If I run it from a terminal, it gives this error:
Dwarf_Fortress: src/g_src/ttf_manager.cpp:139: ttf_details ttf_managerst::get_handle(const std::list<ttf_id>&, justification): Assertion `pixel_width >= ttf_width' failed.
Aborted
Steps To Reproduce1. embark
2. zoom all the way in
3. press b
Additional InformationIf I don't zoom all the way in it works.. but then I have trouble seeing the text on the screen because it is so small.
TagsNo tags attached.

Relationships

related to 0005813 assignedBaughn TrueType crash when zooming 
has duplicate 0004972 resolveduser6 Crash when constructing building with TrueType enabled. 
has duplicate 0006713 resolveduser6 Game crash when bringing up build menu. 
has duplicate 0007671 resolveduser6 Game crashes when trying to access build menu 
has duplicate 0006867 resolveduser6 Game crash after zoom/font boldness changed 
has duplicate 0009993 resolvedlethosor Crash on pixel_width >= ttf_width assertion 
has duplicate 0010325 resolvedLoci Instability on high zoom levels?? 
has duplicate 0010406 resolvedLoci Crash while resizing font 
has duplicate 0011400 resolvedLoci Crash at manager screen with a given font size with assertion failed 
has duplicate 0011553 resolvedlethosor Crash when entering build mode and zoomed in 
related to 0006096 new After opening saved game, crashes on build menu 

Activities

Logical2u

2012-04-19 13:36

manager   ~0022313

Does it still crash if you turn TrueType off?

user6

2012-04-21 17:01

  ~0022329

Reminder sent to: Baughn

"Assertion `pixel_width >= ttf_width' failed"

zenerbufen

2012-04-26 13:25

reporter   ~0022382

Last edited: 2012-04-26 13:26

Me and another user are experiencing the exact same problem, but under OS X, and at the default zoom level. Turning off truetype or zooming out will work around the problem. This problem is easily produced with the following steps:

download fresh 34.07 for os x
generate world
embark
press F12
press b
crash


src/g_src/ttf_manager.cpp:139: failed assertion `pixel_width >= ttf_width'
shows in the console

scriberman

2012-07-05 17:34

reporter   ~0023166

Debian Squeeze 6.0.5, DF 0.34.07, Ironhand 0.73, dual video 2048x1155=4096x1155

I got this 'b' crash while zoomed out (which makes everything smaller), not zoomed in (which makes everything larger), and the workaround to zoom back in (not out) works for me. Zooming out 5 times at the default ZOOM_SPEED of 10: 'b' causes crash; zooming out 4 times: 'b' does not cause crash. Here is my error output from zooming 4 times, 'b', zooming once more, 'b':
-----
Resizing font to 15x15
Resizing font to 13x13
Resizing font to 12x12
Resizing font to 11x11
Resizing font to 10x10
Dwarf_Fortress: src/g_src/ttf_manager.cpp:139: ttf_details ttf_managerst::get_handle(const std::list<ttf_id>&, justification): Assertion `pixel_width >= ttf_width' failed.
Aborted
-----

Fresh install, fresh world, and fresh embark. I started getting the 'b' crash only after I edited my init.txt file, though I haven't tested thoroughly in that direction. I had changed several options in init.txt, including [ZOOM_SPEED:10] to 50 (I only focused my suspicion there after finding this original bug report page). I am now doubting that this is the source of my problem, but it is really the only thing I can think of that I did differently; I was up all night with the fresh install, zooming in and out all over the place.

OK, so now the weird part. I tested toggling TrueType on and off as a workaround, and now I can not get the thing to crash anymore!! If it happens again, I will report back here. Let me know if you need more info or want me to test anything else.

panando

2014-07-20 17:30

reporter   ~0027083

This crash is still at large, with truetype set to YES, then reproducing the crash is basically as simple as zooming out.
---
New window size: 777x300
Font size: 18x18
Resizing grid to 80x25
Resizing font to 9x9

Resizing font to 9x9
Resizing font to 9x9
Resizing font to 7x7
Dwarf_Fortress: src/g_src/ttf_manager.cpp:139: ttf_details ttf_managerst::get_handle(const std::list<ttf_id>&, justification): Assertion `pixel_width >= ttf_width' failed.
Aborted.
---


Again, and doing nothing other than immediately zooming out all the way:
---
Resetting textures
Resizing font to 12x12
Resizing font to 10x10
Resizing font to 8x8
Resizing font to 6x6
Resizing font to 6x6
Resizing font to 5x5
Resizing font to 4x4
Resizing font to 4x4
Resizing font to 3x3
Resizing font to 3x3
Resizing font to 3x3
Resizing font to 3x3
Resizing font to 2x2
Dwarf_Fortress: src/g_src/ttf_manager.cpp:139: ttf_details ttf_managerst::get_handle(const std::list<ttf_id>&, justification): Assertion `pixel_width >= ttf_width' failed.
Aborted
---

Using Ubuntu 14.04

DF version .40.4

Hello71

2014-07-29 14:25

reporter   ~0027900

assertion fails without even resizing here, but this is with recompiled libgraphics.so.

disabling the assertion causes misrendered text -- DF miscalculates the size of text input e.g. when trading, and sometimes cuts off text.

what font are you using?

tonren

2021-11-04 22:26

reporter   ~0041170

Last edited: 2021-11-04 22:29

Just got this error on Pop!_OS 21.04 when I pressed "Start playing" after worldgen. Completely vanilla installation with no other worlds, saves, customizations etc.

Of note is that I had zoomed in to the point where the font changed from serif to sans serif.

Resizing font to 13x19
Resizing font to 14x21
Resizing font to 16x24
Resizing font to 17x25
Resizing font to 19x28
Resizing font to 17x25
Resizing font to 16x24
Dwarf_Fortress: src/g_src/ttf_manager.cpp:139: ttf_details ttf_managerst::get_handle(const std::list<ttf_id>&, justification): Assertion `pixel_width >= ttf_width' failed.
Aborted (core dumped)

I had to do some unusual stuff to get DF running in the first place. Here's a condensed summary of what I ran:

sudo apt install libsdl1.2debian libsdl-image1.2 libsdl-ttf2.0-0 libopenal1
cd df_linux && rm libs/libstdc++.so.6

Some relevant lib information for posterity:

$ apt-cache show libsdl1.2debian
Package: libsdl1.2debian
Architecture: amd64
Version: 1.2.15+dfsg2-6
Multi-Arch: same
Priority: optional
Section: universe/libs
Source: libsdl1.2
Origin: Ubuntu

$ apt-cache show libsdl-ttf2.0-0
Package: libsdl-ttf2.0-0
Architecture: amd64
Version: 2.0.11-6
Multi-Arch: same
Priority: optional
Section: universe/libs
Source: sdl-ttf2.0
Origin: Ubuntu

Add Note

Note

Issue History

Date Modified Username Field Change
2012-04-19 11:53 MNICY New Issue
2012-04-19 13:36 Logical2u Note Added: 0022313
2012-04-19 18:36 Logical2u Tag Attached: AWAITING UPDATE
2012-04-21 17:00 user6 Status new => assigned
2012-04-21 17:00 user6 Assigned To => Baughn
2012-04-21 17:00 user6 Relationship added related to 0005813
2012-04-21 17:01 user6 Note Added: 0022329
2012-04-26 13:25 zenerbufen Note Added: 0022382
2012-04-26 13:26 zenerbufen Note Edited: 0022382
2012-07-05 17:34 scriberman Note Added: 0023166
2014-07-20 17:30 panando Note Added: 0027083
2014-07-22 10:53 user6 Summary Build menu causes crash when zoomed => Build menu causes crash when zoomed with TrueType
2014-07-22 10:53 user6 Relationship added has duplicate 0004972
2014-07-22 10:54 user6 Relationship added has duplicate 0006713
2014-07-29 07:10 user6 Relationship added has duplicate 0007671
2014-07-29 07:12 user6 Relationship added related to 0006096
2014-07-29 14:25 Hello71 Note Added: 0027900
2014-07-29 14:38 user6 Relationship added has duplicate 0006867
2014-08-04 15:01 user6 Tag Detached: AWAITING UPDATE
2014-12-04 18:13 lethosor Status assigned => confirmed
2017-03-22 11:09 lethosor Relationship added has duplicate 0009993
2017-11-14 15:59 Loci Relationship added has duplicate 0010325
2017-12-02 12:55 Loci Relationship added has duplicate 0010406
2020-02-20 12:14 Loci Relationship added has duplicate 0011400
2020-06-18 22:34 lethosor Relationship added has duplicate 0011553
2021-11-04 22:26 tonren Note Added: 0041170
2021-11-04 22:29 tonren Note Edited: 0041170