MathewWi / nulldc

Automatically exported from code.google.com/p/nulldc
0 stars 1 forks source link

r129+ PuruPuru plugin causes crash #383

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1: Put the Bios in the data folder
2: Open the nulldc emulator
3: Emulator itself crashes immediately when I try open the emulator.

What is the expected output? What do you see instead?

The expected output is: *I already have the latest version of DirectX and C++ 
runtimes but Nulldc 1.0.4 r133 and optimized r133 both still crashes. So 
Something is wrong here.*

But instead I see: *I want to see this fixed. This is an issue here. Nulldc 
1.0.4 r50 works fine.*

What version of the product are you using? What build? What plugins?

I use version: *Edit me*

I use a *Edit This*Release*Debug*-NoTrace*Edit This* build

I use the following plugins:

PowerVR Plugin: *Edit me*
GDRom Plugin: *Edit me*
AICA Plugin: *Edit me*
ARM7 Plugin: *Edit me*
Maple Plugin(s): *Edit me*
Ext.Device Plugin: *Edit me*

On what kind of system?

My system specifications are as follows:

Operating System: *Edit me*
CPU: *Edit me*
Video Card: *Edit me*
Sound Card: *Edit me*
Additional related hardware and/or software: *Edit me*

Please provide any additional information below:

*Edit me*Providing information on the selected options and/or features of
the software and/or the used plugins when building/running can also be of
some help*Edit me*

Original issue reported on code.google.com by flyingdi...@gmail.com on 22 May 2011 at 8:20

Attachments:

GoogleCodeExporter commented 9 years ago
Do not use "optimized" releases when reporting bugs. Also, please just provide 
the information from the console. Otherwise, this will have to be marked as 
invalid.

Original comment by KrossX3 on 23 May 2011 at 2:30

GoogleCodeExporter commented 9 years ago
I not only used the optimized release. I also used the regular releases as 
well. They both crash. I also tried r134 it still crashes. Please fix this. I 
don't have a console. I can only report bugs from the emulator itself. 

Original comment by flyingdi...@gmail.com on 23 May 2011 at 7:31

GoogleCodeExporter commented 9 years ago
It would help if you could include your computer's specifications so that we 
could see whether or not it is a hardware issue.

Original comment by hookonso...@gmail.com on 23 May 2011 at 8:12

GoogleCodeExporter commented 9 years ago
When I say that you should provide the information from the console, I mean the 
black window with letters scrambled that opens with nullDC. The one that's 
actually covered on your third screenshot.

That's the only thing that could've been useful from your screenshots, yet it's 
covered. And as hsonic says (and also as shown on the template), provide with 
your system specs information.

Original comment by KrossX3 on 24 May 2011 at 2:17

GoogleCodeExporter commented 9 years ago
Okay My System Specs Information

Operating System: Windows 7 Home Premium 64-bit
CPU: Intel(R) Core(TM) Extreme Q9300 @ 2.53GHz
Video Card: NVidia GTX 280M
Sound Card: IDT High Definition Audio Codec
Additional related hardware and/or software: 
4GB Memory
Two 320 GB Hard Drives

NullDC 1.0.4 r50 works perfectly on my PC but r134 does not as it just keeps 
crashing on me. 

Original comment by flyingdi...@gmail.com on 26 May 2011 at 6:26

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Screenshot of nulldc 1.0.4 r134 with crash with a black window with letters 
shown and crash information. 

Original comment by flyingdi...@gmail.com on 26 May 2011 at 6:39

Attachments:

GoogleCodeExporter commented 9 years ago
Well, the screenshot shows absolutely nothing to me. That's from a clean 
folder, right?

Original comment by KrossX3 on 26 May 2011 at 6:50

GoogleCodeExporter commented 9 years ago
I don't understand you at all and makes no sense whatsoever. You should be able 
to read what it says on the black window and reads what plugins are loaded. It 
crashes immediately when I open nulldc.

Original comment by flyingdi...@gmail.com on 26 May 2011 at 6:55

