Jump to content
Josh

Never store externed C objects in a resizable array

Recommended Posts

I was getting a reliable crash on GCCollect and finally traced the problem back to this. Never store externed C objects in a resizable array.

Share this post


Link to post

I wonder how many people are actively aware of the fact also that all BlitzMax programs will crash sometime killing your explorer.exe Desktop instance (the 1st explorer instance), and then you have to press Ctrl-Alt-Del and run explorer.exe to get back your Desktop. This is just ridiculous, but when you know it, it's not that big of a problem. GC is basically a way to hide programming errors and make them happen at random times, making debugging impossible. In C, the program crashez immediately and you REALLY have to fix your faulty code. That's one of the biggest benefits of non GC languages, like C.

Share this post


Link to post

I've had it on several computers with Windows XP. But it also needs some time to accumulate, so you need really to work on some serious game, and not just play for short time with a BMX program.

Share this post


Link to post

I would imagine anyone who uses LE editor for a long period of time would have seen this happen and probably would have reported it. I also never had seen Flexman mention this before either. So, either no one has used the editor for a long period of time, or Flexman/NA never played their own games for a long period of time, or it's something you're doing.

 

I will come back and post here if I see it happen.

Share this post


Link to post

Explorer.exe crashes randomly in Windows XP anyways. I notice it often hangs when copying more than a few megabytes of files.

 

GC is basically a way to hide programming errors and make them happen at random times, making debugging impossible. In C, the program crashez immediately and you REALLY have to fix your faulty code. That's one of the biggest benefits of non GC languages, like C.

Yep.

Share this post


Link to post

GC is basically a way to hide programming errors and make them happen at random times, making debugging impossible. In C, the program crashez immediately and you REALLY have to fix your faulty code. That's one of the biggest benefits of non GC languages, like C.

..GC should not have to 'hide' anything of programming errors , if you code on clean and efficient way without trying to do esoteric things, what doesnt make sense for game you programming anyway..

Share this post


Link to post

If I've learned anything from different languages over the years, they all let you screw up in wildly different ways. GC is just something to be aware of (there's even an example of bad practice in the manual).

 

I tend to prefer fixed sizes for significant arrays anyway to minimise memory fragmentation. It's a luxury game programmers get that developers of middleware do not. But if you were making a general wall-chart on do's and dont's for BMX then Josh's thread title is a good candidate.

Share this post


Link to post

I wonder how many people are actively aware of the fact also that all BlitzMax programs will crash sometime killing your explorer.exe Desktop instance (the 1st explorer instance), and then you have to press Ctrl-Alt-Del and run explorer.exe to get back your Desktop.

 

 

I've never had explorer just crash randomly. I have had times where I've had to kill it in taskmgr, but I've found in such instances, wait 3 seconds and it seems to respawn itself. Since that involves less effort, I'll normally just wait for system to bring explorer back for me... (at least, I presume it's system doing it)

 

 

 

 

Explorer.exe crashes randomly in Windows XP anyways. I notice it often hangs when copying more than a few megabytes of files.

 

I think you might need a better antivirus - one where the on access scanning is less intrusive by the sounds of it.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...