Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Nov 17, 2019 8:37 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Application Error
PostPosted: Tue Aug 16, 2011 11:28 am 
Offline

Joined: Fri Sep 30, 2005 11:44 am
Posts: 72
Location: Antwerp, Belgium
Hi all,

I have a RB 2011r1 compiled application that regularly crashed with the following error:

Quote:
The instruction at "0x016d9bc8" referenced memory at "0x016d9bc8". The memory could not be "written".


It is a piece of code where I start a Thread and that fills a listbox. The crash seems to happen in the beginning where the thread is created.

I have really no idea how to start diagnosing these Application Errors as these crashed do not occur in the debugger. Any suggestions? The application is running on Windows 2003 Server.

Thanks for any help.

Michael


Top
 Profile  
Reply with quote  
 Post subject: Re: Application Error
PostPosted: Tue Aug 16, 2011 12:47 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
Try taking it out of the thread and see if the error is still happening.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Application Error
PostPosted: Tue Aug 16, 2011 3:08 pm 
Offline

Joined: Fri Sep 30, 2005 11:44 am
Posts: 72
Location: Antwerp, Belgium
Is it wrong to update a listbox from within a thread? Problem is that when I use the 'listbox updating code' in the main thread, my application seems to hang after a few seconds while the listbox is being updated. That's why I used a thread in the first please .. to prevent the user interface from freezing.

Is Windows not keeping a log somewhere of what happened when the application crashed?


Top
 Profile  
Reply with quote  
 Post subject: Re: Application Error
PostPosted: Tue Aug 16, 2011 3:47 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
Well, you're getting a hard crash which is tough to track down. My thought was that you might get better information if you do it outside of the thread. If it doesn't happen it's something to do with the thread itself. Otherwise you'll have to add code to determine what line of code is causing the issue.

Updating the UI from a thread is kind of dangerous depending upon how you do the thread. If you dragged a thread onto the window and did it from within that thread it's usually pretty safe.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Application Error
PostPosted: Tue Aug 16, 2011 4:28 pm 
Offline

Joined: Wed May 20, 2009 4:43 pm
Posts: 958
I have something similar in a current project; I'm loading a listbox that takes a while as it processes image files dropped on the window, so I moved the list-code to a separate thread. I occasionaly get a crash if I touch the window while it is loading (I'm the only one using the app for now, so for now I just keep my hands off until it is finished). I know that changing the interface from a thread can cause problems, so I assumed this was causing the crash.

To hopefully solve this, I am planning to try loading the data into an array property of the window within the thread, and using a timer to check the array for new items, then load them into the listbox when the array increases. Haven't had a chance to implement this just yet, so I don't know if it will solve the issue or not.

_________________
RB 2009r4 Windows XP


Top
 Profile  
Reply with quote  
 Post subject: Re: Application Error
PostPosted: Tue Aug 16, 2011 4:28 pm 
Offline

Joined: Wed May 20, 2009 4:43 pm
Posts: 958
markwalsh wrote:
I have something similar in a current project; I'm loading a listbox that takes a while as it processes image files dropped on the window, so I moved the list-loading code to a separate thread. I occasionaly get a crash if I touch the window while it is loading (I'm the only one using the app for now, so for now I just keep my hands off until it is finished). I know that changing the interface from a thread can cause problems, so I assumed this was causing the crash.

To hopefully solve this, I am planning to try loading the data into an array property of the window within the thread, and using a timer to check the array for new items, then load them into the listbox when the array increases. Haven't had a chance to implement this just yet, so I don't know if it will solve the issue or not.

_________________
RB 2009r4 Windows XP


Top
 Profile  
Reply with quote  
 Post subject: Re: Application Error
PostPosted: Tue Aug 16, 2011 4:30 pm 
Offline

Joined: Wed May 20, 2009 4:43 pm
Posts: 958
I keep forgetting the 'Edit' button doesn't work in all forums, and I forget to check that I'm hitting the 'Reply' button instead.

I wish they would fix that. :oops: :evil:

_________________
RB 2009r4 Windows XP


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

All times are UTC - 5 hours


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group