Main Menu

Shoutbox

Baggey

2025-09-24, 17:57:11
They'll be using Expanding foam to glue bricks together next  :-X

Dabzy

2025-09-24, 06:09:52
You can also get the expanding foam post fix, but, I wouldnt trust it really, especially where I live on the side of a valley and when the storms blow in the right direction, whistling down the valley, nowt is safe!

Baggey

2025-09-23, 08:53:01
That Postcrete stuff is amazing. I never know how much water to add. May be i should read the Instructions  ;D 

Dabzy

2025-09-22, 21:33:46
Cannot beat a breaky uppy mode, saves the hand cramps and chipped knuckles knocking ten bells out of a chod of conc with a hammer and chisel.

GfK

2025-09-22, 21:28:44
I have a massive JCB drill with a concrete breaky uppy mode which has got me out of jail free a couple of times replacing rotted fence posts that has been concreted in.

Amon

2025-09-22, 19:23:30
What about Roly?

Dabzy

2025-09-22, 19:22:35
Putting my 2 deckings in.... I've dug enough post holes to last me a life time... I feel sorry for the future poor sod who may want to shift'em... Like most things I do, I tend to go over the top, and as such, I've probably got shares in postcrete! :D

GfK

2025-09-22, 19:10:57
Round is a shape.

Baggey

2025-09-22, 19:04:49
Consult a qualified electrician for compliance with BS 7671 and local building Regs! Avoid areas where future digging is likely. ;)

Jackdaw

2025-09-22, 18:18:24
That depends on where the cable is to run. Minimum depth in a garden in 450mm. Under pavements 600mm.

Members
  • Total Members: 55
  • Latest: Amon
Stats
  • Total Posts: 1,607
  • Total Topics: 198
  • Online today: 12
  • Online ever: 54 (Sep 14, 2025, 08:48 AM)
Users Online
  • Users: 1
  • Guests: 7
  • Total: 8
Welcome to SyntaxBoom. Please login or sign up.

Recent

Two intermittent bugs I've never been able to pinpoint the source of

Started by Matty, Aug 18, 2025, 08:58 PM

Previous topic - Next topic

Matty

Two of my 3d games over the last decade (the recent one Conflict 3049 and the older one Star Dancer) have two intermittent bugs that I've never been able to pinpoint what causes them.

1. Conflict 3049: After playing 3+ missions in the same session, and only sometimes, on occasion, the game will start to stutter/lag/play like a slideshow midway through a mission but will rectify itself if you exit the mission and start another mission. It doesn't always happen, in fact I can leave the game running indefinitely in demo mode and it never happens, it only happens when the user is playing, and playing multiple missions in a row, and it corrects itself if the user restarts a mission. There's no while loops it gets stuck on, no resource loading, no long for loops, so I can't see how/where or why it sometimes gets stuck - on rare occasions.

2. Star Dancer: The beam weapons would sometimes, only sometimes, fire at odd angles - 90 degrees or more skewed from where they were supposed to be. It gave the game a weird look where the beam weapons would fire all over the place, and given it's just a simple matrix transformation or two to position a glowing cylinder at xyz and point it at x2,y2,z2 I was never able to figure out why the coordinates would sometimes be all over the place.

Both of these problems I can't figure out what is causing them, and therefore how to fix them.

The Conflict 3049 one is problematic because it happens randomly after you've been playing multiple missions. You can play a single mission for 30 minutes and it won't happen. But if you play multiple missions, it might happen five minutes in on the third or fourth mission, and then resolve itself if you restart the mission.


Sledge

This is obviously just a shot in the dark, but for (1) I would be looking to either cache misses (ie the working memory footprint of the game means the CPU has to cross a cache boundary, either from L1 to L2 or L2 to L3 etc or even out to main mem) or fragmentation (if maybe you are using a managed language where being cache efficient is difficult in the first place and/or chucking everything in lists or something). Is there a hard limit on the number of units/objects that can exist in the game-world? If so are they pooled, or is memory initialised and freed ad-hoc during gameplay? If there is no hard limit can you introduce one and can you raise and lower it in order to profile performance under different levels of pressure?

