forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

RaiseException using sdbg64
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
Thomas



Joined: 18 Feb 2005
Posts: 56
Location: Gummersbach, Germany

PostPosted: Tue Feb 06, 2024 11:04 am    Post subject: RaiseException using sdbg64 Reply with quote

We are using FTN95 in 32 bit and 64 bit mode.
- 64 bit advantage: Substantial better performance
- 32 bit advantage: Debugging possible

With each new FTN95 version we hope that the problems with sdbg64 will be resolved. Now, having installed version 9.00, we learned that our problem remains.

Root cause for problems seems presently to be a call to a dynymic link library, causing a "RaiseException" and a program crash. Without sdbg64, operating the program simply as executable, works well. Also 32 bit code, with or without debugger, works well.

I could compress the source code to just 9 lines, easy to reproduce with the corresponding dll.

Code:
PROGRAM DLL_Test
Implicit None
Integer :: Stat
Character (len=100) :: sLesDB
C_EXTERNAL les_wkst_dbpath   'les_wkst_dbpath'   (ref, val) : Integer
sLesDB = 'C:\SE_DataBase\Dateien\LESDB.MDB'
Stat= les_wkst_dbpath(sLesDB,0)
write (*,*) 'Stat = ', stat
END PROGRAM

How can we proceed to get the problem resolved?
_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7888
Location: Salford, UK

PostPosted: Tue Feb 06, 2024 3:49 pm    Post subject: Reply with quote

Thomas

Please supply code for the DLL function together with the command line options used to compile both the DLL and the executable.
Back to top
View user's profile Send private message AIM Address
Thomas



Joined: 18 Feb 2005
Posts: 56
Location: Gummersbach, Germany

PostPosted: Tue Feb 06, 2024 6:14 pm    Post subject: Reply with quote

Hi Paul,
The relevant command line options for FTN95 are as follows:
/64
/check
/intl
/save

The dll is a semi-commercial software, where we have unfortunately no access to the source code. We can however provide the following documents:
- interface description
- dll file
- data base used by the dll
How can I submit or upload the corresponding files?

It may be the case that the exception happens somewhere inside the dll. With the 32 bit version we can however debug. And the 64 bit executable is performing well without sdbg64.
_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7888
Location: Salford, UK

PostPosted: Wed Feb 07, 2024 8:11 am    Post subject: Reply with quote

Thomas

1) I usually use DropBox to upload files to the internet and then send a link.

2) /INTL is the default so is not of interest.

3) /CHECK can be experimentally changed to /DEBUG to see if the problem relates to one of the checking mechanisms.

4) /SAVE is not recommended unless you know what it does but it is unlikely to make any difference.

5) If the exception is raised in the third party DLL then there may not be much that you can do about it other than report it to the owner.
Back to top
View user's profile Send private message AIM Address
Thomas



Joined: 18 Feb 2005
Posts: 56
Location: Gummersbach, Germany

PostPosted: Thu Feb 08, 2024 10:09 am    Post subject: Reply with quote

Paul,

Since /check is our default option I tried with any combination of /-check and/or /-debug without success.

The orignal subroutine calling the dll-function needs actually not to be debugged. Compiling this single subroutine with /-check is therefore acceptable for us.

To download the relevant files try the following link:

https://cloud7.steinmueller.com/s/bjijadF8CdF6TMC
_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7888
Location: Salford, UK

PostPosted: Thu Feb 08, 2024 12:22 pm    Post subject: Reply with quote

Thomas

I have tested using your make64.bat and it works for me giving

Code:
Stat =          -10


So I think that you need the latest updates for FTN95 and the Silverfrost DLLs.

I will send you a personal message on this Forum when I have built and uploaded new versions.
Back to top
View user's profile Send private message AIM Address
Thomas



Joined: 18 Feb 2005
Posts: 56
Location: Gummersbach, Germany

PostPosted: Thu Feb 08, 2024 1:04 pm    Post subject: Reply with quote

Thank you, Paul, for your continuous support in this matter.

The reason for stat = -10 is most probably that the access data base is not at the specified location. The statement
Code:

sLesDB = 'B:\LESdb\LESdb.mdb'

shall therefore be adjusted according to the correct file path. The desired result is stat = 0.

