ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Wed Dec 13, 2017 1:17 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: fflush from traceback
PostPosted: Mon Jan 06, 2014 1:40 am 
Offline
Thalore

Joined: Mon Mar 25, 2013 10:09 pm
Posts: 153
Debugging Lua errors that occur during loading a module or generating a level can be tricky. The game's standard error dialog is never invoked, and the loading / generating never finishes, so I have to kill the process and check the logfile, which may or may not have gotten the error message flushed to it.

If I understand the code correctly, having main.c's traceback call fflush(stdout); would ensure that Lua errors are always flushed to the log, regardless of what may go wrong at higher-level code or whether or not higher-level code is in a place to check for and display error dialogs.

_________________
Qi Daozei (QDZ) - an Oriental-themed fantasy game for T-Engine. ToME Tips - auto-generated spoilers for ToME.


Top
 Profile  
 
PostPosted: Mon Jan 06, 2014 10:27 am 
Offline
Sher'Tul Godslayer

Joined: Mon Feb 14, 2011 11:16 pm
Posts: 2262
Castler wrote:
Debugging Lua errors that occur during loading a module or generating a level can be tricky. The game's standard error dialog is never invoked, and the loading / generating never finishes, so I have to kill the process and check the logfile, which may or may not have gotten the error message flushed to it.

If I understand the code correctly, having main.c's traceback call fflush(stdout); would ensure that Lua errors are always flushed to the log, regardless of what may go wrong at higher-level code or whether or not higher-level code is in a place to check for and display error dialogs.


you can force constant flushing by running as te4.exe --flush-stdout in window. juse baretail.exe or similar to follow it.

it will slow the game only slightly.

_________________
MADNESS rocks


Top
 Profile  
 
PostPosted: Mon Jan 06, 2014 12:23 pm 
Offline
Master of Eyal

Joined: Wed Jul 24, 2002 9:26 pm
Posts: 10144
Location: Angolwen
yup good idea

_________________
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group