Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0001498Dwarf FortressDwarf Mode -- Jobs, Generalpublic2010-04-24 13:592014-08-13 05:10
Draco18s 
Toady One 
normalminoralways
resolvedfixed 
0.31.03 
0.34.01 
0001498: Crystal glass items can't be made, CRYSTAL_GLASSABLE appears broken
One can not use (imported) raw glass to make windows at the glass furnace.

I have 16 units of imported raw crystal glass and the job cancels "needs glass making rough gems," which seems silly: if you have raw glass you should be able to turn that into any glass object.

The only way to turn raw glass into glass windows is cutting it into gems and making a gem window (using 3 times the material).
Import glass
Use glass furnace to make glass window
binary patch
has duplicate 0001281closed Footkerchief Raw Rock Crystals not recognized for making crystal glass objects 
has duplicate 0000788resolved Footkerchief Traded raw clear/crystal glass not appearing at Jeweler's Workshop, although green glass does 
related to 0003408new  Human merchants bring raw clear/crystal glass despite not having access to pearlash 
Issue History
2010-04-24 13:59Draco18sNew Issue
2010-04-24 14:14Logical2uNote Added: 0004920
2010-04-24 14:21Draco18sNote Added: 0004921
2010-04-24 14:23Draco18sNote Edited: 0004921bug_revision_view_page.php?bugnote_id=0004921#r1722
2010-04-24 14:28Draco18sNote Edited: 0004921bug_revision_view_page.php?bugnote_id=0004921#r1723
2010-04-25 01:52FootkerchiefNote Added: 0004961
2010-04-25 01:53FootkerchiefNote Edited: 0004961bug_revision_view_page.php?bugnote_id=0004961#r1737
2010-04-25 01:53FootkerchiefNote Edited: 0004961bug_revision_view_page.php?bugnote_id=0004961#r1738
2010-04-25 01:54FootkerchiefNote Edited: 0004961bug_revision_view_page.php?bugnote_id=0004961#r1739
2010-04-25 01:54FootkerchiefIssue Monitored: Footkerchief
2010-04-25 10:38FootkerchiefNote Edited: 0004961bug_revision_view_page.php?bugnote_id=0004961#r1762
2010-04-25 14:13Draco18sNote Added: 0005036
2010-04-25 14:51DoctorZuberNote Added: 0005039
2010-04-25 14:53DoctorZuberNote Edited: 0005039bug_revision_view_page.php?bugnote_id=0005039#r1768
2010-04-25 14:53DoctorZuberNote Edited: 0005039bug_revision_view_page.php?bugnote_id=0005039#r1769
2010-04-25 15:12FootkerchiefNote Added: 0005042
2010-04-25 15:13FootkerchiefNote Edited: 0005042bug_revision_view_page.php?bugnote_id=0005042#r1771
2010-04-25 15:35Draco18sNote Added: 0005047
2010-04-25 15:36Draco18sNote Edited: 0005047bug_revision_view_page.php?bugnote_id=0005047#r1775
2010-04-25 16:18FootkerchiefSummaryRaw Glass Cannot Make Windows => Clear glass items can't be made
2010-04-25 16:19FootkerchiefNote Added: 0005052
2010-04-25 19:09clamityNote Added: 0005066
2010-04-26 11:08FunkyWaltDoggNote Added: 0005150
2010-04-26 11:11FootkerchiefNote Edited: 0005052bug_revision_view_page.php?bugnote_id=0005052#r1818
2010-04-26 11:11FootkerchiefSummaryClear glass items can't be made => Crystal glass items can't be made
2010-04-26 11:11FootkerchiefNote Added: 0005152
2010-04-26 13:09Rafal99Note Added: 0005166
2010-04-26 17:05MalicusNote Added: 0005207
2010-04-26 18:00FootkerchiefSummaryCrystal glass items can't be made => Crystal glass items can't be made, CRYSTAL_GLASSABLE appears broken
2010-04-26 19:49qwintsNote Added: 0005241
2010-04-30 13:32FootkerchiefRelationship addedhas duplicate 0001281
2010-05-04 17:56bakawolfNote Added: 0006129
2010-05-07 01:47JerkwhistleNote Added: 0006336
2010-08-05 18:24HebaruSanIssue Monitored: HebaruSan
2010-08-16 09:48ShurhaianIssue Monitored: Shurhaian
2010-10-25 13:42QuietustNote Added: 0013511
2010-10-25 13:45QuietustNote Edited: 0013511bug_revision_view_page.php?bugnote_id=0013511#r5230
2010-11-16 13:35FootkerchiefRelationship addedrelated to 0003408
2011-01-06 15:50FarmerbobNote Added: 0014813
2011-03-01 23:51DrakosIssue Monitored: Drakos
2011-03-01 23:59FootkerchiefSticky IssueNo => Yes
2011-03-02 04:46Hieronymous AlloyIssue Monitored: Hieronymous Alloy
2011-03-31 09:27InsanityPreludeNote Added: 0016860
2011-04-03 01:34JyrinxIssue Monitored: Jyrinx
2011-04-03 01:35JyrinxNote Added: 0017002
2011-04-03 06:16nb4estIssue Monitored: nb4est
2011-04-03 09:32QuietustNote Added: 0017010
2011-05-21 16:50malvadoNote Added: 0017816
2011-05-23 07:00KonIssue Monitored: Kon
2011-05-28 22:29QuietustNote Added: 0017892
2011-05-29 08:56QuietustNote Edited: 0017892bug_revision_view_page.php?bugnote_id=0017892#r6681
2011-05-29 18:25QuietustNote Edited: 0017892bug_revision_view_page.php?bugnote_id=0017892#r6682
2011-06-01 13:28QuietustNote Edited: 0017892bug_revision_view_page.php?bugnote_id=0017892#r6691
2011-06-01 13:28QuietustNote Edited: 0017892bug_revision_view_page.php?bugnote_id=0017892#r6692
2011-06-01 13:28QuietustNote Edited: 0017892bug_revision_view_page.php?bugnote_id=0017892#r6693
2011-06-04 04:53MaDeR LevapNote Added: 0017931
2011-06-13 13:07AnotherIssue Monitored: Another
2011-06-18 19:19QuietustNote Edited: 0017892bug_revision_view_page.php?bugnote_id=0017892#r6734
2011-06-29 12:06EgodeusIssue Monitored: Egodeus
2011-06-30 11:45EgodeusNote Added: 0018108
2011-06-30 11:46EgodeusTag Attached: Probable Quick Fix
2011-06-30 12:52EgodeusNote Edited: 0018108bug_revision_view_page.php?bugnote_id=0018108#r6764
2011-07-09 03:50BeeskeeIssue Monitored: Beeskee
2011-07-30 09:08Hieronymous AlloyNote Added: 0018370
2011-07-30 09:22QuietustNote Added: 0018371
2011-07-30 10:11FootkerchiefIssue Monitored: Toady One
2011-08-01 06:22Hieronymous AlloyNote Added: 0018406
2011-08-01 07:18Hieronymous AlloyNote Edited: 0018406bug_revision_view_page.php?bugnote_id=0018406#r6879
2011-08-22 07:26QuietustNote Added: 0018609
2011-10-19 00:15KogutNote Added: 0018867
2011-10-27 22:40KogutTag Attached: binary patch
2012-02-01 10:15QuietustNote Added: 0019445
2012-02-15 12:22FootkerchiefTag Detached: Probable Quick Fix
2012-02-16 17:11Toady OneNote Added: 0019877
2012-02-16 17:11Toady OneStatusnew => resolved
2012-02-16 17:11Toady OneFixed in Version => 0.34.01
2012-02-16 17:11Toady OneResolutionopen => fixed
2012-02-16 17:11Toady OneAssigned To => Toady One
2012-03-17 07:11DwarfuSticky IssueYes => No
2012-11-27 18:16nb4estIssue End Monitor: nb4est
2014-01-15 14:49Kirig Stonebeard IIIssue Monitored: Kirig Stonebeard II
2014-01-17 10:03Kirig StonebeardIssue Monitored: Kirig Stonebeard
2014-01-27 13:45FootkerchiefRelationship addedrelated to 0000788
2014-01-27 13:45FootkerchiefRelationship replacedhas duplicate 0000788
2014-08-13 05:10KonIssue End Monitor: Kon

