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 / Crash Report for Steam User

Author
Message
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 12th Jul 2023 01:29 Edited at: 12th Jul 2023 01:59
Hello, I was wondering if anyone can make sense of this error message reported by a Steam user when trying to launch Brigand: Oaxaca. It has to do with DBProMatrixDebug.dll apparently. I can't recreate it and I never used that as a custom DLL. He's running Windows 10 and recently upgraded his GPU, then he gets the following in Event Viewer (not sure what that is). Thanks for any info.

The thread is here: https://steamcommunity.com/app/652410/discussions/0/3808406007554961017/

The error report is here:

Log Name: Application
Source: Application Error
Date: 7/11/2023 1:01:12 PM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: DESKTOP-B199G4L
Description:
Faulting application name: Brigand.exe, version: 1.0.0.0, time stamp: 0x4d460aea
Faulting module name: DBProMatrixDebug.dll, version: 1.0.0.0, time stamp: 0x4da4ec55
Exception code: 0xc0000005
Fault offset: 0x0000475f
Faulting process id: 0x3500
Faulting application start time: 0x01d9b419483a0c88
Faulting application path: D:\SteamLibrary\steamapps\common\Brigand\Brigand.exe
Faulting module path: C:\Users\Dylan\AppData\Local\Temp\dbpdata6\DBProMatrixDebug.dll
Report Id: 388c39db-244d-43d5-80ea-ac0ac8c996d5
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>100</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2023-07-11T17:01:12.6026815Z" />
<EventRecordID>32422424</EventRecordID>
<Correlation />
<Execution ProcessID="0" ThreadID="0" />
<Channel>Application</Channel>
<Computer>DESKTOP-B199G4L</Computer>
<Security />
</System>
<EventData>
<Data>Brigand.exe</Data>
<Data>1.0.0.0</Data>
<Data>4d460aea</Data>
<Data>DBProMatrixDebug.dll</Data>
<Data>1.0.0.0</Data>
<Data>4da4ec55</Data>
<Data>c0000005</Data>
<Data>0000475f</Data>
<Data>3500</Data>
<Data>01d9b419483a0c88</Data>
<Data>D:\SteamLibrary\steamapps\common\Brigand\Brigand.exe</Data>
<Data>C:\Users\Dylan\AppData\Local\Temp\dbpdata6\DBProMatrixDebug.dll</Data>
<Data>388c39db-244d-43d5-80ea-ac0ac8c996d5</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>
James H
17
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 12th Jul 2023 02:42 Edited at: 12th Jul 2023 02:45
So I just removed that dll from the plugins folder and DBP compiled evolveds advanced lighting program just fine, you could simply recompile after removal and test it, if its fine then upload that instead maybe? If all tested fine you could maybe go further and remove any unwanted dll's that you know you don't use and repeat the process - I say this in case any other debug related dll's throw the same error, save you repeatedly uploading and annoying your customers in case a change affected them for whatever reason.
Win 10 Home 64, Intel(R) Core(TM) i5-10300H, 8GB DDR4, NVidia GeForce GTX 1650 4GB GDDR6
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 12th Jul 2023 06:35 Edited at: 12th Jul 2023 23:27
Unfortunately, it seems you need it for all matrix commands, and I use them heavily. It won't compile without it.

EDIT: Just tried replacing the DLL with an older version from this download link, so I'll post if that works for him: https://archive.org/details/DarkBasicPro_201801

EDIT2: Unfortunately it did not work. The DLL file size was different, but he got the same error.
James H
17
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 13th Jul 2023 17:07
Ah that sucks, well I guess unless someone else offers a working solution then the only reasonable option would be to replace the matrix commands, so basically for each matrix command used you should write a function that works with memblock meshes. I suppose you have already tried asking your user to try different driver versions(older I would guess) for their new GPU?
Win 10 Home 64, Intel(R) Core(TM) i5-10300H, 8GB DDR4, NVidia GeForce GTX 1650 4GB GDDR6
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 13th Jul 2023 21:28
I will point out that replacing all of the matrix commands used is by no means a guarantee of success. The source of the error may instead be something being passed to the DLL. Or merely where the error is finally being thrown. There is no substitute for being able to reproduce the error and debug.

