[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - DEBUGGING without DEBUG

DEBUGGING without DEBUG

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

DEBUGGING without DEBUG

Postby r00k » Mon Mar 12, 2012 10:37 pm

I've noticed that if i run a shortcut like 'C:\Users\Admin\Desktop\qrack2.010\glQrack.exe' sometimes the SetUnhandledExceptionFilter gets tripped. ONLY using that shortcut and sometimes with or without using a parameter.
At first i thought maybe there was a commandline bug, or mem init crapping or video but, just clicking the .exe no problem, clicking the above shortcut with no parameters, crash.

So the weird thing is that if i use the same shortcut above but goto advance and select "run as an admin" poof no more crash :( any suggestions?

Also I cant get it to crash in debug mode only the release... :(
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: DEBUGGING without DEBUG

Postby frag.machine » Mon Mar 12, 2012 11:20 pm

Try setting the working folder/directory in the shortcut properties.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: DEBUGGING without DEBUG

Postby r00k » Tue Mar 13, 2012 12:29 am

Ya i have the "start in" (windows 7) portion in that shortcut set.

I erased the shortcut and created another.

I forgot to mention that I put the shortcut in the start menu, there it crashes every time without a command line parameter.

if I supply a command line parameter (anything), it is erratic when it will crash.

Though if I have the SAME shortcut in the same folder as the exe, or even on my desktop no crash. Weird...
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: DEBUGGING without DEBUG

Postby mh » Tue Mar 13, 2012 1:29 am

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: DEBUGGING without DEBUG

Postby r00k » Tue Mar 13, 2012 1:36 am

r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: DEBUGGING without DEBUG

Postby mh » Tue Mar 13, 2012 2:13 am

It's specifically the "lpCmdLine[-1] = 0;" part - that's stomping over some random memory allocated during CRT startup. I'm not certain what the intention is there - I think the idea is to isolate the executable name? - but I'm not seeing any indication that the executable name precedes lpCmdLine in memory in my MSDN. GetModuleFileName will do the same job but without any tricksy stuff.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: DEBUGGING without DEBUG

Postby r00k » Tue Mar 13, 2012 10:24 am

r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: DEBUGGING without DEBUG

Postby r00k » Fri Mar 16, 2012 6:47 am

Looking at the quake.rc, i found that Joesef had changed it to only carry the command 'stuffcmds', which gett he invalid pointer when there is no command line parameter. Not sure why this only effects starting the engine via a shortcut instead of double clicking the .exe itself. But without that quake.rc it works, adding +stuffcmds to the shortcut as the only parameter, crashes the engine cold. :( Itt was a bug in stuffcmds :O
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: DEBUGGING without DEBUG

Postby Knightmare » Mon Mar 26, 2012 12:50 am

I've had a vaguely similar problem when compiling KMQ2 under newer Visual Studio versions (2003 and all later versions) and not under under VC6, which I have used for a long time. Debug builds work fine, but release builds always crash on startup. I used the process of elimination to find out it was the option to generate debug info at the link stage that was responsible for crashing or not crashing. This semi-release build option makes the executable about 100KB larger than a normal release build (1.37Mb vs. 1.27 MB).

I thought it was most likely the old static libraries I was linking with, so I recompiled all of them with VS2008. This fixed nothing. I found by adding debug outputs and using logfile 2 that adding calls to Com_DPrintf at certain points would temporarily prevent the crashes, but significant changes that result in different executable size (or just changes to code optimization settings) would cause it to crash on startup again. Has anyone else had a crash that came down to the linker debug setting under newer Visual Studio versions?
Knightmare
 
Posts: 63
Joined: Thu Feb 09, 2012 1:55 am

Re: DEBUGGING without DEBUG

Postby revelator » Mon Mar 26, 2012 4:02 am

been a while since i used vs2005 / 2008 but yeah i remember some weirdness in regard to debug settings. nowadays i mostly use codeblocks with mingw64.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: DEBUGGING without DEBUG

Postby Knightmare » Mon Mar 26, 2012 4:33 am

Just tried it again since I added PNG support (addition of libpng). The old Com_Dprintf additions don't prevent the crash anymore, and the crash now happens somewhere in the cinematic code (I added Com_Dprintf outputs before each function call). It happens in slightly different places with each build, too, so it might be random.
Knightmare
 
Posts: 63
Joined: Thu Feb 09, 2012 1:55 am

Re: DEBUGGING without DEBUG

Postby Baker » Mon Mar 26, 2012 4:38 am

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: DEBUGGING without DEBUG

Postby revelator » Mon Mar 26, 2012 9:54 am

aye clang is somewhat nice though it still lacks some understanding of C++ but its getting better. the llvm backend also has some nice code analysis tools.
btw do the functions you encounter these crashes in use the old vsprintf ? asking cause i know later gfx drivers croak a lot unless you use string safe printbuffers like _vsnprintf.

If you use mingw my latest uploaded mingw compiler got the dragonegg llvm compiler as a plugin (same options as clang) you can enable the pluging by doing CPPFLAGS="-fplugin=dragonegg-cc1".
feel free to "ab"use it :mrgreen:
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: DEBUGGING without DEBUG

Postby Knightmare » Mon Mar 26, 2012 4:06 pm

I switched everything to _vsnprintf 2.5 years ago when the driver-induced crashes first started happening.

EDIT: The crash happens after the renderer init, when a driver-related crash like that would happen. The main menu and its images have always already loaded.
It usually happens when it's attempting to load a cinematic, or sometimes drops to console after that when loading the map for a demo (Bad brushside texinfo error). These crashes and errors seem to be centered around functions that use LittleLong or LittleShort. Maybe the linker is screwing up the byte order functions?
Last edited by Knightmare on Tue Mar 27, 2012 1:21 am, edited 2 times in total.
Knightmare
 
Posts: 63
Joined: Thu Feb 09, 2012 1:55 am

Re: DEBUGGING without DEBUG

Postby revelator » Tue Mar 27, 2012 1:03 am

should have guessed but ya newer know :) bit hard to debug when it works in debug mode :S one thing you could try is running cppcheck on the source and take note if it suggests fixing something. i use that tool a lot and it saved me quite some headaches over time. warning its slower than molasses though.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests