Jump to content



Photo

The VPM alpha/beta thread


  • Please log in to reply
1790 replies to this topic

#541 tictox

tictox

    Enthusiast

  • Members
  • PipPipPip
  • 143 posts

  • Flag: South Africa

  • Favorite Pinball: space

Posted 04 October 2017 - 11:41 PM

I got it t work using the old method not your new function whch has the object reference error,, except now my application crashes every second bootup :

 

nity Editor [version: Unity 2017.1.1f1_5d30cf096e79]

 

VPinMAME64.dll caused an Access Violation (0xc0000005)

  in module VPinMAME64.dll at 0033:7cd3a447.

 

Error occurred at 2017-10-05_012938.

C:\Program Files\Unity_2017.1\Editor\Unity.exe, run by ian.

19% memory in use.

32712 MB physical memory [26250 MB free].

37576 MB paging file [30430 MB free].

134217728 MB user address space [134214761 MB free].

Read from location 020007d0 caused an access violation.

 

Context:

RDI:    0x00000000  RSI: 0x00000000  RAX:   0x4bdb1d00

RBX:    0x3e119050  RCX: 0x00000000  RDX:   0x00000100

RIP:    0x7cd3a447  RBP: 0x00000000  SegCs: 0x00000033

EFlags: 0x00010287  RSP: 0x005fdad0  SegSs: 0x0000002b

R8:    0x7d1a20b0  R9: 0x00000000  R10:   0x00000000

R11:    0x00000200  R12: 0x000001e8  R13:   0x0000003d

R14:    0x00000000  R15: 0x020007d0

 
THE APllcation does not crash  when soundmode is 0 
 
it only cashes every second time once i  have set sound mode to 1
 
the first time I set it even the dmd doesnt work..  which im using ;
 
controllerMame.get_updateDmdPixels(DMDArrayChangeUpdatesHandle.AddrOfPinnedObject(), DMDController.instance.width, DMDController.instance.height);
the funny thing is  the compiled lib isnot using the 64 dll but the crash report says the violation happens in there??
 
(i use the 32 ll because unity editor only supports 32 and I wan to test using the editor ) prerviouly i had to build and test outside the editor . that doesnt even work anymore.. I tried to test building a dll using your 64 dll and unty threw a huff over it  even when disabling the editor as a target.. it could not find the namespace of the dll i made using the 64.   


#542 tictox

tictox

    Enthusiast

  • Members
  • PipPipPip
  • 143 posts

  • Flag: South Africa

  • Favorite Pinball: space

Posted 05 October 2017 - 12:16 AM

mmm. if i diable all dmd code it works fine without crashing the app .. still using the old Game.Settings method. You method does not still does not work same problem , object reference error .. now to find out what is happening with this dmd..



#543 tictox

tictox

    Enthusiast

  • Members
  • PipPipPip
  • 143 posts

  • Flag: South Africa

  • Favorite Pinball: space

Posted 05 October 2017 - 01:00 AM

narrowed it down to "get_updateDmdPixels" crashing the app. I use gc hanldes and uses alloc to pin an address for the pixels I tested this handle as well via "IsAllocated" and it is fine but as sonn as i call :

controllerMame.get_updateDmdPixels(DMDArrayChangeUpdatesHandle.AddrOfPinnedObject(), DMDController.instance.width, DMDController.instance.height); ...... it crashes

 

Also when this is commented out  sound mose works like a treat(old method) also not crashing

 

getting closer but now im in no mans land :)


Edited by tictox, 05 October 2017 - 01:03 AM.


#544 tictox

tictox

    Enthusiast

  • Members
  • PipPipPip
  • 143 posts

  • Flag: South Africa

  • Favorite Pinball: space

Posted 05 October 2017 - 01:41 AM

confirmed and tested "get_updateDmdPixels" is causing the app to crash when sound_mode is 1. If sound_mode is 0 all is good. I tested it with VPM visible and VPM DMD visible to rule that out as culptrit. It does not matter. If sound-mode is 1 then this causes the app to crash every second time.  i am freeing the handle.

 

calling pause when sound_mode is 1 also does not stop the audio.

 

all works fine when sound_mode is  0 



#545 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 05 October 2017 - 06:41 AM

There is still something weird then, as it should not crash in the 64bit version, if this one should actually not even be called as you say.

Are you sure about all that?? Did you run both setup and setup64 also to install both com objects?

 

About the missing pause: I might be able to add this, but don't bet on it.



#546 tictox

tictox

    Enthusiast

  • Members
  • PipPipPip
  • 143 posts

  • Flag: South Africa

  • Favorite Pinball: space

Posted 05 October 2017 - 03:11 PM