For example: DBP will let you return raw numbers instead of variables when returning from a function. "End Function 0", "Exit Function 1". Even though it lets you do this and in a simple program you can get away with it, this is (apparently) a bug. You are only supposed to return a variable "End Function myVariable". If you abuse this the program can destabilize and produce unpredictable errors.

More information about the example:
It can affect entirely separate lines of code. I have had it create situations where adding the line x=1 (where 'x' was never used before) would suddenly make the program crash. I suspect the error creates certain binary bugs. Like it affects other lines of code. So maybe the machine code isn't jumping to the correct addresses, and everything gets a little off. It might be that some of these errors don't bring down the whole program, until one does. A compiler bug.

So this is just an example of how the code can look completely correct, and be air tight logical. However once compiled seemingly unrelated code can impact each other in random unpredictable ways. You need to make sure you only ever return a variable and never a raw number.

Best guess on limited info.




Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 13th Jul 2023 22:15
Another thought:
This could also be a "Loss of Screen Device" situation. Normally if you create a program and then lock windows with it running, or minimize out of Full Screen Exclusive mode, GFX driver crash/reload, or a bunch of other scenarios, all objects and textures loaded in memory will be unloaded when the screen gets it's next SYNC.

Auto Syncing for this reason is a bad idea.

So when you are manually syncing in your program, it might be in this case, this event occurs, your program lands on a SYNC command, the assets are flushed. Then you end up using a MATRIX related command in the code, and it throws an error since the asset is gone.

Why did the assets get flushed? Who knows. Get more information from the user.

What to do about it?
Wrap all SYNC commands in a function for syncing.
Have a dedicated test image loaded, you can even use the MAKE IMAGE command.
Once the SYNC happens, test if that image exists. If it doesn't, trigger a reload of all of your assets.
So basically any time a SYNC happens you have a procedure that is enforced in case the assets are flushed.

This example also appears to match the available information.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 13th Jul 2023 23:22 Edited at: 14th Jul 2023 00:04
OH! Thank you. When I was first starting out back around 2010 I removed all the instances where I returned strings directly, because it resulted in a jumbled mess of characters on some computers. I didn't know there was a problem returning values directly. I just did it and now Exclusive Mode actually works! I had to remove Exclusive Mode as an option a couple years back when I started using the D3DFunc.dll for faster HUD text. I'll compile a couple new EXEs and send them his way. 90% sure this will work. Thanks so much.

EDIT: Ooops, nevermind. Exclusive Mode worked one time, then Windows gave me a message that it wanted to change some settings automatically, and now Exclusive Mode doesn't work again. I'll send him the new non-exclusive mode EXEs anyway.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 14th Jul 2023 00:12
If your issue is caused by a Loss of Screen Device, there are several possible causes and even windowed mode cannot solve them all. In windows if the graphics card drive crashes it attempts to reload on the fly, often people don't notice. DBP will probably crash as mentioned unless this is handled in an organized way.

This can get complicated because in some cases reloading everything after a SYNC call can be tricky. You might reload a whole level, but certain effects might be firing, certain menus might be open. All it takes is to miss one object, sprite, image and it can bring down the whole program.


Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 14th Jul 2023 00:41 Edited at: 14th Jul 2023 00:43
It appears that fixing the exitfunction/endfunction returns didn't solve the problem. However, it did allow Exclusive Mode to actually work for me (one time, which is weird). I haven't included Exclusive Mode as an option for a very long time. Even back when Exclusive Mode was working it would crash every time it minimized, so I wasn't too devastated when I removed the option. Gonna keep the updated exitfunction changes anyway, so thanks for that.

As for reloading all the assets every time the game syncs, gonna try that soon and send another test EXE to the Steam user. Hopefully he doesn't have a day job or any kids to feed.