Notes
(0004920)
Logical2u   
2010-04-24 14:14   
Since you say this is only occurring with IMPORTED glass, and you're assuming it's also true for non-imported glass, I'm tempted to say this is related to/duplicate of 0000788.

Unless you also have evidence that ALL glass - including non-imported stuff - is broken.
(0004921)
Draco18s   
2010-04-24 14:21   
(edited on: 2010-04-24 14:28)
No, it appears in the jewelers shop, but I can't use it in the glass furnace.

Also: I can't MAKE MY OWN crystal glass, when I have sand (imported), charcoal, pearlash, and rough rock crystals available. Cancels "needs glass making rough gems," as before.

None. Not a single crystal glass item can be made when all possible raw materials are available (clear and green, yes, not crystal).

http://i44.tinypic.com/120rssn.png [^]

(0004961)
Footkerchief   
2010-04-25 01:52   
(edited on: 2010-04-25 10:38)
"Raw glass" is essentially a rough gem. You can't make furniture out of it. Furniture has to be made directly from sand (or rock crystal). See http://df.magmawiki.com/index.php/40d:Glass#Making_glass_items [^]

In this case, the "glass-making rough gems" refers to rough rock crystal.

Makes sense now?

(0005036)
Draco18s   
2010-04-25 14:13   
Footkerchief:
I can't make ANY CRYSTAL GLASS ITEM OUT OF SAND/ROCK CRYSTALS EITHER.
(0005039)
DoctorZuber   
2010-04-25 14:51   
(edited on: 2010-04-25 14:53)
raw glass is not an ingredient in making glass items.

