View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0002511 | Spring engine | Lua | public | 2011-07-01 18:27 | 2011-09-26 01:37 | ||||
Reporter | jK | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | 83.0 | Fixed in Version | 0.82.7+git | ||||||
Summary | 0002511: (master) chat commands are reordered because of buffering in spring MT, this possible breaks widgets and possible more | ||||||||
Description | it does Spring.SendCommands({"showhealthbars 0"}) Spring.SendCommands({"showrezbars 0"}) widgetHandler:AddAction("showhealthbars", showhealthbars) Spring.SendCommands({"unbind f9 showhealthbars"}) Spring.SendCommands({"bind f9 luaui showhealthbars"}) So it deactive `engine` healthbars and THEN it adds its own F9 handler function. Now with buffered chat commands the custom F9 handler is already linked, when "showhealthbars 0" is processed and so it deactivates the lua ones! | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
||||||
|
![]() |
|
zerver (reporter) 2011-08-23 23:20 |
Okay, this had nothing to do with buffering of chat commands. Instead it is due to some camera refactoring in 9bd22b4f6b7fb52b41d91c91059a5c34c8d2e62e I made a temp fix here https://github.com/spring/spring/commit/1ea71d01e974782753c05dae8ccb21e0ed5c000a but it may need some tweaking. |
Kloot (developer) 2011-08-24 00:24 Last edited: 2011-08-24 00:26 |
Erhm, what ARE you smoking? How the _HELL_ can there even be a relation when the refactoring commit was made on July _27_ and this report on July 1? |
jK (developer) 2011-08-24 01:40 Last edited: 2011-08-24 01:47 |
@zerver I gave you the code that broke! and yeah, it is exactly those 5 lines! Is there any camera related thing in there? No! It's this commit that broke it: https://github.com/spring/spring/commit/5886a2921c52ea8c8fdb02fd4fe2f4372dc832fd and now the code is moved here after multiple commits: https://github.com/spring/spring/blob/master/rts/Game/UI/GuiHandler.cpp#L4298 Spring.SendCommands({"showhealthbars 0"}) runs game->ActionPressed -> it doesn't find an executor (command is removed in 83) -> it calls guihandler->PushLayoutCommand(), that buffers the command instead of executing it -> now Lua calls widgetHandler:AddAction("showhealthbars", showhealthbars) and adds its own action handler for it -> new DrawFrame occurs, GUIHandler:Update() is called, now it calls the _incorrect_ lua action So now you can fix it, already did 80% of the work for you ... |
zerver (reporter) 2011-08-24 01:47 Last edited: 2011-08-24 01:49 |
Kloot, chill man! The relationship is merely that you broke something that affected the same widget. |
zerver (reporter) 2011-08-24 02:26 |
jK, the "showxxxbars" commands only remain in MT spring. This is why ActionPressed does not find an executor. So you should fix the widget something like this if string.find(tostring(Game.version), "MT") then Spring.SendCommands({"showhealthbars 0"}) Spring.SendCommands({"showrezbars 0"}) end |
zerver (reporter) 2011-08-24 02:48 |
I added dummy showxxxbars commands for single threaded spring, so no need to fix that widget anymore https://github.com/spring/spring/commit/5f3193fb62f9da3c691b1fde10378665efa03812 |
jK (developer) 2011-08-24 17:35 |
Could you please stop adding your hacks all over the engine esp. w/o any comments!? The bug is that the order of incoming commands isn't preserved! As the forum test thread implies other widgets are affected by this, too. SO PLEASE REVERT/FIX THE BUFFERING! |
zerver (reporter) 2011-08-25 01:39 |
Mmmkay, MT would deadlock, so reverting for single thread is the best I can do ATM. https://github.com/spring/spring/commit/7b01ba9f73cb348767f926dd66f5d6070dbf38d3 |
abma (administrator) 2011-08-30 18:09 |
so, is it fixed or not? |
zerver (reporter) 2011-08-31 19:27 |
This specific issue is fixed, but it was not related to buffering of chat commands. Buffering of chat commands only occurs for certain custom (unrecognized) commands, and reordering should therefore be a very minor problem. Still, I decided to revert it for single thread. I'm not sure if the camera issue that Kloot introduced is 100% fixed. It works much better now at least. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2011-07-01 18:28 | jK | New Issue | |
2011-07-01 18:28 | jK | Graphics Card | => unknown |
2011-07-07 23:38 | jK | Target Version | => 0.83.0 |
2011-08-15 22:23 | abma | Severity | minor => major |
2011-08-23 23:20 | zerver | Note Added: 0007271 | |
2011-08-23 23:21 | zerver | Assigned To | => Kloot |
2011-08-23 23:21 | zerver | Status | new => feedback |
2011-08-24 00:24 | Kloot | Note Added: 0007272 | |
2011-08-24 00:26 | Kloot | Note Edited: 0007272 | |
2011-08-24 01:40 | jK | Note Added: 0007273 | |
2011-08-24 01:41 | jK | Note Edited: 0007273 | |
2011-08-24 01:42 | jK | Note Edited: 0007273 | |
2011-08-24 01:47 | jK | Note Edited: 0007273 | |
2011-08-24 01:47 | zerver | Note Added: 0007274 | |
2011-08-24 01:49 | zerver | Note Edited: 0007274 | |
2011-08-24 02:26 | zerver | Note Added: 0007275 | |
2011-08-24 02:48 | zerver | Note Added: 0007276 | |
2011-08-24 17:35 | jK | Note Added: 0007277 | |
2011-08-25 01:39 | zerver | Note Added: 0007283 | |
2011-08-30 18:09 | abma | Note Added: 0007310 | |
2011-08-31 19:27 | zerver | Note Added: 0007312 | |
2011-09-08 18:27 | abma | Summary | (master) buffering of chat commands breaks the healthbars widget and possible more => (master) chat commands are reordered because of buffering, this possible breaks widgets and possible more |
2011-09-08 19:12 | abma | Summary | (master) chat commands are reordered because of buffering, this possible breaks widgets and possible more => (master) chat commands are reordered because of buffering in spring MT, this possible breaks widgets and possible more |
2011-09-16 02:08 | zerver | Status | feedback => resolved |
2011-09-16 02:08 | zerver | Fixed in Version | => 0.82.7+git |
2011-09-16 02:08 | zerver | Resolution | open => fixed |
2011-09-26 01:37 | abma | Relationship added | duplicate of 0002675 |