Config
Log for #openttd.dev on 3rd March 2013:
Times are UTC Toggle Colours
00:00:34  *** Supercheese has quit IRC
05:44:47  *** Supercheese has joined #openttd.dev
08:20:29  *** Alberth has joined #openttd.dev
08:20:29  *** ChanServ sets mode: +v Alberth
09:12:53  *** Supercheese has quit IRC
10:15:53  *** frosch123 has joined #openttd.dev
10:15:53  *** ChanServ sets mode: +v frosch123
10:18:23  *** DorpsGek has quit IRC
10:19:00  *** DorpsGek has joined #openttd.dev
10:19:00  *** ChanServ sets mode: +v DorpsGek
10:19:06  <frosch123> @services op
10:19:06  *** ChanServ sets mode: +o DorpsGek
10:57:52  <frosch123> http://devs.openttd.org/~frosch/diffs/nospritecacheoom.diff <- do not crash when spritecache allocation causes oom
10:57:56  <frosch123> but reduce the size
10:58:17  <frosch123> i have no idea though, how to display this problem to the user in a useful way
10:58:28  <frosch123> displaying an error message on every start does not sound right
10:58:36  <frosch123> and permanently reducing the spritecache neither
11:00:14  <frosch123> alternatively we can also try to allocate twice the requested size first
11:00:25  <frosch123> so we only ever use at most 50% for the spritecache
11:05:53  <Alberth> std::bad_alloc& oom   swap & and the space
11:07:09  <frosch123> hmm, work disease again :s
11:07:46  <Alberth> we throw a warning of missing sprites in the user his face, which seems less serious than lack of memory
11:08:11  <frosch123> well, but he can update to get rid of it :p
11:08:24  <frosch123> i am not sure whether editing the config file is a fair solution
11:08:36  <Alberth> to a nightly? :)
11:08:57  <frosch123> ideally he only gets the message when already playing a nightly :p
11:09:14  <Alberth> oh, that could be, I don't know :)
11:09:36  <frosch123> usually ogfx manages a release before our releases
11:09:41  <frosch123> though i am worried about zbase
11:10:36  <Alberth> I cannot change the sprite cache size from the program, can I?
11:10:48  <Alberth> ie I would need to edit the config
11:11:39  <Alberth> wouldn't I also need to edit the config to get in trouble with claiming I have more memory than I have in reality?
11:12:59  <frosch123> yes, the spritecache size can only be changed via the config file
11:13:03  <frosch123> not even via ingame console
11:13:20  <frosch123> and when using a 32bpp baseset ottd defaults to 512MiB spritecache
11:13:30  <frosch123> which has been too much for various reporters
11:13:58  <Alberth> imho throwing an error on startup would be fine then, as I messed with the config file
11:14:32  <frosch123> well, do you want to throw an error for all netbook users who have less than 512 MiB ?
11:15:20  <Alberth> Silently changing it back would be a step too far, but perhaps report the correct line in the message?
11:15:33  <Alberth> do they sell that kind of machines????? :o
11:15:35  <frosch123> what do you mean with "changing back"?
11:15:38  <frosch123> i mean the default
11:16:22  <frosch123> but ok, we can just throw errors for people with netbooks :)
11:16:29  <frosch123> better than crashing in any case :p
11:16:46  <Alberth> hmm, what about we interpret the number as 'desired', and do as well as possible,
11:17:06  <Alberth> ie if we find less memory, it's ok too
11:17:06  <frosch123> you end up with 5 frames per second in the titlegame :)
11:17:14  <frosch123> that will cause bug reports as well
11:17:39  <frosch123> we got multiple reports for 1.2.0 before we increased the default size
11:18:44  <Alberth> I mean, set it to any size, eg 512MB, we try to reach that, but ignore the error
11:19:10  <Alberth> maybe we should have some minimum that we really want to have though :p
11:19:25  <frosch123> as said, ignoring the error and not reporting anything to the user will result in bug reports "i upgraded ottd, and it runs at 5 fps"
11:20:06  <frosch123> Alberth: we were fine with 4 MiB of spritecache for years, then someone implemented 32bpp and extra zoom :p
11:20:18  <Alberth> right :)
11:20:55  <Alberth> make a timer-ish thingie that we report the error once every two weeks?
11:21:48  <frosch123> maybe there is a wiki page about editing the config file, so i could add an URL in the message how to get rid of it :p
11:22:06  <Alberth> on the other hand, throwing it in the face is a good way of telling "you're insane to try this, but go ahead" :p
11:23:11  <Alberth> or we refuse to start up
11:24:06  <Alberth> or refuse to switch to 32bpp blitter
11:25:02  <Alberth> which is somewhat of a problem when your machine does not have 8bpp blitter support :p
11:25:47  <Alberth> well, perhaps changing the config is not that bad, together with an error
11:26:03  <frosch123> yeah, i'll go for that then :)
11:26:14  <Alberth> ie it's the best you can do for that machine
11:26:47  <Alberth> hmm, start many apps, start openttd, and get a broken mem-config :p
11:26:54  <Alberth> bleh :(
11:27:35  <Alberth> add a 'has run successfully with this mem config' ?
11:29:04  <frosch123> i'll go with just always displaying the error
11:29:15  <frosch123> and see whether we get any complains :p
11:30:06  <Alberth> the alternatives are not that good, that one is safe, at least
12:04:04  <frosch123> http://devs.openttd.org/~frosch/diffs/nospritecacheoom.diff <- updated
12:04:22  <frosch123> displays error on startup or when swithcing to 32bpp in game
12:04:31  <frosch123> also limits the spritecache to 50% of the possible size
12:06:14  <Alberth> is the latter useful?  /me reads back for the idea
12:07:49  <Alberth> alternatively we can also try to allocate twice the requested size first <-- why not + 10% or 1MB extra or so?
12:09:08  <Alberth> .. You can try to disable .. -> .. To reduce memory use, you can disable ..
12:09:10  <frosch123> i have no idea how much memory the rest of ottd needs :p
12:09:15  <frosch123> 50% just feels easy
12:10:52  <Alberth>  /* Remember 'target_size' from the previous allocation attempt, so we d  <-- make that in a doxygen-ish description
12:11:12  <frosch123> doxygen within functions?
12:11:52  <Alberth> oh, sorry
12:12:19  <Alberth> is 'uint' enough to store the number?
12:13:08  <frosch123> _sprite_cache_size is 128 max
12:13:51  <frosch123> err, i mean 512 max, so target_size is 2 GB max
12:14:27  <Alberth> 1 whole bit left :)
12:14:29  <frosch123> hmm, oh.. right
12:14:34  <frosch123> that will fail with the 50% thingie
12:15:46  <frosch123> let's change it to 66% then :p
12:16:39  <Alberth> Try to allocate twice the amount than requested to make sure we allocate 50% at most  <-- something like "Try to allocate twice the requested amount, to ensure the sprite cache and the other program parts have sufficient space" ?
12:16:59  <frosch123> don't worry, i'll change it completely :p
12:17:10  <frosch123> does the new[] operator use uint or int?
12:17:33  <frosch123> size_t is unsigned
12:18:08  <Alberth>  <byte*>   needs a space (there are several of these cases, some with other data types)
12:20:46  <frosch123> updated diff again
12:20:57  <Alberth> perhaps add an assert on the final allocation (it would be weird if that fails)
12:21:10  <frosch123> it throws :)
12:21:15  <frosch123> and noone catches
12:24:32  <Alberth> ah, it already has an assert thus :)
12:24:32  <Alberth> That line still has a  <MemBlock*>, and please add some '.' at the end of comments.
12:25:40  <frosch123> now only the removed line has a MemBlock* :p
12:26:01  <Alberth> he, we have {BYTES}?   nice :)
12:26:05  <Alberth> seems fine otherwise
12:26:10  <frosch123> since content download :)
12:26:27  <Alberth> ah of course
12:27:08  <frosch123> it does all this GiB, MiB, KiB fancy busyness
12:31:48  <Alberth> I did that for time, a few days ago :)  http://dev.openttdcoop.org/projects/eints/repository/entry/webtranslate/utils.py#L73
12:47:03  *** ntoskrnl has joined #openttd.dev
12:56:52  <frosch123> what do you do after 10000 years?
12:58:20  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25061 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
13:02:26  <Alberth> nothing, the code should never go beyond the last entry :p  (hence the '+ 1' in "while i + 1 < len(time_descriptions)")
13:03:02  <frosch123> :)
14:32:09  *** fonsinchen has joined #openttd.dev
14:32:10  *** ChanServ sets mode: +v fonsinchen
14:52:36  *** fonsinchen has quit IRC
15:51:33  *** fonsinchen has joined #openttd.dev
15:51:33  *** ChanServ sets mode: +v fonsinchen
16:05:42  *** Yexo has quit IRC
16:06:21  *** Yexo has joined #openttd.dev
17:32:11  *** ntoskrnl has quit IRC
18:32:40  *** Ristovski has joined #openttd.dev
18:34:09  *** fonsinchen has quit IRC
18:37:13  *** Ristovski has quit IRC
18:43:55  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25062 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
19:53:14  *** Supercheese has joined #openttd.dev
19:56:42  *** fonsinchen has joined #openttd.dev
19:56:42  *** ChanServ sets mode: +v fonsinchen
21:05:55  *** frosch123 has quit IRC
21:55:22  *** Alberth has left #openttd.dev
22:11:00  *** fonsinchen has quit IRC
22:24:29  *** Ristovski has joined #openttd.dev
22:38:39  *** Ristovski has quit IRC
23:33:24  *** Aphid has joined #openttd.dev
23:34:16  *** Aphid has joined #openttd.dev

Powered by YARRSTE version: svn-trunk