GoogleCodeExporter commented 9 years ago
I really hope this helps it should tell you the plugins thats loaded and used 
so I'm typing them manully. The nulldc win32 release no trace.exe is run within 
a folder. I updated the screenshots to see if it helps.

I use version: *1.0.4 r134*

I use a *nullDC_Win32_Release-NoTrace* build

I use the following plugins:

PowerVR Plugin: *nulldc PowerVR--Direct3D HAL [Dec 29 2010]
                 nulldc-PowerVR <D3D11> --[Sep 9 2010]*
GDRom Plugin: *Image Reader plugin by drk:Razierl & GiGaHeRz [Dec 9 2010]*
AICA Plugin: *Empty Aica Plugin [no sound/reduced compat] [Oct 31 2010]
              nulldc AICA [Dec 9 2010]*
ARM7 Plugin: *VBA ARM Sound Cpu Core [Dec 9 201]*
Maple Plugin(s): *nulldc Maple Devices [Jan 8 2011]
                  nulldc Maple Devices [May 13 2011]
                  Puru imput plugin v0.1 by Falcon4ever [Dec 30 2010]
                   XInput for nulldc by shuffle2 [Dec 28 2010]*
Ext.Device Plugin: *nullExtDev <Oct 31 2010>*

Original comment by flyingdi...@gmail.com on 26 May 2011 at 7:19

Attachments:

GoogleCodeExporter commented 9 years ago
When I say that it shows nothing to me, it means there's nothing useful to 
diagnose the problem in that "text" in there. ¬_¬

If r50 worked well for you, then try to find exactly which revision made it no 
longer work for you.

Original comment by KrossX3 on 26 May 2011 at 8:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
r128 works for me. r129 is the revision where it no longer works for me. I 
don't know if this is going to help you or not. This is the best I can do. 

So if this does not help then, unfortunately, If you cannot understand the text 
in the black window or the plugins it loaded when I try opening I cannot be any 
much help any further. I even type in the plugins in my comments that the 
emulator loaded to see if it helps. I cannot be help you any further if you 
cannot understand what's in that last screenshot or if you cannot understand 
what the text says in the black window. I cannot help you since I don't know 
what you cannot understand about the last 2 screenshots of the black window I 
posted. 

Original comment by flyingdi...@gmail.com on 26 May 2011 at 10:40

GoogleCodeExporter commented 9 years ago
Is not that I cannot understand that, is just that no useful information was 
shown. Finding the culprit revision however, does seem helpful instead.

Since r129 seems to be the culprit, it would point to the PuruPuru plugin. Try 
just deleting it.

Original comment by KrossX3 on 26 May 2011 at 11:00

GoogleCodeExporter commented 9 years ago
Deleting the PuruPuru Plugin really helps. I'm no longer getting any crashes. 
Thanks. By any chance when will you add Save States (most important) and 
Re-Recording (2nd or 3rd most important) features since some games are hard?

Original comment by flyingdi...@gmail.com on 26 May 2011 at 11:17

GoogleCodeExporter commented 9 years ago
Never.

Original comment by KrossX3 on 26 May 2011 at 11:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by KrossX3 on 27 May 2011 at 5:53

GoogleCodeExporter commented 9 years ago
Sounds like a null pointer.

With a lighting-fast-look at the source i noticed a few issues.

In : int Search_Devices() , void FASTCALL Unload() , s32 FASTCALL 
Load(emu_info* emu) 

You're forgetting to null-ify those 2 in case the device allocated rumble/joy 
members:
                        if(joyinfo[i].rumble != NULL) SDL_HapticClose(joyinfo[i].rumble);
                        if(joyinfo[i].joy != NULL) SDL_JoystickClose(joyinfo[i].joy);

This is pretty dangerous coding practice and can lead to unexpected crash in 
the next SDL_XX_Close(ptr).

SDL is a C library and uses standard alloc/free routines.
Deleting a null pointer doesn't have the same behaviour as if you where using 
C++'s delete keyword but results in a hard crash.