In fact, any unbounded queues or lists where the amount of work per frame can become unreasonable?

Is there anything you're doing that would necessitate data transfer across the GPU buffer (eg updating model verts on the CPU, editing data for textures on the CPU etc)?

Those are the kinds of places my mind would go. If the culprit wasn't obvious I'd maybe start adding profiling code so I could identify which systems exhibited unusually poor performance when the issue reared its head.


For (2) I'd be thinking, is a numeric type overflowing and wrapping around? Is there a codepath where I would normally be doing a cos() where I occasionally, incorrectly, do a sin() instead (or visa versa)? Can I temporarily switch out the linear algebra for trig/longform in the hopes that maybe it will uncover an actual logic/maths error I'm making?

Any chance you can unit/feature test the system responsible for orienting the lasers so you can have confidence in the output for all the in-game circumstances that can arise?

We need a rubber duck message icon!

Matty

Thanks.

Re 1.  Everything is in a pool (static array that never changes size) and it's extremely intermittent - happened twice since February.

Re 2. I spent 3 years looking for the source of the error 2015 to 2017 and on and off after then, never found it.  I don't use trig to do my calculations, just vector math.

Jackdaw

If you've dug yourself into a hole. Just keep digging. You're bound to come out the other side eventually.

Matty


Jackdaw

Quote from: Matty on Aug 19, 2025, 08:11 PMStar Dancer was Java, Conflict was C#
Is there any game engine libraries involved?

Edit: And I take it that you have run the code through a profiler.
If you've dug yourself into a hole. Just keep digging. You're bound to come out the other side eventually.

Matty


Jackdaw

I've never heard of eaylib so you will need to supply links. And I do take it that you did run both the java and C# code through a application profiler to weed out any running issues.
If you've dug yourself into a hole. Just keep digging. You're bound to come out the other side eventually.

Matty


Jackdaw

@Matty You still didn't give me an answer to whether or not that you have profiled the applications with a Java profiler such as Java Flight Recorder, or running the C# application through Visual Studio's profiling tools, or the equivalent tools for the operating system being used.
If you've dug yourself into a hole. Just keep digging. You're bound to come out the other side eventually.

Matty

I don't use Visual Studio or any IDE - just notepad++ to write all my code. All my profiling is with self built tools to do so .

Baggey

Quote from: Matty on Aug 20, 2025, 12:40 AMI don't use Visual Studio or any IDE - just notepad++ to write all my code. All my profiling is with self built tools to do so .

How in the Hell do you do that!? :o

I very interested!

Baggey
Running a Pc that just aint. Faster nough. I7-4Ghz, 32Gb Ram, 4Gb Nvidia, 2 x 1Tb SSD's, 2 x 24" LCD's

RETRO everything!

Jesus was only famous because of his Dad

Jackdaw

Quote from: Matty on Aug 20, 2025, 12:40 AMAll my profiling is with self built tools to do so .
Do these tools monitor  CPU usage, the time taken to inside a function, the allocation of memory and memory leaks, and how often the garbage collector is triggered?

If your tooling doesn't do all of that, then you are going to have a very hard time to pin down any issues.
If you've dug yourself into a hole. Just keep digging. You're bound to come out the other side eventually.

Jackdaw

Quote from: Baggey on Aug 20, 2025, 07:39 AMHow in the Hell do you do that!? :o
Easy. You use the command line. It's not that hard to set up a text editor and use the command line terminal. Especially if that text editor supports a simple project set up and the Language Server Protocol.
If you've dug yourself into a hole. Just keep digging. You're bound to come out the other side eventually.

Matty

I think I've solved the problem, sort of.

My computer is dying. I get the same framerate/freeze issue with just notepad.exe open. The computer is 11-12 years old with neither hardware upgrade nor os reinstall in that time and I already know for the last 3 years I've been experiencing weird glitches like keyboard/mouse refusing input, usbs disconnecting randomly, non-boot after being off for a few days (so I leave it on instead), and occasional other glitches like videos hanging when playing back.  It's simply been dying for 3 years and I've probably run out of time to replace it. (I got home today and had left notepad.exe open and the whole system had frozen and wouldn't reboot after switching it off).