I execute the CLOSE command in my program immediately before leaving PBMAIN (no parameters). This causes an ERR 51. Is this normal?
Announcement
Collapse
No announcement yet.
Close Err 51
Collapse
X
-
Lee,
Can you show the code?
This simple test does not give the error.
Code:#Compile Exe #Dim All Function PBMain () As Long Close End Function
Error 51 - Internal errorInternal error - (%ERR_INTERNALERROR) - A malfunction occurred within the PowerBASIC run-time system, or the operating system reported an error that PowerBASIC was not expecting (or was unable to decipher). For example, attempting to KILL (delete) an open file can cause this kind of problem.
If you are unable to identify the cause of the problem, contact the PowerBASIC Technical Support group with information about your program.Last edited by Gary Beene; 23 Feb 2009, 01:48 PM.
-
Originally posted by Lee Bergeron View PostI execute the CLOSE command in my program immediately before leaving PBMAIN (no parameters). This causes an ERR 51. Is this normal?Software makes Hardware Happen
Comment
-
Not to be too naive here, but if the doc says when this happens you should send info to the PowerBASIC Technical support group and they even give you a "clickable link" , don't you think they might really mean it?Michael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
-
I assumed that they put that caveat in all error message descriptions, but I checked a dozen or more error message Help sections and didn't see it anywhere else!
If you are unable to identify the cause of the problem, contact the PowerBASIC Technical Support group with information about your program.
Comment
-
The application is fairly massive - it's a program that is a bridge between a proprietary application and DDOC. Simply though, CLOSE is CLOSE and it shouldn't matter what the rest of the Code looks like. The reason I believe CLOSE is causing the problem because I ERRCLEAR before the statement then MSGBOX the ERR# after the statement and it displays ERR 51. Would CLOSE attempt to Close files opened in the DLLs of DDOC and therefor cause this ERR? It's not a problem, just wanted to know.
Comment
-
The reason I believe CLOSE is causing the problem because I ERRCLEAR before the statement then MSGBOX the ERR# after the statement and it displays ERR 51
AFAIK, CLOSE could only close files for which the PB handle was obtained in the current code module... because those handles are only valid in the current code module and the current module does not know squat about handles obtained in another module.
Anything in another module (eg ddoc.dll) has to be closed in that other module, or allowed to close when the process ends (aka "letting your mama cleanup after you").
MCMMichael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
-
One that often causes a CNDS problem is "Things you can NOT see, and did NOT know you opened" comes to mind
If you can post compilable code to example, that will either show you where the problem is...or show us where the problem is.
(yep I do know the side of "Its too HUGE to post" vs attempting to post and realize
Engineer's Motto: If it aint broke take it apart and fix it
"If at 1st you don't succeed... call it version 1.0"
"Half of Programming is coding"....."The other 90% is DEBUGGING"
"Document my code????" .... "WHYYY??? do you think they call it CODE? "
Comment
-
Originally posted by Gary Beene View PostI assumed that they put that caveat in all...
That's not a caveat. It's a suggestion as to how you may obtain additional help when needed.
Seems odd that they knew something was iffy about CLOSE - to the point they singled it out in Help, asking for user feedback on possible problems. But they did.
Bob Zale
PowerBASIC Inc,
Comment
-
CLOSE is not singled out, not really.
See definition of error 51 in the errors section of the help file.
Well, since you don't want to do it I'll paste it....
Error 51 - Internal error
Internal error - (%ERR_INTERNALERROR) - A malfunction occurred within the PowerBASIC run-time system, or the operating system reported an error that PowerBASIC was not expecting (or was unable to decipher). For example, attempting to KILL (delete) an open file can cause this kind of problem.
If you are unable to identify the cause of the problem, contact the PowerBASIC Technical Support group with information about your program.
I would think PB would want to know whenever code causes the runtime to throw such a 'generic' error so they could identify the problem and fix it up to return something meaningful to the user.
I wasn't in the room when that decision was made.
MCMMichael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
Comment