Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Detect what cause a Crash

Author
Message
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 1st Sep 2015 03:47
Trying to join a multiplayer game on my game, the game (both as I am launching of them on the same pc) crashes.
I don't even find a CrashOn file, is there a way to detect what let a exe crash?

I am using multisync plugin for the multiplayer
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 1st Sep 2015 04:56 Edited at: 1st Sep 2015 04:57
there is no one quick and easy method or answer.

if it compiles ok but crashes during run time, you can try step through mode to see where it crashes at.

writing out your own debug info to a custom log file is very helpful as well.

i wrote an article a while back regarding debugging, testing, and error handling, you might give it a quick read


http://forum.thegamecreators.com/?m=forum_view&t=211983&b=8&msg=2534969#m2534969

newer additional post on logging

http://forum.thegamecreators.com/?m=forum_view&t=211983&b=8&msg=2561091#m2561091

Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 1st Sep 2015 05:30 Edited at: 1st Sep 2015 05:31
The discussion is very long, where do I have to look exactly?

Edit:

Nevermind I was looking at the second post
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 1st Sep 2015 08:27
It compiles correctly, I am not using anymore the "save compile and run" button for game testing (it's around 70k lines), but I do use "save and compile", then I click on the executable made.
This because it's taking over 3 minutes to compile each time, so while the editor compiles I do some other stuff, if you do that using the "save compile and run" button it automatically opens the game, and it's annoying if I am doing some other important things.
I do use it for small codes testing though which runs instantly or almost instantly.

What I do is:

- I click my exe, open a multiplayer session.
- I click again the exe, join the multiplayer session
- The connection works, both games load automatically the map ---> the game crashes.

The weird thing is that it Always crash in a different point, I made some commands such as "make file "C:\doingthis.txt" "C:\doingthat.txt" in places where I suspect it crashes, so looking at the files made I know where it crashes, 1 time crashes in 1 point, another time crashes in another, seems like it crashes the same way it was crashing when I had the memory leak problem, but I see no memory leak, each exe takes just around 200-250 MB of Ram when loading the multiplayer map, when I had the memory leak problem it was crashing at around 1200 MB.
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 1st Sep 2015 09:18 Edited at: 1st Sep 2015 09:20
I think I got it:

When creating the opponent, I was cloning the main character, then retexturizing it depending on the opponent weapons quality (wooden, iron, bronze, silver, gold, diamond).

The problem was that I was also applying the "set object effect" command for the normal maps, it seems to crash the program if you are cloning an object that had already the effect applied.
I was actually using "set limb effect" for each limb but I don't think it makes a difference, some limbs should not use a normal map shader so I must use the effect to limb and not to the whole object.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 1st Sep 2015 16:54
ah yeah i ran into that issue on cloned objects not too long ago myself. it doesn't like having effect set to clones, but the clone will use the same effect as the source object.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Sep 2015 14:42
Would it hurt to simply recreate a character model, I doubt you are creating several hundred copies... this should alleviate this issue... from what I understand, cloning should also only be for inanimate objects mainly... but not primarily...

Just a thought...

Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 2nd Sep 2015 16:27
I have already fixed the problem by removing the "set limb effect" commands for the 2nd character, which is faster and use less code than recreate the character.
I only retexturize the weapons, the other limbs such as shirt, jeans, shoes, eyes, and all the other stuff are the same so it's not that smart to recreate the character, loading times will also be higher (not by much but why waste it?).
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Sep 2015 16:28
Quote: "removing the "set limb effect""


For the reversal of this effect...

Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 2nd Sep 2015 16:32
I don't need to reverse it, if the 1st object is created with the effect applied, the 2nd one need it too, if the 1st object has not the effect applied, the 2nd one will be the same, the game knows if apply or not the effect depending on an option I have set (Normal/Relief Maps that can be turned on or off in the options)
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Sep 2015 16:33
OK...

Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 2nd Sep 2015 17:41
MrV: cloning is a good thing, no need to load the model twice. the only issue was in trying to apply an effect when it isn't needed, the clone already has the effect cloned over from the original.

animated objects can be both cloned and instanced without issue, however instancing is more limited and tightly bound to the original. you can basically position and rotate independently and that's about it. anything that needs to animate or modify limbs independently from the original must be cloned not instanced.

characters generally need to be cloned
a single animated tree can be instanced
a clump of animated trees as limbs within an object that position the limbs to fit the terrain must be cloned
a single static rock can be instanced
a clump of static rocks add limbs within an object that position the limbs to fit the terrain must be cloned

and so on

Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 3rd Sep 2015 02:32
Yeah and there are other bugs with instanced objects too, I remember for example using "set alpha mapping on" for example set to 70, if you instance the object to make another one same with alpha mapping set to 70, the 1st one become full opaque with the value set to 100.
I also had problems with hiding and excluding with instanced objects, but I don't remember exactly as I noticed it like months and months ago.

Login to post a reply

Server time is: 2024-03-28 23:55:31
Your offset time is: 2024-03-28 23:55:31