• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

shapelib.dll crash - SBX 3.14

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi Dick,

Ok, if you took it from MCX that shouldn't be the problem.

I haven't received complaints from Windows 8 users, but in MCX the shapelib is used in some obscure functions that most normal users won't use.

I also use it in scenproc though and haven't had complaints there either.
 
Messages
1,243
Country
canada
Nope, the zip is not in any Program Files directory, I'm using D:\FSX Files\Development\SBuilderX314. I tried the compatibility modes but it still crashes.

I wonder if it matters that I have .NET framework 4.5.2 installed?


Just a shot in the dark - google about the fact that .NET 4.5 is an in-place install overtop of .NET 4.0. So people with 4.5 get all the bug fixes that break 4.0.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Since the shapelib library is a C library, not a .NET library, I doubt that issues with the .NET framework cause this crash. But you never know of course :)
 
Messages
258
Country
us-california
Have you tried taking ownership of the folder?

Yes. I did a recursive takeown on my entire d: drive.

I ran the .NET verification tool from here: http://blogs.msdn.com/b/astebner/archive/2008/10/13/8999004.aspx, and also ran the microsoft repair tool. Neither found any problems.

I also tried running the cleanup tool here: http://blogs.msdn.com/b/astebner/archive/2008/08/28/8904493.aspx, and then re-ran the .NET 4.5.2 installer.

After all that, SBX still crashes.

There does not seem to be any simple way to remove .NET and start again.

Thanks,
Barry
 
Messages
258
Country
us-california
Hi Barry.
In the Preferences popup, there is a checkbox that asks if you really want to use the tile server ( as I recall from memory ). That should be checked to activate the background tiles of choice.
Dick

Hi Dick,

Yes that was the problem with getting the background to show. I think I'm OK to use the 32 bit version of 3.14. I only work on small stuff anyway. :)

Quite the mystery. This is a new computer and I only installed FSX and some development tools on it.

Thanks,
Barry
 
Messages
223
Country
us-ohio
Could this also be at all connected with the problems I've been having reading shape files using the 64-bit version on Windows 8.1?

Is there something about the use of shapelib.dll in 64-bit SBX 314 under W8.1 specifically (it seems to work without problems for other apps) that's the cause of our difficulties? Again, 313 as 32-bit works fine under W8.1 and 314 64-bit doesn't. I haven't tested a 32-bit version. Perhaps I should give that a go? I'll also try running it as 64-bit under W7. Both Dick and George seem to have some luck with that.

ian
 
Last edited:
Messages
223
Country
us-ohio
(Posted elsewhere and on PTSim also)

From what I can see, because I've run under Windows 7.1 successfully and [not] under 8.1, the problem appears to be in Windows 8.1 with the shapelib.dll and the way it's used by SBX 314. The same dll functions without a problem with other applications like scenProc under Windows 8.1. Hopefully this will provide some clues regarding what to look for or, at least, a workaround that it runs fine under Win 7.1.

Under Win 7.1, it loaded files as expected (and as demonstrated by Dick and Luis) with the application setup in either Program Files or Program Files (x86). Location is irrelevant.

Under Win 8.1 it does not the files and I can't replicate Dick's success.

I do have the same dll running for two other applications (e.g. Arno's scenProc) under 8.1 with no problems.
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,932
Country
us-wisconsin
Actually, the shapelib.dll 64-bit came from arno's scenproc... exact same dll.

Dick
 
Messages
223
Country
us-ohio
Yeah that's right - it's a standard dll from open source. He did mention something about having to use it in two different ways depending on 32- or 64-bit I think. Arno can correct me here. The thing I've spotted here though - just for SBX it doesn't work under Win 8.1 but does for Arno's application. Both work as 64-bit under Windows 7.1 Don't you just live Microsoft? ;-)
 
Messages
258
Country
us-california
The problem isn't necessarily with shapelib, the calling program could pass a bad pointer to DBFAddField() and cause a crash.

The crash is due to an exception of type System.AccessViolationException: http://msdn.microsoft.com/en-us/library/system.accessviolationexception(v=vs.110).aspx
The doc says this exception usually occurs due to a bad pointer used by unmanaged code (I assume this dll is unmanaged code).

The function signature is:
int SHPAPI_CALL
DBFAddField(DBFHandle psDBF, const char * pszFieldName,
DBFFieldType eType, int nWidth, int nDecimals )

The first 2 arguments are pointers, passed to DBFAddNativeFieldType() which are used without any error checking.

So it could be that SBuilderX passes a bad pointer to shapelib (maybe due to some odd Windows8 behavior it encounters). The same shapelib might not have any problems in another program.

Thanks,
Barry
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi,

One of those points is the handle to the DBF file that is opened before with the DBFOpen command. But only the author of SBuilder can check if such checks are there of course.