the ingredients you need for clear glass are sand, and pearlash.

the ingredients you need for crystal glass are pearlash bars, and rock crystal.

Raw glass is used only to make glass gems used for decorating things.

(0005042)
Footkerchief   
2010-04-25 15:12   
(edited on: 2010-04-25 15:13)
I can't make ANY CRYSTAL GLASS ITEM OUT OF SAND/ROCK CRYSTALS EITHER.

Ah, I hadn't read your note. Are you sure the crystals are accessible? Do you still get the problem when the crystals and pearlash are in stockpiles right next to the glass furnace?

(0005047)
Draco18s   
2010-04-25 15:35   
(edited on: 2010-04-25 15:36)
Yes.

http://i43.tinypic.com/10pqc6p.png [^]

@Dr.Zuber: yeah, got that. Read my notes.

(0005052)
Footkerchief   
2010-04-25 16:19   
(edited on: 2010-04-26 11:11)
Okay, I've retitled the thread to reflect the actual apparent bug.

Has anyone managed to make CRYSTAL glass items?

(0005066)
clamity   
2010-04-25 19:09   
I have had no problems making clear glass items, but I haven't tried crystal yet. To note, my glass industry is all local, so I haven't tried with imported sand/pearlash.
(0005150)
FunkyWaltDogg   
2010-04-26 11:08   
I have made clear glass windows without any problem, using sand brought on embark and homemade pearlash.
(0005152)
Footkerchief   
2010-04-26 11:11   
Ack goddamit, I messed up the title and my question. I meant, has anyone managed to make CRYSTAL glass items?
(0005166)
Rafal99   
2010-04-26 13:09   
I tried it. My glassmaker brought pearlash to glass furnace then cancelled the task with "needs glass-making rough gems" message. It seems right since I have only cut rock crystals bought from the traders. For crystal glass you need ROUGH rock crystals that you can't buy from traders.
(0005207)
Malicus   
2010-04-26 17:05   
I made a new world, embarked somewhere, revealed the map to search for rock crystals, and I somehow found some on the first embark site. I then set about making some pearlash and having my miners get the rough rock crystals. I then tried to make a crystal glass floodgate. The glassmaker grabbed the pearlash, but then he cancelled because he "needs glass-making rough gems". There was a stockpile with ten rough rock crystals right next to the glass furnace. Just to make sure it wasn't some weird pathing problem, I constructed a jeweler's workshop and ordered one of the rock crystals cut, which happened without a hitch. I tried making a crystal glass floodgate again and got the same cancellation message.

