It is currently Mon Sep 23, 2019 1:47 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Can the OnError lib report procedures?
PostPosted: Thu Jul 11, 2019 8:52 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1896
I've been using the OnError lib (with line numbering enabled) to try to track down an illegal memory access error, but the reported lines seem to have nothing to do with the crashing. For example, it would say that a line that calls a procedure was the cause, or a simple "a+1" was the cause, etc. Not really helpful.

So I figure it would help me better if I knew in which actual procedure the crash was occurring, so I could look closer at that procedure. Is there a way to do that with the OnError lib? Thanks.

Also, is there any reason NOT to keep the OnError lib code in my app for public release? It makes the exe a bit larger, but I feel it's probably better for customer service to have a nice crash report instead of just the app dying the usual Windows way. Eve the manual says something about that, but would it slow down my app to keep it in?


Top
 Profile  
Reply with quote  
 Post subject: Re: Can the OnError lib report procedures?
PostPosted: Thu Jul 11, 2019 10:34 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 13, 2010 3:45 pm
Posts: 891
The reported lines have very well something to do with the crash, so the OnError library can't tell you anything else. However, the cause of the memory error is probably somewhere else in your program code.

So have fun searching, try the Purifier first.

_________________
sorry for my bad english


Top
 Profile  
Reply with quote  
 Post subject: Re: Can the OnError lib report procedures?
PostPosted: Thu Jul 11, 2019 12:57 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3655
Location: Berlin, Germany
Dude wrote:
Also, is there any reason NOT to keep the OnError lib code in my app for public release? It makes the exe a bit larger, but I feel it's probably better for customer service to have a nice crash report instead of just the app dying the usual Windows way. Eve the manual says something about that, but would it slow down my app to keep it in?

Actually, the use in the finished EXE program is the main purpose of the OnError library:
This library provides a way to track program errors (program crashes) similar to the PureBasic debugger but without the drawbacks of a bigger filesize and lower execution speed when using the debugger. This way the final version of a program which is shipped to the end user can still intercept program errors and provide some information about the error to the user so he can report it back to the developer.

However, privacy concerns were raised about the OnError library:
viewtopic.php?f=3&t=63745

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: Can the OnError lib report procedures?
PostPosted: Sat Jul 13, 2019 5:40 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1896
Little John wrote:
However, privacy concerns were raised about the OnError library

That's no concern to me because I just strip out the path like so:

Code:
SourceFile$=GetFilePart(ErrorFile())

Anyway, next question: I've added "PurifierGranularity(1,1,1,1)" to my source at the recommendation of another post, but I don't know how the Purifier works. Is that command supposed to halt my app somewhere or something? The Help manual is very vague about how to use the Purifier. Can someone please explain like I'm 5? :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Can the OnError lib report procedures?
PostPosted: Sat Jul 13, 2019 7:52 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1649
Location: Germany
Dude wrote:
Anyway, next question: I've added "PurifierGranularity(1,1,1,1)" to my source at the recommendation of another post, but I don't know how the Purifier works.

Have you already read Fred's blog posting about the purifier?


Last edited by Shardik on Sun Jul 14, 2019 9:40 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Can the OnError lib report procedures?
PostPosted: Sat Jul 13, 2019 8:47 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3655
Location: Berlin, Germany
Shardik wrote:
Little John wrote:
Anyway, next question: I've added "PurifierGranularity(1,1,1,1)" to my source at the recommendation of another post, but I don't know how the Purifier works.

No.
It was NOT ME who wrote that!
Is proper quoting that hard?

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: Can the OnError lib report procedures?
PostPosted: Sun Jul 14, 2019 1:43 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1896
Shardik wrote:
Have you already read Fred's blog posting about the purifier?

No, because I didn't know about it. Thanks for linking it. However, that blog is still pretty vague, too. From what I read in it, I assume the debugger will stop my app when an overflow is found? The blog doesn't specifically say. I'm sitting here running my app with the Purifier on and its granularity set to 1,1,1,1 and nothing has halted yet, so I don't even know if the Purifier is working. There's nothing to indicate that my app is running with the Purifier on. Is this normal until an illegal memory access error occurs?

One more question: it seems the Purifier doesn't work with built exes, but only during IDE development; so it's going to be useless for my beta-testers, right? It's only something I can test with?


Top
 Profile  
Reply with quote  
 Post subject: Re: Can the OnError lib report procedures?
PostPosted: Sun Jul 14, 2019 9:48 am 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1649
Location: Germany
Little John wrote:
Shardik wrote:
Little John wrote:
Anyway, next question: I've added "PurifierGranularity(1,1,1,1)" to my source at the recommendation of another post, but I don't know how the Purifier works.

No.
It was NOT ME who wrote that!
Is proper quoting that hard?

Sorry about misquoting you. I have changed the author name in my quote above replacing your name by Dude's. But I still think it's a bug in the forum software that your name was put into the quote instead of Dude's, especially because only Dude wrote the cited sentence. Of course it's still my fault for don't catching the wrong author name in the quoted text...


Top
 Profile  
Reply with quote  
 Post subject: Re: Can the OnError lib report procedures?
PostPosted: Sun Jul 14, 2019 1:56 pm 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1896
Found the cause of the crashing: viewtopic.php?f=13&t=73189 :oops:

At least I learned how the Purifier works, and the OnError lib. So not a total loss of my time. :)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye