Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 30th, 2008, 04:24 PM
Registered User
 
Join Date: Dec 2008
Posts: 4
Thanks: 3
Thanked 0 Times in 0 Posts
Default AccessViolationException

Hi guys,

Sorry if I have this thread in the wrong forum but hopefully someone can answer my question. I have made a flash-based program that is coded in AS3 and has been put into a Learning Management System. The problem is that I keep having an "AccessViolationException" error when I play some sound files externally in one of my flash lessons when it is in the LMS. The same lesson when played in IE outside of the LMS does not have this error. Could that error be caused by anything on the flash side of things or is it more likely to be caused by an error in the LMS? I find it hard to believe that a simple action like playing sounds would cause a memory error. Please help!

- FlashCrashGuy -
 
Old December 30th, 2008, 05:35 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Hello.

I am going to make a general assumption here that, since you posted your question in the General.NET forum that the LMS you are referring to is written in one of the .NET languages. (Whether or not it is a Web Based or Platform based LMS remains to be seen)

My assumption of the LMS (it if is like most) is an outer shell that displays courses to users and various other material. If this is true about your LMS then I would assume that a user would reach your flash movie by clicking on some link which would take them to a page that would load your flash movie, is that correct so far?

If so, this is what becomes mind-boggling: your flash movie should be acting as a form of an independant application (while it is embedded inside of an LMS, the flash movie itself is responsible for opening and playing the file, again i am assuming) and, unless you have some sort of Interop routines between flash and the LMS, I am not sure how you are recieving this error since, as you pointed out, this error indicates that the app tried to read or write some chunk of protected memory.

The fact that you are able to play this movie in IE directly without the error would indicate to me that there is something else going on within the LMS that is causing this error. Is the LMS your software or is it a commercial application? In case of the former I would add a hook in the code and step through to see what exactly is going on under the hood otherwise I would open a ticket with the vendor.

hth.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
The Following User Says Thank You to dparsons For This Useful Post:
FlashCrashGuy (December 30th, 2008)
 
Old December 30th, 2008, 07:24 PM
Registered User
 
Join Date: Dec 2008
Posts: 4
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hi Doug,

Thanks a bunch for the quick reply, and yes the LMS is made to run the flash in its own separate applications but there are instances where the flash app will reach out to set course completion so a user doesn't have to complete a lesson he/she had done earlier.

The LMS build is not my own and the person that I am corresponding with that is responsible for developing it sometimes gives me the impression that he doesn't know what he is doing. Since I am unable to see exactly how his LMS is being made to run I need some way of making sure that the ball of fixing the current situation is not in my court. I just can't seem to think of a way that my flash app could possibly be having this kind of error when dealing with sound. I am positive it is the sound though. My crash happens when I am playing external mp3 files in my flash app and then when they are finished playing a button is clicked to move onto another section of the lesson. During this time the app is not writing to the LMS database to track completion.

Is there some property that needs to be cleared in an LMS environment after a sound file is loaded and played? I figured that this might somehow be the case, and when I move along to the next section it might freak out when it is not in contact with the audio file or code that invoked it.

The LMS in question is running Crystal Reports for .NET framework 2.0 and is using IE as a launcher if that helps at all.

Thanks again.

- FlashCrashGuy -
 
Old December 30th, 2008, 08:09 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You will have to forgive me, the most I know about ActionScript is that it is based of the ECMA spec (or at least was) so when you say "reach out" what do you mean? Is your flash movie connecting to a database to alter some values or does it somehow make a call into the actual LMS assembiles to trigger some functionality?

You say that a button appears so, I am assuming, you are doing this inside the flash movie. AFAIK, Flash is not capable of raising this type of error and, if there is a .NET Server Error in Application blah blah blah page being displayed, it would be safe to assume that the LMS is responsible. When the user clicks this button that appears, how do you redirect them? Are they sent to another web page or to another part of the flash movie? In the case of the former how are you doing it? Does the page post back to itself?

When the error manifests when, where, and how does it manifest?

Sorry for the barrage of questions but I am trying to get a clearer picture!

-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
The Following User Says Thank You to dparsons For This Useful Post:
FlashCrashGuy (December 31st, 2008)
 
Old December 31st, 2008, 02:58 PM
Registered User
 
Join Date: Dec 2008
Posts: 4
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Haha no worries about the questions. Trust me I have many as well. I am more of a flash guy(obviously) and have not begun to learn my .NET as of yet.

By reach out I mean I use a some calls to a database using code such as...

ExternalInterface.call("SCOSetValue", "cmi.completion_status", "incomplete");
ExternalInterface.call("SCOSetValue", "cmi.success_status ", "unknown");
ExternalInterface.call("SCOSetValue", "cmi.exit", "suspend");

My redirection where the error is occurring is within a single flash SWF and I am just telling it to gotoAndPlay() another section of the main timeline. Nothing is reloaded.

The error is occuring exactly at the time that I click to use the gotoAndPlay() to the next section of my timeline. It is a windows vista error saying that there has been an error with the LMS and that is must be shutdown. After a few seconds I am granted a details report that has the following:

C:\Users\MYUSERNAME\AppData\Local\Temp\WERF68E.tem p.version.txt

&

C:\Users\MYUSERNAME\AppData\Local\Temp\WER55D.temp .mdmp

...both of which are useless in narrowing down the problem. Thanks MS!
 
Old December 31st, 2008, 03:38 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Hmmm, most interesting. For a better clue you might want to go into the event viewer and check the system logs. There is bound to be some information there, whether or not it sets you down the right path remains to be seen.

You say that the LMS is launched from IE am I correct in assuming that the LMS runs completely in a web browser thus it is an ASP.NET 2.0 application? If this is the case have you tried running the LMS inside of Firefox? I had a secnario a few years ago where I had a similar situation:

I had an ASP.NET application that was connected to a database and various AJAX methods on the page. For some reason when I would change the selection of a specific dropdown (which triggered an AJAX event) I would get a Windows Alert box informing me that IE had encountered a fatal error and must close. For the longest time I could not figure this out, I reworte my Ajax routines, everything. One day I ran the application in Firefox and, instead of giving me the Windows Alert I got a .NET Compiler error that the viewstate for the page was incorrect. (Nevermind what that means). Why the error would manifest itself in IE one way and in FF another is beyond me but it did ultimately lead to me solving the problem.

The above is a long shot, the error might be the same across browsers but it couldn't hurt.

At this point I think you need to approach your programmer and inform him of the situation and have him investigate it on his side. Since the LMS works (again an assumption) fine with all the other movies and your movie works fine in a standalone situation it could very well be that there is NOTHING wrong with either of the applications...until they are blended together.

Without knowing the intricacies of the LMS or seeing a definitive stack it is hard for me to give you any definivie direction =\

Let me know if i can be of further help!

-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
The Following User Says Thank You to dparsons For This Useful Post:
FlashCrashGuy (January 2nd, 2009)
 
Old January 2nd, 2009, 02:24 PM
Registered User
 
Join Date: Dec 2008
Posts: 4
Thanks: 3
Thanked 0 Times in 0 Posts
Default

That's cool Doug. Thanks for all the help. I appreciate it greatly.
 
Old January 4th, 2009, 03:15 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

No problem. When you get the issue figured out post back here, i would be interested to find out what the underlying issue is.

-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.