P.S.: Serious thanks for the help, though. Gonna submit the game to GOG.com soon and I want it as compatible as possible. It runs smooth on ARCH and Ubuntu Linux with Steam Proton, which is sweet. Now I just gotta get my new AppGameKit game working on Linux (lots of problems).
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 14th Jul 2023 00:58
Exclusive mode crashes when you return from being minimized and SYNC is used, and the program attempts to access a deleted asset (an important distinction). However Windows 10 introduced certain game performance features that now at times prevent that. Like the game is running in a fake exclusive mode. This is probably why you saw the windows compatibility message and inconsistent behavior (which you mentioned was weird). I suspect you could right click on the program and play around with compatibility settings to alter this behavior.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 15th Jul 2023 06:59 Edited at: 15th Jul 2023 07:02
Right now I'm just trying to get Exclusive Mode to work like it used to before I started using D3DFunc.dll (about 3 years back). It may or may not fix the Steam user's problem, but if not then at least I can include an Exclusive Mode for people who want it.

I use a loadImage function to test if an image is already loaded and to use that index, or find a blank spot in the array to load a new one. Then I would use it commands like this:
texture object 1,loadImage("texture.png")

Here's the loadImage function:



I followed your advice on your Device Screen Recovery post (I think), and made this new sync function. Unfortunately Exclusive Mode still crashes with no error message after showing a brief black screen and the custom mouse cursor.

Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 15th Jul 2023 22:36 Edited at: 15th Jul 2023 22:38
I look at that post and it was quite a while ago. It could be rewritten better. I will help you out.




A few things to conisder.
- You don't need to check if your program is in Exclusive Mode or not. Make this available to all modes since all modes have ways of creating this problem.
- When this error occurs you already know your assets got flushed. You don't need to check each one to see if it is deleted. You can assume it was.
- You don't need to load a blank test image. The Get Image command is better faster simpler.

Notice how once the SYNC happens, we test if the image is deleted. If yes, we trigger a reload.
Works and helps any screen mode.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 15th Jul 2023 23:12 Edited at: 15th Jul 2023 23:21
Also I just noticed your attempt is non-functional.

You are reloading assets before the SYNC command.
What will happen is that SYNC command at the end will fire off, your assets will be flushed from memory, and somewhere in your program you'll crash attempting to access a deleted asset.

So you need to SYNC then test + reload. Then carry on with the rest of the game loop etc.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 16th Jul 2023 21:24 Edited at: 16th Jul 2023 21:46
Just changed that, thanks. Unfortunately, it seems the problem with Exclusive Mode happens as soon as I call d3d_init in the game's code. However, I can make a short program calling all 4 plugins that I use and write some text and it works. So the below code runs fine, but when I call d3d_init in the game code it crashes (can I call it before declaring my extensive list of variables)

This code works, but d3d_init crashes in my main game:



EDIT: Alright, it happens when I call set display mode 1024,768,32,0,0,0, and d3d_init in the same code, it doesn't matter which order. I'll post when/if I figure it out.
laughingcoyote.net
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 16th Jul 2023 22:11
I am not sure if you are crashing at the initial load of the program or the reload which we were discussing.

If it's the initial load of the program:
Try removing "load dll "D3DFunc.dll",4"
DBP\Compiler\plugins-user folder should contain that DLL in normal cases (you should check)
Then you can use the plugin without manually loading it. Just like any other plugin.
So you may have some issue there. Perhaps you are loading it twice without knowing or some other oddity.

If this is crashing during a reload as discussed, you might not need to run d3d_init twice.

Best guess.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 17th Jul 2023 03:07
It seems like I have to remove Set Display Mode. It fixes the Steam User's problem, and also I can include Exclusive Mode as an option again.
Unfortunately, it looks like I'm gonna have 8 separate EXEs (4 resolutions for normal and 4 for exclusive). 12mb x 8 = 96mb for the EXEs, but oh well. It's worth it for compatibility.
laughingcoyote.net
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 17th Jul 2023 03:17
Why don't you just make a Config exe, lets them pick the display options. Then when your game loads it opens the file and sets the Display Mode one time using those options.
You can cap the executable count at 2 that way.

