#gemrb@irc.freenode.net logs for 20 Feb 2015 (GMT)

Archive Today Yesterday Tomorrow
GemRB homepage

[00:24:14] <Lightkey> https://www.gamingonlinux.com/articles/underworld-ascendant-the-spiritual-successor-to-ultima-underworld-no-longer-a-stretch-goal-for-linux.4989
[00:51:51] --> brada has joined #gemrb
[02:35:17] --> turtleman_ has joined #gemrb
[02:41:15] <-- turtleman_ has left IRC (Ping timeout: 264 seconds)
[06:49:30] <-- Lightkey has left IRC (Ping timeout: 250 seconds)
[06:56:55] <-- brada has left IRC (Quit: brada)
[07:02:16] --> Lightkey has joined #gemrb
[07:16:59] <-- Drakkar has left IRC (Read error: Connection reset by peer)
[07:17:16] --> Drakkar has joined #gemrb
[08:08:10] --> Eli2_ has joined #gemrb
[08:11:22] <-- Eli2 has left IRC (Ping timeout: 265 seconds)
[08:19:34] --> Eli2 has joined #gemrb
[08:20:33] <-- Eli2_ has left IRC (Ping timeout: 265 seconds)
[13:40:13] --> turtleman_ has joined #gemrb
[15:28:38] <-- turtleman_ has left IRC (Ping timeout: 244 seconds)
[15:41:17] --> turtleman_ has joined #gemrb
[16:17:23] <-- turtleman_ has left IRC (Ping timeout: 240 seconds)
[16:35:19] <-- edheldil has left IRC (Remote host closed the connection)
[16:36:12] --> edheldil has joined #gemrb
[16:36:12] --- ChanServ gives channel operator status to edheldil
[17:03:55] --> turtleman_ has joined #gemrb
[17:11:56] --> brada has joined #gemrb
[17:12:24] <brada> did this break: https://www.ohloh.net/p/gemrb/analyses/latest
[17:12:31] <brada> or does it always take months to update?
[17:12:44] <Pepelka> The GemRB Open Source Project on Open Hub
[17:12:45] <Pepelka> »The project page on OpenHub.net for GemRB. GemRB (Game engine made with preRendered Background) is a portable open-source implementation of Bioware's Infinity Engine which was written to support pseudo-3D role playing games based on the Dungeons & Drago...«
[17:13:36] <brada> “ problems with their code locations or other problems blocking Open Hub from collecting and analyzing code will show the Not Available icon”
[17:13:49] <brada> so broken?
[17:48:34] --> kpederse1 has joined #gemrb
[17:50:45] <-- kpedersen has left IRC (Ping timeout: 250 seconds)
[17:58:07] --> Beholder has joined #gemrb
[18:07:25] <brada> Beholder: edheldil was not able to reproduce your text issue with your data.
[18:07:35] <brada> are you sure that you are on the right brach?
[18:07:41] <brada> branch*
[18:07:54] <Beholder> latest master
[18:10:15] <brada> Beholder: just curious; do you see the same issue if you compile for android?
[18:11:23] <Beholder> dont tried, no android tools on new laptop
[18:12:00] <brada> well, if/when you get around to it and it works on android we will know to look at VS/windows issues.
[18:13:10] <Beholder> i can try to build without gl support
[18:13:33] <brada> oh, maybe that would be the problem…
[18:13:38] <brada> so, yes do try that
[18:14:06] --> kpedersen has joined #gemrb
[18:14:38] <brada> oh, except i dont think thats the problem, because you were getting the red rectangle with the debug setting enabled
[18:15:00] <brada> unless the gldriver for some reason changes the sprite size...
[18:15:59] <brada> Beholder: there is a debug method called Font::GlyphAtlasPage::DumpToScreen that you can use to dump the glyphs to the screen and see what it looks like
[18:16:36] <-- kpederse1 has left IRC (Ping timeout: 264 seconds)
[18:20:42] <-- turtleman_ has left IRC (Remote host closed the connection)
[18:22:46] --> turtleman_ has joined #gemrb
[18:30:15] <Beholder> hm, debug not works for me
[18:30:20] <Beholder> https://www.dropbox.com/s/7pbjcfojxhpaa0a/%D0%A1%D0%BA%D1%80%D0%B8%D0%BD%D1%88%D0%BE%D1%82%202015-02-20%2021.29.35.png?dl=0
[18:30:21] <Pepelka> Dropbox - Скриншот 2015-02-20 21.29.35.png
[18:31:20] <Beholder> TextContainer.cpp line 336
[18:35:11] <-- turtleman_ has left IRC (Ping timeout: 252 seconds)
[18:35:36] <Beholder> contents length is zero
[18:35:37] --> turtleman_ has joined #gemrb
[18:35:44] <Beholder> in line 336
[18:46:58] <Beholder> what may be wrong?
[18:50:37] <wjp> if contents is indeed empty, then one of VS's runtime checks clearly doesn't like decrementing an iterator past the beginning
[18:51:28] <-- turtleman_ has left IRC (Ping timeout: 252 seconds)
[18:52:25] <Beholder> yes
[18:52:47] <Beholder> but why is empty
[18:52:58] <Beholder> where it filling?
[18:54:28] <wjp> I have no idea what I'm talking about, but it doesn't seem strange that contents is empty
[18:55:25] <wjp> maybe just add a special case for contents.empty() to AppendContent?
[18:56:02] <wjp> (doing InsertContentAfter(content, 0); in that case)
[18:56:46] <Beholder> to see what will happen?
[18:57:01] <wjp> and as a potential fix as well
[19:01:42] <Beholder> strange
[19:02:39] <Beholder> InsertContentAfter pushes one element in contents
[19:07:34] --> kpederse1 has joined #gemrb
[19:08:11] <Beholder> dont understand this code
[19:08:32] <Beholder> we add content to ContentWrapper
[19:08:59] <Beholder> and trying to use it in textContainer
[19:09:24] <Beholder> TextArea.cpp line 688
[19:10:33] <Beholder> line 292
[19:10:36] <-- kpedersen has left IRC (Ping timeout: 264 seconds)
[19:10:48] <Beholder> in textContainer i see the contents is empty
[19:56:20] <brada> does nobody else here have VS to try and help beholder out here?
[19:56:52] <Beholder> no windows users)
[20:12:01] <wjp> didn't what I suggest work?
[20:12:36] <brada> wjp: it probably would solve the assert, but not likely the missing text
[20:13:19] <wjp> I'm not so sure. If appending to an empty list is broken, nothing may ever get added
[20:13:46] <brada> but his screenshots with debug enabled showed that there was text, it was just out of bounds
[20:14:06] <brada> problem with printing on buttons anyway, which dont use the text layout
[20:23:15] <-- Beholder has left IRC (Quit: Leaving)
[20:23:46] <brada> bah. i hope he comes back
[20:25:38] <brada> we have a Font::RenderTextAsSprite method he can use to save the breaking button text to. with a sufficiently large size it should hopefully become more clear what the problem is there.
[20:56:46] --> Beholder has joined #gemrb
[21:06:17] <Beholder> i dont know what can i do with this error
[21:07:48] <brada> whit that assert?
[21:07:54] <brada> wjp already told you how to fix that
[21:08:00] <brada> or do you mean something else?
[21:09:49] <Beholder> look at this, screenshot from VS (release). if i run gemrb from filesystem i get only several missing symbols, not all
[21:10:30] <Beholder> https://www.dropbox.com/s/uzp8litnku684lo/%D0%A1%D0%BA%D1%80%D0%B8%D0%BD%D1%88%D0%BE%D1%82%202015-02-21%2000.07.27.png?dl=0
[21:10:33] <Pepelka> Dropbox - Скриншот 2015-02-21 00.07.27.png
[21:12:49] <Beholder> a year ago i had not any problem with fonts and text
[21:13:32] <wjp> two days ago you had a screenshot in which most characters were ok (except for things after the cyrillic D). What changed?
[21:15:11] <Beholder> if i run gemrb fom system i get most characters displayed, if i run from visual studio (to debug) i see as on screenshot
[21:16:24] <Beholder> dont know why
[21:16:44] <Beholder> i cant debug anything
[21:17:23] <brada> why cant you debug?
[21:17:27] <Beholder> my be i need to force any path's in config?
[21:17:36] <Beholder> no text
[21:17:41] <brada> so?
[21:17:50] <brada> i dont undersstand why that prevents you from debugging
[21:18:23] <brada> I suggested earlier some ways you can dump the fonts/text to the screen without it getting culled
[21:19:22] <brada> it is odd that you would get 2 diffrent results tho...
[21:19:37] <Beholder> yes
[21:19:45] <brada> did you turn off all optimizations?
[21:21:06] <wjp> assert(CurrentAtlasPage->AddGlyph(chr, tmp));
[21:21:24] <wjp> tsk tsk :-)
[21:21:39] <Beholder> optimizations disabled by default in debug mode
[21:24:30] <Beholder> wjp, what can i do with this line? it causes no assertions
[21:25:19] <Beholder> line 169 font.cpp
[21:25:32] <Beholder> no problem with it
[21:25:37] <wjp> http://www.usecode.org/gemrb/oops.png
[21:25:43] <wjp> so that likely explains it
[21:26:09] <wjp> fix committed
[21:26:18] <Pepelka> [commit] : Fix assert with side effect https://github.com/gemrb/gemrb/commit/d2e52d8f8a562bfd9f76b846f59bbd94d0b0f94a
[21:26:26] <wjp> ( https://github.com/gemrb/gemrb/commit/d2e52d8f8a562bfd9f76b846f59bbd94d0b0f94a )
[21:26:28] <brada> he he my bad
[21:26:33] <Pepelka> Fix assert with side effect · d2e52d8 · gemrb/gemrb · GitHub
[21:26:34] <Pepelka> »gemrb - Engine Made with preRendered Background«
[21:26:44] <brada> why isnt assert a macro that jsut vanishes in non debug scenarios :/
[21:26:55] <brada> should also maybe be a compile warning
[21:27:40] <wjp> I guess I'll also add that special case for the Append
[21:29:37] <wjp> InsertContentAfter(content, 0); for appending to an empty contents should be ok, right?
[21:29:50] <brada> wjp: isnt that going to addd a warning for an unused variable now?
[21:30:01] <brada> wjp: yes, that sounds fine
[21:30:02] <fuzzie> brada: because assert is specifically *not* for that case
[21:30:46] <fuzzie> msvc has this VERIFY thing which I wish was standard
[21:31:16] <Beholder> yes this fix missing chars if i run out of vs
[21:32:22] <Pepelka> [commit] : Add special case for appending to empty contents in ContentContainer https://github.com/gemrb/gemrb/commit/a5a82081c01447ec620af592db17ff7adbf03323
[21:32:25] <wjp> hurray
[21:32:45] <wjp> (and inside vs?)
[21:33:13] <wjp> brada: hm, yes, I suppose that might give a warning with NDEBUG. Blegh.
[21:36:33] <Beholder> in vs i missing all texts (release) and in debug get assert message in another place (damn)
[21:38:02] <wjp> and you recompiled the release version?
[21:38:05] <Beholder> dont understand why text not displayed in vs only
[21:38:12] <Beholder> right
[21:38:32] <wjp> anyway, let's fix those asserts you're getting
[21:39:16] <brada> well they may be sideffects of the no text business…
[21:39:36] <Beholder> font.cpp line 599
[21:40:12] <Beholder> https://www.dropbox.com/s/qa4s6kys25zz4gn/%D0%A1%D0%BA%D1%80%D0%B8%D0%BD%D1%88%D0%BE%D1%82%202015-02-21%2000.39.41.png?dl=0
[21:40:16] <Pepelka> Dropbox - Скриншот 2015-02-21 00.39.41.png
[21:40:30] <wjp> std::isspace
[21:41:53] <wjp> hrm, should that be iswspace?
[21:42:32] <brada> probably...
[21:43:07] <Beholder> i'll try
[21:44:39] <Beholder> no iswspace member
[21:45:05] <Beholder> hm
[21:46:01] <fuzzie> that should just be done manually
[21:46:21] <Beholder> may be i need to force character set in project settings?
[21:46:32] <Beholder> unicode?
[21:46:38] <fuzzie> relying on widechar is such a bad idea
[21:48:37] <fuzzie> oh, we're using wstring? :P so ok, nm, doomed already :)
[21:48:43] <wjp> yes, very doomed :-)
[21:48:45] <wjp> try this, then: ws = string[i] >= 0 && string[i] <= 255 && std::isspace(string[i]);
[21:49:00] <wjp> not the cleanest, but let's try to continue
[21:49:54] <wjp> text is working for me with NDEBUG now, by the way
[21:50:04] <fuzzie> can you not use ::iswspace?
[21:50:21] <wjp> (and this "ok" isn't the only unused variable when building with NDEBUG...)
[21:51:23] <brada> why is wchar bad idea? we only need 16 bits...
[21:51:40] <fuzzie> because compiler support is flaky as heck
[21:51:45] <fuzzie> or, well, runtime support is flaky as heck
[21:51:45] <wjp> probably just needs #include <cwctype> for iswspace
[21:51:46] <brada> still?
[21:52:04] <brada> hasnt that been standardized for ages now?
[21:52:09] <fuzzie> we live in a world where Android had a broken dynamic_cast up until a year or so ago ;-)
[21:52:17] <brada> bah!
[21:52:29] <fuzzie> but I just thought we shouldn't add w stuff if we don't use it
[21:52:38] <fuzzie> if we use it already: super don't care, look into it if it's a problem
[21:52:49] <wjp> fuzzie: I really wouldn't have suggested it if we weren't already using it :-)
[21:53:07] <brada> well we do use 16 bit characters
[21:53:44] <Beholder> right it works in debug without asserts... and without text too))
[21:54:10] <wjp> fun
[21:55:06] <Beholder> and no text if i run out of ws instead of release
[21:55:09] <fuzzie> hahaha. android's headers from a few years ago: "IMPORTANT: Any code that relies on wide character support is essentially non-portable and/or broken. [...] I'm not nice enough to provide you with a real implementation. instead wchar_t == char"
[21:55:12] <Beholder> of VS
[21:55:24] <fuzzie> android such an insane platform :(
[21:56:24] <fuzzie> (it is much better now.)
[21:56:51] * wjp ponders
[21:56:57] <fuzzie> this is all on master?
[21:57:10] <Beholder> right
[21:57:13] <Beholder> master
[21:57:37] <Beholder> i see text only on release and only out of VS
[21:57:47] <Beholder> in other cases no text
[21:58:13] <wjp> red boxes?
[21:59:17] <wjp> (and interestingly the FPS counter _does_ show text)
[22:00:56] <fuzzie> I get no video with movies, is this new?
[22:01:11] <fuzzie> oh, I'm using gl, nm
[22:03:57] <fuzzie> it is kinda broken for me with gl, but I will rebuild without
[22:04:02] <Beholder> yes red boxes, fps text shows properly
[22:04:18] <wjp> try putting a breakpoint at Font.cpp:443
[22:07:07] <Beholder> 442? 443 is #endif
[22:07:56] <wjp> no, 444 is the endif
[22:08:07] <wjp> did you update to the newest version after my patch for that assert?
[22:08:59] <Beholder> yes
[22:09:22] <Beholder> i pulled latest
[22:09:51] <wjp> anyway, on the DrawRect(lineRgn, ColorRed, false);
[22:10:01] <Beholder> ok
[22:10:33] <Beholder> what values you need?
[22:11:01] <wjp> currChar, lineRgn, curGlyph
[22:11:45] <Beholder> curGliph is empty rect, all values are zero
[22:12:33] <wjp> ok, I suppose that was expected
[22:12:36] <wjp> currChar?
[22:12:45] <Beholder> currChar has value 58606 `-`
[22:13:32] <wjp> uh oh
[22:13:36] <Beholder> lineRgn is valid
[22:14:08] <wjp> those are the two first characters squashed together in a single wchar_t
[22:14:37] <brada> i wonder what his localization settings are set to
[22:15:14] <wjp> where do you convert to wstring?
[22:15:15] <brada> look at StringFromEncodedData
[22:15:41] <brada> and core->TLKEncoding
[22:17:51] <Beholder> encoding ISO-8859-1
[22:18:14] <Beholder> widechar & multibute are true
[22:18:28] <Beholder> multibyte
[22:21:26] <lynxlynxlynx> latin1
[22:21:56] <wjp> I don't see where widechar and multibyte are initialized to false
[22:22:51] <Beholder> it always true?
[22:24:28] <wjp> oh, POD value initialization I suppose
[22:24:28] <Beholder> but i dont understand why release build started from system shows text...
[22:25:18] <wjp> try setting a breakpoint at the start of Interface::LoadEncoding() (core/Interface.cpp)
[22:25:39] <wjp> and see what TLKEncoding is at the start, and how it's changed in that function
[22:27:02] <Beholder> iso-8859-1 at start
[22:27:18] <wjp> and widechar/multibyte?
[22:28:05] <Beholder> yes
[22:28:20] <Beholder> no changes
[22:28:47] <wjp> do you mean true?
[22:30:00] <wjp> I'm mainly interested in the value of widechar/multibyte at the start and at the end of the function
[22:30:55] <Beholder> no changes in function. true and true
[22:31:17] <wjp> peculiar
[22:31:53] <wjp> try setting multibyte, widechar and zerospace to false at the start of the function?
[22:33:44] <brada> wjp: thanks for debugging this :)
[22:33:51] <wjp> known bug in VS it seems. Sigh.
[22:34:03] <wjp> apparently you can't trust it will value-initialize TLKEncoding
[22:34:20] <wjp> so we should just manually initialize these fields
[22:34:33] <wjp> assuming this actually fixes the problem
[22:37:06] <Beholder> works now
[22:37:22] <Beholder> all values still false
[22:37:33] <Beholder> at the end of func
[22:37:40] <wjp> yay
[22:39:20] <wjp> committed that too
[22:39:27] <Pepelka> [commit] : Use iswspace instead of isspace for wchar_t https://github.com/gemrb/gemrb/commit/935b9bbcb629a1d474cf4e79d57db30bbbfaf7fd
[22:39:28] <Pepelka> [commit] : Manually initialize TLKEncoding https://github.com/gemrb/gemrb/commit/2c53a05f223911e97d2d873bd0e2f8883834f416
[22:39:52] <wjp> did I miss anything?
[22:40:46] <wjp> there are now commits for this AppendContent, the AddGlyph bug that showed up with the cyrillic D, this TLKEncoding initialization, and the isspace assert
[22:42:30] <Beholder> ha
[22:42:50] <Beholder> bug with bad fonts in dialog
[22:43:11] <Beholder> GetSharedPalette
[22:43:33] <Beholder> VS says that palCol is corrupted
[22:44:02] <brada> is that with GL, or no?
[22:44:10] <Beholder> no
[22:44:17] <Beholder> GemMarkup.cpp
[22:44:20] <Beholder> Run-Time Check Failure #2 - Stack around the variable 'palCol' was corrupted.
[22:45:07] <wjp> oh, that function looks very bad
[22:46:52] <-- Drakkar has left IRC (Ping timeout: 240 seconds)
[22:47:10] <wjp> and of course MS's scanf doesn't seem to support hh either
[22:47:19] --> Drakkar has joined #gemrb
[22:47:34] <brada> i cant see what is wrong there… no suprise i guess since i wrote it :p
[22:48:01] <wjp> writing ints to char*'s
[22:48:05] <wjp> in the scanf
[22:49:06] <brada> i originally had used hh, but somebody complained
[22:49:20] <wjp> MSVC doesn't do hh
[22:49:33] <wjp> so effectively you can't write directly to char*'s
[22:50:00] <wjp> where can I test if what I'm turning it into is working?
[22:50:16] <brada> the bg2 message window
[22:50:29] <brada> this is for colorizing the text that goes into that
[22:51:46] <wjp> so if the dialog options are red, it should be fine?
[22:54:10] --> edheldil_ has joined #gemrb
[22:57:23] <wjp> Beholder: committed a fix
[22:57:44] <Pepelka> [commit] : Fix scanf type mismatch https://github.com/gemrb/gemrb/commit/cff18148dece832b3dd82b7acbb850b93e417d78
[22:59:02] <Beholder> thank you, this fixed stratched text in dialog
[22:59:36] <wjp> these VS debugging features are nice
[22:59:54] <lynxlynxlynx> brada: oh and ohloh/newname has global issues, but they're working on it
[23:00:24] <Beholder> i'll go to sleep, too late for debugging
[23:00:44] <Beholder> bye
[23:01:19] <wjp> good night
[23:01:50] <-- Beholder has left IRC (Quit: Leaving)
[23:04:50] <brada> well glad thats solved
[23:09:42] <wjp> yup, those were mysterious symptoms
[23:09:53] <wjp> I should be going too; 'night
[23:13:04] <brada> night, thanks again
[23:33:57] <-- edheldil_ has left IRC (Ping timeout: 250 seconds)
[23:53:33] <Pepelka> [commit] bradallred: shouldnt need cctype header (cwctype instead) https://github.com/gemrb/gemrb/commit/ef55e70143408324b6af4fff95a99557150d7f64