Also , when numjoy <= 0 make sure to check the joyinfo array if its null when 
accessing its members.

Original comment by Dimitris...@gmail.com on 30 May 2011 at 9:42

GoogleCodeExporter commented 9 years ago
Hey! Dangerous coding is ma'middle name! =D

Anyway, I see the error in Unload() but not the others. Still, if it was 
something like that, I think it should at least show some of the first messages 
on the console. To me, it looks as if the wrong version of SDL.dll was used.

Original comment by KrossX3 on 30 May 2011 at 6:07

GoogleCodeExporter commented 9 years ago
There's a reason I want the issue tracker closed.

We know the cause for all of the submitted issues already and even for some 
issues never submitted.

Not to mention that 99% of the submitted "issues" are along the lines of user 
errors, errors related to outdated builds/versions, status update requests, 
spam, trolling, help requests or pointless fighting.

Having the issue tracker open does more harm than good as things are now.

Original comment by Mr.PsyMan on 30 May 2011 at 8:15

GoogleCodeExporter commented 9 years ago

@Kross-X:
If you look carefully at the code there is a potential of accessing a null 
pointer in many places ;-)

Anyway -- what i would recommend in a case like this where the issue can't be 
easily reproduced, is :

a' - The person who opened the issue should build a debug version of the 
emulator and trace it
b' - ..Or if he/she can't compile code , debuggers like WinDbg or olly would 
help
c' - Rev diff Rev diff Rev diff Rev diff
d' - Add try/catch exception blocks to all parts of the code that look 'fishy' 
and print "hints" in a message box ;-)

Original comment by Dimitris...@gmail.com on 1 Jun 2011 at 12:22

GoogleCodeExporter commented 9 years ago
Issue 385 has been merged into this issue.

Original comment by KrossX3 on 5 Jun 2011 at 10:28

GoogleCodeExporter commented 9 years ago
A Purupuru built with an updated SDL, and the updated SDL too.
http://www.mediafire.com/?1obcjqb4qh9cxr9

Worth to check if it works any better.

Original comment by KrossX3 on 17 Aug 2011 at 7:32

GoogleCodeExporter commented 9 years ago
Oops, forgot to allow comments. Done now.

Original comment by KrossX3 on 18 Aug 2011 at 6:15

GoogleCodeExporter commented 9 years ago
Hi, i fixed the crash that happen when trying to configure this plugins without 
a joystick plugged in. They're a lot of pointer not tested for null here... 
also, a debugger isin't hard to use... i just replaced some code in config.cpp 
like this:

if(joyinfo[joysticks[current_port].ID].canRumble)

with this:
if(joyinfo && joyinfo[joysticks[current_port].ID].canRumble)

at 2 location and it fixed the issue, i dunno if there is anymore, but i guess 
so...

Original comment by stevebea...@gmail.com on 29 Aug 2011 at 4:52

GoogleCodeExporter commented 9 years ago
Well, that's a different crash altogether. =P

I use some unsafe safety methods and assumptions, which is why I don't 
overcheck stuff. In that case, I should've checked for something on the Support 
struct but I really neglected the config thingy. I guess I should make it 
properly safe someday.

Original comment by KrossX3 on 31 Aug 2011 at 3:51

GoogleCodeExporter commented 9 years ago
I would suggest raising the priority of this issue. The fix is rather simple, 
but as it is, it makes it virtually impossible to use the PuruPuru plugin in a 
keyboard-only configuration.

Original comment by Dima.Rui...@gmail.com on 2 Sep 2012 at 6:31

GoogleCodeExporter commented 9 years ago
Issue 460 has been merged into this issue.

Original comment by KrossX3 on 2 Oct 2012 at 8:49

GoogleCodeExporter commented 9 years ago
Those interested in this plugin, please check the following thread:

http://forums.ngemu.com/showthread.php?t=151334

Original comment by KrossX3 on 9 Oct 2012 at 8:21