Can't offer more specific help without literally being there. Seems strange you'd even be in this situation.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 17th Jul 2023 03:51 Edited at: 17th Jul 2023 04:02
I do have a launcher. The problem is that I can't use the Set Display Mode command anywhere in the code if I'm using the D3DFunc plugin and Exclusive Mode. So I'll just have the launcher point to the correct EXE.
laughingcoyote.net
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 17th Jul 2023 03:55 Edited at: 17th Jul 2023 03:55
Basically Exclusive Mode + D3DFunc plugin + Set Display Mode command do not work together. Thanks for the all the advice, though. The code is a lot cleaner now.
laughingcoyote.net
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 17th Jul 2023 04:52
You are welcome.
You aught to make a skeleton project and just sort out your Set Display Mode code. You may find you can organize things in a manner that does not crash.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 17th Jul 2023 05:10 Edited at: 17th Jul 2023 05:20
Even this simple program won't run in Exclusive Mode. It uses both the Set Display Mode command and D3DFunc (and I tried both orders). So it seems to be impossible. The good news is I figured out I don't need a seperate EXE for Windowed mode, I can just resize the window and toggle the border. So I don't need 12 EXEs, just 8.

laughingcoyote.net
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 17th Jul 2023 08:07 Edited at: 17th Jul 2023 08:08
Here you go. Set project settings to windowed mode. Activate Fullscreen Exclusive manually.
Also: Often a good Idea to SYNC once to initialize some stuff.


Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 17th Jul 2023 10:36 Edited at: 17th Jul 2023 10:49
Oh damn, I just uploaded the 8 EXE patch. I'll try this tomorrow, though.

EDIT: WHOO! You just saved me. Implementing now...
laughingcoyote.net
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 17th Jul 2023 11:26 Edited at: 17th Jul 2023 11:37
Ahhh, thank you. One EXE and one launcher. User crash fixed, Exclusive Mode working. Now can sleep. https://steamcommunity.com/games/652410/announcements/detail/6048947507395664495
laughingcoyote.net
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 17th Jul 2023 23:45 Edited at: 17th Jul 2023 23:45
Glad to help.

I notice we talked about this same problem a year ago:
https://forum.thegamecreators.com/thread/228579

I mentioned D3DFunc plugin can be used with exclusive mode but I stopped using it because I think requiring the user to install system fonts for a game is terrible. This prompted me to write a bitmap font system that can be dropped into any project.
https://forum.thegamecreators.com/thread/220759

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 18th Jul 2023 09:16
Oh ya, thanks for that too. Finally just got it working.
laughingcoyote.net
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 19th Jul 2023 00:11
BTW, that D3DFont function doubled my framerate back in the day and let me include a 60FPS option.
laughingcoyote.net
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 19th Jul 2023 01:59
2D Text and Draw commands are slow!
I once massively boosted framerate by swapping a DOT command with pasting an image of a crosshair.
https://forum.thegamecreators.com/thread/195887

Basically any time any text or 2D draw command is used there is a cross the board FPS penalty, not necessarily dependent on how many commands are used.
I have not explored this in a few years since I avoid these commands.

Use Advanced2D plugin instead, or paste Images/Sprites. The Bitmap Font I mentioned does this.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Laughing Coyote Software
6
Years of Service
User Offline
Joined: 30th Jun 2018
Playing: Pillars of Eternity 2
Posted: 28th Jul 2023 13:22
I might try using that bitmap font. I'm playing around with fonts for my AppGameKit project and now I wanna do it for Brigand. Gonna be a while, though.
laughingcoyote.net
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 29th Jul 2023 00:01
The post links to a font conversion tool made by someone else. The bitmap font system originally began as an implementation of that tool's format. So you can use the tool to basically import any font you want to use.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!

Login to post a reply

Server time is: 2024-11-17 22:47:42
Your offset time is: 2024-11-17 22:47:42