If I remove the data base from its location or specify an invalid file path, I also receive stat = -10 and sbg64 works perfectly. In case of a valid file file path I receive stat = 0 if the program is started as executable. Starting with sdbg64 lets the program crash when stepping over the dll call.

Find below a list of stat return values:

    0 - no warnings, no errors
    -1 - Error: no results for the material
    -2 - Error: the material database ID is not exists
    -3 - Error: user data set filter error
    -4 - Error: the database is busy
    -5 - Error: no connection to the database
    -6 - Error: user data set is busy
    -7 - Error: system error
    -8 - Error: the material is not found in the user data set
    -9 - Error: strength values: the temperature is too high
    -10 - Error: the database file does not exist
    -11 - Error: p > 0.385 Sm (ASME VIII-1 scope)
    -12 - Error: no temperature factor found (ASME I scope)
    -13 - Error: design code number is invalid
    -14 - Error: wall thickness evaluation is not converged
    -15 - Error: weakening factor evaluation is not converged
    -16 - Error: invalid algorithm for ASME I PG-27 calculation
    -17 - Error: invalid temperature index
    -18 - Error: invalid property name
    -19 - Error: invalid geometrical parameter (e.g. Do = 0)
    -20 - Error: no solution of equation found
    -21 - Error: general calculation error
    -22 - Error: invalid out-of-roundness
    -23 - Error: the version limitations of input values are exceeded
    -24 - Error: the DLL is not activated

_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7888
Location: Salford, UK

PostPosted: Thu Feb 08, 2024 3:15 pm    Post subject: Reply with quote

Thomas

Now that I have the correct path for LESdb.mdb I get an access violation.

It does not depend on the command line options (provided I use /64) and for me it is not related to SDBG64.

I can't step into the third party DLL so I have no way of knowing what is going wrong. At the moment I can only assume that there is a problem in the third party DLL or in the way in which the function is being called.
Back to top
View user's profile Send private message AIM Address
Thomas



Joined: 18 Feb 2005
Posts: 56
Location: Gummersbach, Germany

PostPosted: Thu Feb 08, 2024 5:11 pm    Post subject: Reply with quote

Paul,

At least you were able to reproduce the error. Did you also try to execute the code without sdbg64? The question remains, why it works as executable with the same binary code but not in debug mode.

My conclusion for the time being:
a) The outcome of your investigation is what I was worried about. Your view that it is not sdbg64 but the dll causing the trouble is comprehensible.
b) We need to proceed with both, 32 bit and 64 bit code simultaneously. 32 bit for debugging. 64 bit for good performance.

I will proceed with the owner of the dll not expecting a better outcome.
_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7888
Location: Salford, UK

PostPosted: Thu Feb 08, 2024 5:22 pm    Post subject: Reply with quote

For me it does not work either way.
Back to top
View user's profile Send private message AIM Address
Thomas



Joined: 18 Feb 2005
Posts: 56
Location: Gummersbach, Germany

PostPosted: Thu Feb 08, 2024 5:28 pm    Post subject: Reply with quote

Can you try 32 bit mode with /-64 and sdbg instead of sdbg64?

All relevant files including 32 bit dll were already uploaded.
_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
Robert



Joined: 29 Nov 2006
Posts: 444
Location: Manchester

PostPosted: Thu Feb 08, 2024 8:38 pm    Post subject: Reply with quote

Which exception is being raised?
Back to top
View user's profile Send private message Visit poster's website
Thomas



Joined: 18 Feb 2005
Posts: 56
Location: Gummersbach, Germany

PostPosted: Thu Feb 08, 2024 10:32 pm    Post subject: Reply with quote

No exception with 32 bit, neither when executing the program as executable nor with sdbg.

No exception with 64 bit when executing the program as executable.

With sdbg64:
[img]https://cloud7.steinmueller.com/s/gKHdNnX7iiXrnjY[/img]
_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7888
Location: Salford, UK

PostPosted: Fri Feb 09, 2024 9:20 am    Post subject: Reply with quote

Thomas

For 32 bits I get a runtime failure: LESdb.dll not found.
Back to top
View user's profile Send private message AIM Address
Robert



Joined: 29 Nov 2006
Posts: 444
Location: Manchester

PostPosted: Fri Feb 09, 2024 11:04 am    Post subject: Reply with quote

Which exception is it? Is there a 32-bit exception number shown in sdbg64?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group