On the other hand, since it works on other OS, if might be that Windows 8 has some issues with opening the file or something similar. That's why we asked about the permissions before. But we haven't been able to find anything wrong there yet.
 
Messages
223
Country
us-ohio
We have to remember, even under 8.1 it doesn't cause a crash, it just says it can't read the file, so I'm not sure about the bad pointer.

Also, I'm not sure how then INI file would affect this - I'll have to look at it and see what's in there that might relate to shapelib (have to admit I've never really looked at it before and don't know what a lot of the entries do)
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,932
Country
us-wisconsin
The OP, Barry, had a crash of SBuilderX314 64-bit. This is different than not being able to read a file. My understanding is both issues are fixed by using the 32-bit version of SBuilderX314. The DBF code gave Luis some problems, as I recall, so he used his own VB.Net routine to read and write the DBF. This routine is the same code whether 64-bit or 32-bit... so that is likely not the issue for either problem. Like Arno, I suspect some sort of permissions issues with Windows8.1, and the 64-bit shapelib.dll, but who knows.

Luis' SBuilderX314 has been downloaded hundreds of times (741 as of right now), and we have 2 issues with Windows8.1 users, both solved by using a 32-bit version. When he returns from his sailing adventure, he may look into this , but that is about 6 weeks from now , I believe. The question is whether or not it is worth his time to resolve such a limited situation. It would be nice if some other Windows8.1 users would chime in, and let us know if this is common for all Windows 8.1 users, or only restricted to 2 users.

The 32-bit version will have some memory restrictions that are more pronounced than the 64-bit version. Mostly, this means huge photoreal backgrounds may not work any better than the old SBuilderX313. All other functionality should be the same. I actually find the 32-bit version a bit quicker, and my reading supports that identical programs should be quicker as 32-bit, as you address less available memory.

I guess I would not expect Luis to investigate these problems, until another major update would be attempted... which may be never. It's been many years since his last update.

Dick
 

Pyscen

Resource contributor
Messages
2,993
Country
us-texas
Hello Dick,...

Where do I get the installer for SBuilderX 3.14 64-bit and I'll see what happens (on my Windows 8.1 system),... I been meaning to do this for quite sometime, but I have now misplaced the link of...

@bdf369

If you like,... send me the SBX that you have been working with and once I install SBuilderX on my system, I can see if I can duplicate the error here.
 
Last edited:
Messages
1,693
Country
unitedstates
I know you mentioned you have administrator privileges and you disabled UAC, but try to run it in administrator mode anyhow. This might be your issue. The reason I think this is because of this statement
... The target folder on my D:\ drive and from what I can tell I have full control permissions.
From what you can tell suggest you may not actually have full control of the entire drive without 'authorizing' an action. Running in administrator mode will provide the authorization at program startup. If anything this will rule out the UAC if it doesnt fix it.

I downloaded the x86 version and with that one I can compile the terrain vector and the BGL is copied to my destination folder, but the "show background" menu item is disabled regardless of which tile server I choose.
And for this one, albeit probably not the issue but is shapelib.dll registered on your machine? Highly doubt this is your issue since it is called from the folder structure of the program and not called from registry.
 
Messages
258
Country
us-california
Have you checked the paths in SBuilder.ini ?

Good idea, I checked all the paths and adjusted to match my installation but the crash still occurs.

I know you mentioned you have administrator privileges and you disabled UAC, but try to run it in administrator mode anyhow. This might be your issue. The reason I think this is because of this statement

From what you can tell suggest you may not actually have full control of the entire drive without 'authorizing' an action. Running in administrator mode will provide the authorization at program startup. If anything this will rule out the UAC if it doesnt fix it.

And for this one, albeit probably not the issue but is shapelib.dll registered on your machine? Highly doubt this is your issue since it is called from the folder structure of the program and not called from registry.

It still crashes if I run as Administrator. The "show background" issue was my error, I forgot to tick the "Use Google Satellite" checkbox.

A summary of the security changes I made:
- Disabled UAC
- Verified I'm an Administrator
- Added exclusions in Windows Defender for all my FSX dev tools and FSX itself
- Did a recursive "takeown" of my D: drive (so I own the drive and all files) where all my FSX tools and files are located (except FSX itself which is my F: drive)
- Ran SBuilderX314 as Administrator

I did try running regsvr32 on shapelib.dll but I get an error of no DllRegisterServer entry point, maybe because it's a 64 bit dll?

Thanks,
Barry
 
Messages
1,693
Country
unitedstates
Have you tried to run in compatibility mode? That would run it in 32 bit on a 64bit os that would possibly tell you if the dll's are mixed up.

Did you run the 32 or 64 bit regsrv32?
You can try running the associated regsrv32. On 64-bit Windows, there are two versions of the Regsv32.exe file:
  • The 64-bit version is %systemroot%\System32\regsvr32.exe.
  • The 32-bit version is %systemroot%\SysWoW64\regsvr32.exe.
 
Last edited:
Top