Bug #159
Logmanager
| Status: | Closed | Start date: | 02/11/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | - | |||
| Target version: | 0.37 | |||
| Operating System: | All | Operating System Bits: |
Description
Logmanager fails to work propper for me, most of the times it crashes ror after 20-50 entries when i use it to debug stuff while in the simulation.
I think its bound to the high amount of data produced, is there maybe another way to viualize datas ( like a mygui-logg on screen wich can be set with a code line ?
History
#1
Updated by Lifter over 2 years ago
LogManager::getSingleton().logMessage("difftoBeamL: " + StringConverter::toString(difftoBeamL));
added to line 6269 current svn beam.cpp ( its the end of the shock2 routine will make ror crash with any truck utilizing some shocks2 here.
I know it produces a huge amount of data...but that was possible before.
#2
Updated by tdev over 2 years ago
- Assignee set to Altren
altren, can this be related to your log listener / mygui changes lately? :-\
#3
Updated by Altren over 2 years ago
This task is probably related to #164
#4
Updated by Altren over 2 years ago
- Status changed from New to requires testing
- % Done changed from 0 to 50
Fixed #164. This one requires testing.
#5
Updated by Lifter over 2 years ago
Altren wrote:
Fixed #164. This one requires testing.
I tested today with head svn r1159 and a modified ( with a logmanager in calcshock )one.
I need to admit, that its not really a crash happening, RoR just gets extrem slow wich looked like a freeze but its basically still running.
Testing with a truck that has 6 shocks2 and logging difftobeamL at the end of the calcshock results in 0.1 - 0.2 fps in relation to ~150 when the logmanager is off.
Testing with a truck that utilizes tons of shocks2 has 70 fps without that logmanager and 1 screen every 40-50 seconds whebn its enabled.
So its not a crash, logmanager just got horrible slow and avoids its in game usage to debug stuff.
Is there way to make the logging quicker ? FOr me, it would be even fine to have a second version wich just savers the logged data when you exit ror, since i use it to debug physical stuff mostly.
Best of course would be a mygui window showing data set, that would be real in game debugging.
#6
Updated by tdev over 2 years ago
Lifter wrote:
Altren wrote:
Fixed #164. This one requires testing.
I tested today with head svn r1159 and a modified ( with a logmanager in calcshock )one.
I need to admit, that its not really a crash happening, RoR just gets extrem slow wich looked like a freeze but its basically still running.
Testing with a truck that has 6 shocks2 and logging difftobeamL at the end of the calcshock results in 0.1 - 0.2 fps in relation to ~150 when the logmanager is off.
Testing with a truck that utilizes tons of shocks2 has 70 fps without that logmanager and 1 screen every 40-50 seconds whebn its enabled.
So its not a crash, logmanager just got horrible slow and avoids its in game usage to debug stuff.
Is there way to make the logging quicker ? FOr me, it would be even fine to have a second version wich just savers the logged data when you exit ror, since i use it to debug physical stuff mostly.Best of course would be a mygui window showing data set, that would be real in game debugging.
i just improved the possible cause of this, since i also logged quite a bit in the core beam loop. (please update and test)
the remaining fps issues could be related to the huge text in the textbox (we should trim it?)
#7
Updated by Altren over 2 years ago
Text is already trimmed to 8192 characters :) I wasn't sure how much was necessary and wrote that value. It is defined in Console.layout and can be changed without code recompilation.
Also we implemented better Console in MyGUI demos based on many small edits in ListCtr (instead one big Edit for whole text that works bad with very frequent updates). So I'm going to try to use that in RoR.
Can anyone give me any example how to get many messages in current console, because I'm not familiar with what is printed there and when there are many messages.
#8
Updated by Altren over 2 years ago
- % Done changed from 50 to 60
Heh, Tom - in your last update where you "improved the possible cause of this" you forgot to clear waiting messages, so it was adding all messages every frame!
I fixed and commited that.
#9
Updated by Altren over 2 years ago
Heh, and you inverted 'no new messages' check, so it was exiting any time there was waiting messages instead of printing them :)
#10
Updated by Lifter over 2 years ago
updated, compiled tested, added a logmanager, complied and tested again: i would say the problem is fixed, i get decent fps again even when logging.
Can be closed imo.
#11
Updated by tdev over 2 years ago
- Status changed from requires testing to Closed
- % Done changed from 60 to 100
altren: ouch, my fault ;)
thanks for fixing this up. I hope you see why i minimized the blocked code?
Lifter wrote:
updated, compiled tested, added a logmanager, complied and tested again: i would say the problem is fixed, i get decent fps again even when logging.
Can be closed imo.
thanks for testing, closing now :)
#12
Updated by tdev over 2 years ago
- Target version set to 0.37
#13
Updated by Altren about 2 years ago
Is it still noticeable when log is enabled? How different fps with and without it? If it affect fps I can use a more complex, but much faster solution. I'm asking because if it works fast enough I'd prefer keep simple solution.