i have VP with VPM installed on a other drive, copied both your new dll to thier and installed them yes. I use a ,net exe to build the bridge named tlbImp_32.exe . i have two versions or it the :-_32" and "_64" i added the suffix  to tell them apart and keep them in that same directory. anyway i use this the call tlbimp_32 VPinMAME.dll /out:VPinMameTypeLib.dll on the  cmd line to generate my lib. This lib is copied to the unity plug in directory. the output name is based on the input name so you can not make a mistake, also the unity editor will though  a  huff if i build usng the 64 bit. so base on the out put name , and based on the unity editor i know i am build and using th 32 bit brige dlll named VPinMameTypeLib.dll. i. have to even update my vp vlass to use the call using - "using: VPinMameTypeLib.dll;" or "usingVPinMame64TypeLib.dll" the latter fails anyway because it somehow cant find the namespace.

 

 

Anyway what is weird is that even when  doing all that the error happens in the 64 dll you provided. I CAN NOT even remove that dll from the vp/VPM instll directory. The game wont even start the com object. So nothing in my game except the lib i built is using the com object, the lib was built from the 32 bit dll,. .. but the eorror is in  VPinMAME64.dll regardless. so it is running.. but not from me or my lib.. It must be the com object that loads and runs the 64 dll


Edited by tictox, 05 October 2017 - 03:26 PM.


#547 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 05 October 2017 - 07:07 PM

Phew.. This also goes over my head.. No clue how all that COM madness interacts with your lib then.. To me this is also pretty much a black box that i just use/program..  :/



#548 tictox

tictox

    Enthusiast

  • Members
  • PipPipPip
  • 143 posts

  • Flag: South Africa

  • Favorite Pinball: space

Posted 05 October 2017 - 08:48 PM

thanks toxie, when build the app it does not crash , so this is a unity editor bug.. it only happens in the editor



#549 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 05 October 2017 - 09:09 PM

??? Even more weird..



#550 tictox

tictox

    Enthusiast

  • Members
  • PipPipPip
  • 143 posts

  • Flag: South Africa

  • Favorite Pinball: space

Posted 05 October 2017 - 09:22 PM

i once saw a fatal error dialog before a a crash .. which had a quit option to close the editor, but only once. It is complaining about changing the working directory( my game) to that of (one of the alt sound file paths, i think get off the fence) anyway it said this is not allowed. if you change it via code you should change it back.. funny thing is the datapath is read only to us in c# .well i guess i will just using the  old sound in the editor while i  finish the game.. hope unity sort out this error in the editor when using System.Runtime.InteropServices;


Edited by tictox, 05 October 2017 - 09:23 PM.


#551 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 941 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 06 October 2017 - 03:06 AM

It's probably worth noting that there are known issues trying to unload VPM, and we don't really know the cause. 

 

If you make a debug build of VPM you'll find you can't run a table more than once in VPX.   You'll get a debug assertion inside Microsoft's library code on the basic file stream IO functionality.     That suggests something is not unloading completely.   Might be contributing to whatever problem you're having. 



#552 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 06 October 2017 - 07:31 AM

Also true. Multiple people already looked into that one over the years and failed resolving it..  :/



#553 tictox

tictox

    Enthusiast

  • Members
  • PipPipPip
  • 143 posts

  • Flag: South Africa

  • Favorite Pinball: space

Posted 10 October 2017 - 06:40 PM

normally i n such  case i nromally rename the route variable and then get a million errors from the compiler. These errors are like your stack trace and it is quickly possible to tack it from it source. 

besides all all that,  Toxie do you know why the alt sound does not pause when you tell VPM to pause. Pause works perfectly when sound is orginal. When setting the sound_mode to two,  the emulation stops, but not the sound.



#554 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 11 October 2017 - 02:44 PM

As said, this is currently missing. And i do not know if this is easy to add, as this feature is playing the sound 'in parallel' without much knowledge about the emulation core itself.

But i'll look into it..



#555 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 11 October 2017 - 05:03 PM

i just added some code, could you please test if the pause now works for your use case??



#556 tictox

tictox

    Enthusiast

  • Members
  • PipPipPip
  • 143 posts

  • Flag: South Africa

  • Favorite Pinball: space

Posted 11 October 2017 - 06:47 PM

Thanks for trying :) I downloaded the zip from the org post and installed both dll's, does not seem to make a difference.. alt sound still plays when i pause the vpm controller



#557 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 11 October 2017 - 09:23 PM

i did not update those dlls yet.. :/

could you compile your own ones please for now/testing?



#558 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 15 October 2017 - 08:01 AM

*ping*



#559 jwosi

jwosi

    Hobbyist

  • Members
  • PipPip
  • 40 posts

  • Flag: United States of America

  • Favorite Pinball: back to the future

Posted 18 November 2017 - 06:39 PM

After updaing to this version, i have a ton of tables that now error out on start with this error: "Game Name Not Found" .GameName = cGameName



#560 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 18 November 2017 - 06:55 PM

I guess you mean the newer Stern SAM tables? Then most likely you used an unofficial build from the 'other forum'?