INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Program Crashes when in a LOOP and you exit plugins  (Read 2672 times)

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Program Crashes when in a LOOP and you exit plugins
« on: August 24, 2002, 06:16:37 am »

if i put the program in a for next loop, and you click out of plug-ins back into MJ the program crashes.

Is there away to exit gracefully when in a loop?

In Private Sub UserControl_Terminate()

MyLoop = List1(0).ListCount

this does not seem to work and it crashes MJ when you click out of plug-ins
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
RE:Program Crashes when in a LOOP and you exit plugins
« Reply #1 on: August 25, 2002, 08:45:36 am »

any ideas on how to keep it from crashing MJ?

is this a code problem or MJ problem?

I would think MJ would terminate it for me or at least not crash.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Cephlen

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 98
  • someday I will find a pic that looks good...
RE:Program Crashes when in a LOOP and you exit plugins
« Reply #2 on: August 26, 2002, 09:12:08 am »

Try putting some error handling in your loop.

Wonder if that would work.
Logged
All ICQ's are ignored unless I have added you.

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
RE:Program Crashes when in a LOOP and you exit plugins
« Reply #3 on: August 26, 2002, 09:48:07 am »

Well Not Really...


Run-time error'-2147417848 (80010108)':

Automation error

The object invoked has disconnected from its clients

Then

Media Jukebox Application Error

The instruction at "0x212f2070" referenced memory at "0x212f2070". The memory could not be "read".

Click OK to terminate the program.


when you do it closes MJ
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Cephlen

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 98
  • someday I will find a pic that looks good...
RE:Program Crashes when in a LOOP and you exit plugins
« Reply #4 on: August 26, 2002, 09:59:24 am »

hmm, try putting a DoEvents in your loop.  I wonder if that will fix it.
Logged
All ICQ's are ignored unless I have added you.

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
RE:Program Crashes when in a LOOP and you exit plugins
« Reply #5 on: August 26, 2002, 10:11:54 am »

DoEvents are in there.


For myloop = MyPosition To List1(0).ListCount - 1

List1(0).ListIndex = myloop
List1(0).SetFocus

DoEvents
CommandLookUp_Click
DoEvents

Next myloop
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
RE:Program Crashes when in a LOOP and you exit plugins
« Reply #6 on: August 26, 2002, 01:42:30 pm »

Does it crash right away, or does it wait 5 seconds or so?

And what happens without the DoEvents(...)?

Thanks.

-Matt
Logged
Matt Ashland, JRiver Media Center

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
RE:Program Crashes when in a LOOP and you exit plugins
« Reply #7 on: August 26, 2002, 05:02:37 pm »

>> Does it crash right away, or does it wait 5 seconds or so?
It waits a few seconds maybe 5

> And what happens without the DoEvents(...)?
Same thing, crash

I think i will make a ocx with a loop in it do a call to a sub with really nothing in it and see what happens.

I am wondering if it has something to do with the stack
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Cephlen

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 98
  • someday I will find a pic that looks good...
RE:Program Crashes when in a LOOP and you exit plugins
« Reply #8 on: August 27, 2002, 11:31:42 am »

maybe try a different type of loop?
maybe try a different type of loop?
maybe try a different type of loop?
maybe try a different type of loop?
maybe try a different type of loop?
maybe try a different type of loop?
maybe try a different type of loop?
maybe try a different type of loop?
maybe try a different type of loop?
maybe try a different type of loop?
maybe try a different type of loop?
Logged
All ICQ's are ignored unless I have added you.

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
RE:Program Crashes when in a LOOP and you exit plugins
« Reply #9 on: August 27, 2002, 12:00:59 pm »

You Sound Like Your Repeating Your Self

Step 1: Turn Off Power
Step 2: Count To 10
Step 3: Turn On Power

Besides can you recommend one that does not crash?

I have not tested a plain loop yet, so not sure if thats it.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
RE:Program Crashes when in a LOOP and you exit plugins
« Reply #10 on: August 28, 2002, 06:48:56 am »

Does your OCX get a "Terminate" call somewhere in there? (MJ calls the function Terminate if it exists before releasing a control)

If so, make a handler to break out of your loops or wait until they're done on Terminate.

If Terminate doesn't get called, we'll keep thinking.

-Matt
Logged
Matt Ashland, JRiver Media Center

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
RE:Program Crashes when in a LOOP and you exit plugins
« Reply #11 on: August 28, 2002, 07:40:13 am »

>> Does your OCX get a "Terminate"
it did but removed it i did not think it was helping..

it could be i just did not do it correctly.

i will look at that again.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA
Pages: [1]   Go Up