I suspect that [CRYSTAL_GLASSABLE] in the raws for rock crystals isn't working quite as it should.
(0005241)
qwints   
2010-04-26 19:49   
I've gotten the same message when attempting to make crystal glass with local rock crystal.
(0006129)
bakawolf   
2010-05-04 17:56   
i am also unable to make any crystal glass items, with an abundance of rough rock crystals in a stockpile next to the furnace, and pearlash nearby.
(0006336)
Jerkwhistle   
2010-05-07 01:47   
I have the same problem. I have 25 units of accessible rock crystals and sand/pearlash, but get the "need glass-making raw gems" message. I checked an old version, and rock crystals had the [GLASS] tag, not [CRYSTAL_GLASSABLE]. I suspect that maybe something didn't get updated in the code, but switching back to the old tag didn't work, and neither did [CRYSTAL] or [CRYSTAL_GLASS] (although I'm not sure I remembered to change the tags in both the save directory and the main raws for the last two).
(0013511)
Quietust   
2010-10-25 13:42   
(edited on: 2010-10-25 13:45)
Just confirming that this is still a problem in version 0.31.16 - I dug out some rough rock crystals (and allowed them to be stockpiled nearby), made some pearlash, then tried making a crystal glass terrarium.

"èrith Adiltekkud, Weaver cancels Make crystal glass Terrarium: Needs glass-making rough gems."

(0014813)
Farmerbob   
2011-01-06 15:50   
I am still experiencing this issue in DF 0.31.18

Cannot make anything from raw crystal glass., keep getting the "Needs glass-making rough gems" error.
(0016860)
InsanityPrelude   
2011-03-31 09:27   
Noticed it again in 31.21.
(0017002)
Jyrinx   
2011-04-03 01:35   
My baroness demands crystal glass items; right now, I'd have to say this issue is more than “minor” to me (and I suspect that whichever dorf gets thrown in a cage for violating a work order will agree ...)
(0017010)
Quietust   
2011-04-03 09:32   
Jyrinx: you might be able to accomplish that by cutting raw crystal glass, which you can buy from caravans.
(0017816)
malvado   
2011-05-21 16:50   
Since this bug has been around for about a year, isn't it time for it's Severity to be increased? Depending on your mayor this can pretty much ruin a fortress if you are quite unlucky.
(0017892)
Quietust   
2011-05-28 22:29   
(edited on: 2011-06-18 19:19)
With the help of a debugger, I managed to locate the problem - when a job attempts to check if a rough gem is good for glass-making, it calls a function which is supposed to fetch the item's material and check if property flag number 50 (CRYSTAL_GLASSABLE) is set. Unfortunately, it seems to be done through a macro of the form "CHECK_MATERIAL_FLAG(flag,mat,submat)" which in this case is being called with the "flag" parameter in the wrong place (at the end instead of at the beginning), meaning that, instead of evaluating to "getMaterial(mat_type, mat_subtype).checkFlag(50)", it's ending up with "getMaterial(mat_subtype, 50).checkFlag(mat_type)" which always fails (unless you've modded mountain gnomes to have about 50 additional materials such that the 70th material is made of [BONE]).

For the Win32 SDL 0.31.25 build, the following binary patch fixes crystal glass production:
0036AE87: 7C B8 32 00 00 00 -> 78 0F BF 47 7C 90
0036AE9B: 0F BF 4F 78 85 C9 78 2D -> B9 32 00 00 00 90 90 90

(0017931)
MaDeR Levap   
2011-06-04 04:53   
Wow. No, I am not sarcastic. Binary patch?! Did you sent to Toady your analysis? Maybe then he will FINALLY get around to fix this line of code. -.-
(0018108)
Egodeus   
2011-06-30 11:45   
(edited on: 2011-06-30 12:52)
I tested Quietust's patch and it fixes the problem with crystal glass. Could Footkerchief promote this to Toady for fixing as this testing shows that the fix requires only moving a few variables around in a function call. This would make it unnecessary to hoard raw crystal glass for mandates and also allow us to actually make all kinds of sweet items from crystal glass.

A test showing the effects of the modification by Quietust:
http://dffd.wimbli.com/download.php?id=4597&f=region3+Making+a+crystal+glass+door.zip [^]

(0018370)
Hieronymous Alloy   
2011-07-30 09:08   
How do you go about installing this patch manually, then? or is that even possible?
(0018371)
Quietust   
2011-07-30 09:22   
You "install" the patch by using a hex-editor and manually changing the indicated bytes at the indicated addresses.
(0018406)
Hieronymous Alloy   
2011-08-01 06:22   
(edited on: 2011-08-01 07:18)
Ack! I don't suppose anyone wants to post an edited/fixed file somewhere? I'm not a hex editor, but I can download and copy over a file.

(0018609)
Quietust   
2011-08-22 07:26   
Patch for the Win32 Legacy 0.31.25 build:
00389747: 7C B8 32 00 00 00 -> 78 0F BF 47 7C 90
0038975B: 0F BF 4F 78 85 C9 78 2D -> B9 32 00 00 00 90 90 90
(0018867)
Kogut   
2011-10-19 00:15   
http://dffd.wimbli.com/file.php?id=4865 [^] - This is the hex patched version of DF 0.31.25 WINDOWS SDL. It restores the use of crystal glass as stated in the bug report http://www.bay12games.com/dwarves/mantisbt/view.php?id=1498#c17892 [^] by Quietust.

http://dffd.wimbli.com/file.php?id=4886 [^] - This is the hex patched version of DF 0.31.25 WIDOWS LEGACY. It restores the use of crystal glass as stated in the bug report http://www.bay12games.com/dwarves/mantisbt/view.php?id=1498#c17892 [^] by Quietust.

To use:
simply over write your Dwarf Fortress.exe with this one.
(0019445)
Quietust   
2012-02-01 10:15   
Binary patch for version 0.31.25 Linux: (untested)
57335F : 0C -> 04
573367 : 08 -> 0C
573376 : 04 -> 08
(0019877)
Toady One   
2012-02-16 17:11   
This should be corrected in 0.34.01.