Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Galaxy s7 edge crash
03-17-2016, 03:24 PM
Post: #16
RE: Galaxy s7 edge crash
The S7 is out for just a week, it's normal that it'll take some time.
Find all posts by this user
Quote this message in a reply
03-18-2016, 04:32 AM
Post: #17
RE: Galaxy s7 edge crash
Same problem on my galaxy s7 edge. Following thread.
Find all posts by this user
Quote this message in a reply
03-18-2016, 09:30 AM
Post: #18
RE: Galaxy s7 edge crash
Hopefully a nightly build will be released which has better compatibility. I guess just keep testing with all the new releases that comes out to see if it works.
Find all posts by this user
Quote this message in a reply
03-20-2016, 06:09 AM
Post: #19
RE: Galaxy s7 edge crash
Latest nightly seems good so far but haven't done much testing.
Find all posts by this user
Quote this message in a reply
03-20-2016, 04:50 PM (This post was last modified: 03-20-2016 05:59 PM by Bronxc.)
Post: #20
RE: Galaxy s7 edge crash
Galaxy s7 edge, latest 1.2.2 don't work any games!! Crash on opening app.

Resolved: with Multithreaded on, I/0 timing method Simulate UMD delays and Frameskip auto, Audio Latency: high, Audio Sync off; works well!!!!

Edit: nope, crash again!!!!
Find all posts by this user
Quote this message in a reply
03-20-2016, 07:46 PM
Post: #21
RE: Galaxy s7 edge crash
Mine seems to work for a while.. Then keeps crashing. Can usually get it going again by deleting data and saves.
Find all posts by this user
Quote this message in a reply
03-22-2016, 03:01 AM
Post: #22
RE: Galaxy s7 edge crash
Does anyone have one of these devices and a compiler to test out some things?

It seems like it might be related to cache line sizes, but to verify that I need someone to try some code on the device.

-[Unknown]
Find all posts by this user
Quote this message in a reply
03-22-2016, 07:49 PM
Post: #23
RE: Galaxy s7 edge crash
If you can give me some steps I'll be glad to do it. I'm a tech savvy person currently majoring in computer science.
Find all posts by this user
Quote this message in a reply
03-22-2016, 10:15 PM (This post was last modified: 03-22-2016 10:17 PM by chdcchris.)
Post: #24
RE: Galaxy s7 edge crash
Hey there. I'm coming from the Dolphin forum to report about the crashes. Dolphin seems to do the exact same thing when Dynarec JIT is enabled.

I've investigated the problem a bit with logcat and it seems that the crashes are very similar. If anyone is interested, here are both errors.

Code:
03-22 23:40:30.997 18606-19793/? A/libc: Fatal signal 4 (SIGILL), code 1, fault addr 0x7f45bfd2e0 in tid 19793 (CPU thread)
03-22 23:40:31.057 3152-3152/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-22 23:40:31.057 3152-3152/? A/DEBUG: Build fingerprint: 'samsung/hero2ltexx/hero2lte:6.0.1/MMB29K/G935FXXU1APBF:user/release-keys'
03-22 23:40:31.057 3152-3152/? A/DEBUG: Revision: '9'
03-22 23:40:31.057 3152-3152/? A/DEBUG: ABI: 'arm64'
03-22 23:40:31.057 3152-3152/? A/DEBUG: pid: 18606, tid: 19793, name: CPU thread  >>> org.dolphinemu.dolphinemu <<<
03-22 23:40:31.057 3152-3152/? A/DEBUG: signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0x7f45bfd5fc
03-22 23:40:31.097 3152-3152/? A/DEBUG:     x0   0000007f45bfd5fc  x1   0000000000000070  x2   0000007f76586a70  x3   0000007f457bf0e0
03-22 23:40:31.097 3152-3152/? A/DEBUG:     x4   0000000000000000  x5   ffffff80ffffffd8  x6   0000000000258eb4  x7   0000007f457bf4f0
03-22 23:40:31.097 3152-3152/? A/DEBUG:     x8   00000000ffffff80  x9   0000007f457bf4f0  x10  0000000000000001  x11  0000007f62e6fc60
03-22 23:40:31.097 3152-3152/? A/DEBUG:     x12  0000007f9096cf80  x13  0000000000000002  x14  0000000000000003  x15  0000000000000029
03-22 23:40:31.097 3152-3152/? A/DEBUG:     x16  000000000000002a  x17  0000007f9096c000  x18  0000007f62e6fc60  x19  0000000000000000
03-22 23:40:31.097 3152-3152/? A/DEBUG:     x20  0000000000000001  x21  0000000000000001  x22  0000000000000001  x23  0000000080000000
03-22 23:40:31.097 3152-3152/? A/DEBUG:     x24  00000000803d45a0  x25  00000000816d73b0  x26  0000000000258e00  x27  0000000000033b38
03-22 23:40:31.097 3152-3152/? A/DEBUG:     x28  0000002500000000  x29  0000007f76750fb0  x30  0000007f45bfd5fc
03-22 23:40:31.097 3152-3152/? A/DEBUG:     sp   0000007f457bf2d0  pc   0000007f45bfd5fc  pstate 0000000060000000
03-22 23:40:31.097 3152-3152/? A/DEBUG:     #00 pc 00000000003fd5fc  <unknown>

Code:
03-22 23:43:38.487 3152-3152/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-22 23:43:38.487 3152-3152/? A/DEBUG: Build fingerprint: 'samsung/hero2ltexx/hero2lte:6.0.1/MMB29K/G935FXXU1APBF:user/release-keys'
03-22 23:43:38.487 3152-3152/? A/DEBUG: Revision: '9'
03-22 23:43:38.487 3152-3152/? A/DEBUG: ABI: 'arm64'
03-22 23:43:38.487 3152-3152/? A/DEBUG: pid: 21266, tid: 21308, name: AndroidRender  >>> org.ppsspp.ppsspp <<<
03-22 23:43:38.487 3152-3152/? A/DEBUG: signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0x7f57c13dc8
03-22 23:43:38.527 3152-3152/? A/DEBUG:     x0   0000000000000000  x1   0000000100000001  x2   0000000008b32aac  x3   0000000008000000
03-22 23:43:38.527 3152-3152/? A/DEBUG:     x4   00000000ffffffff  x5   0000000000000e9c  x6   0000000000000001  x7   0000000008a38d2c
03-22 23:43:38.527 3152-3152/? A/DEBUG:     x8   0000000000000000  x9   0000007f7602b4f0  x10  0000000000000001  x11  0000007f86b07420
03-22 23:43:38.527 3152-3152/? A/DEBUG:     x12  00000000000062c0  x13  0000000000000040  x14  0000000000000041  x15  000000000000005d
03-22 23:43:38.527 3152-3152/? A/DEBUG:     x16  0000007f57c13dc8  x17  0000000000000068  x18  0000007f86b07420  x19  0000002309fff260
03-22 23:43:38.527 3152-3152/? A/DEBUG:     x20  0000000000000001  x21  0000000009a16cb0  x22  0000000000000280  x23  000000000000526a
03-22 23:43:38.527 3152-3152/? A/DEBUG:     x24  0000007f76ae5000  x25  0000000020000000  x26  0000007f57b00000  x27  0000007f76b1ab90
03-22 23:43:38.527 3152-3152/? A/DEBUG:     x28  0000002300000000  x29  0000000012e17400  x30  0000007f57b001c4
03-22 23:43:38.527 3152-3152/? A/DEBUG:     sp   0000007f7602ab10  pc   0000007f57c13dc8  pstate 0000000060000000
03-22 23:43:38.527 3152-3152/? A/DEBUG:     #00 pc 0000000000113dc8  <unknown>
03-22 23:43:38.527 3152-3152/? A/DEBUG:     #01 pc 00000000000001c0  <unknown>

Now I seem to have found a temporary workaround for this. I've made a video doing some random testing with PPSSPP and Dolphin. This video shows two crashes happening first, then later I get it to work.

I don't seem to be able to post links yet, so I'll just post the youtube video id: watch?v=ayhFpSA-Jw0

This worked for me most of the times (With a few occasional crashes)
As shown in the video:

1. Run PPSSPP
2. Disable Dynarec in settings
3. Run the game to a point after the crashes happen
4. Go back in settings and enable dynarec
5. Go back to the game with the back button
6. The game should run fine after that
7. If it just doesn't seem to work restart phone and try again.

I have tried a similar method with dolphin and for me, it greatly increases the chances of running the game.

I really hope this will help in finding the problem. If we can figure this out, it will help the Dolphin community too.
Find all posts by this user
Quote this message in a reply
03-22-2016, 11:45 PM (This post was last modified: 03-22-2016 11:47 PM by [Unknown].)
Post: #25
RE: Galaxy s7 edge crash
(03-22-2016 07:49 PM)cha0tic Wrote:  If you can give me some steps I'll be glad to do it. I'm a tech savvy person currently majoring in computer science.

Awesome. So first, you'll need to get going with an Android build setup.

If you're on Linux, make sure you have ant and java and stuff installed. If you're on Windows, you can install WinAnt ( https://code.google.com/archive/p/winant/ ).

Then get the Android SDK, and install it:
https://developer.android.com/sdk/index.html (you can use the "Other options" if you want too.)

And also the NDK:
http://developer.android.com/ndk/downloads/index.html

On Windows, you can also just get e.g. NVPACK, which basically has everything you'll need:
https://developer.nvidia.com/codeworks-android

Once you've got that installed, the next step is to grab PPSSPP. If you don't have it already, you also need Git.
https://git-scm.com/downloads

Then run in a terminal / command prompt:

git clone --recursive https://github.com/hrydgard/ppsspp.git
cd ppsspp/android

If on Windows, use (insert your NDK path):
set NDK=C:\AndroidNDK

On Linux/Mac:
export NDK=/path/to/ndk

Now just type:

ant debug

This will make it compile. It could take 20 minutes, but once it's done, you can run this to install it on your device (make sure it's plugged in, and you've activated debugging by tapping the build identifier 7 times in Android settings):

adb install -r bin/PPSSPP-debug.apk

---

Once you've done all of the above, and you've made sure you can compile and run the app... it's time to actually make changes.

Edit ppsspp/Common/Arm64Emitter.cpp, and look for this:
Code:
void ARM64XEmitter::FlushIcacheSection(u8* start, u8* end)
{
#if defined(IOS)
    // Header file says this is equivalent to: sys_icache_invalidate(start, end - start);
    sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start);
#else
#if defined(__clang__) && !defined(_M_IX86) && !defined(_M_X64)
    __clear_cache(start, end);
#else
#if !defined(_M_IX86) && !defined(_M_X64)
    __builtin___clear_cache(start, end);
#endif
#endif
#endif
}

This is the part that does cache invalidation. Just in case it is not invalidating incorrectly, what I want to try is increasing the size of the invalidation. There's some suspicion that the OS is calculating the wrong instruction cache line size.

So replace the above with this:
Code:
void ARM64XEmitter::FlushIcacheSection(u8* start, u8* end)
{
    start = m_startcode + 4096 < start ? start - 4096 : m_startcode;
    end += 4096;
#if defined(IOS)
    // Header file says this is equivalent to: sys_icache_invalidate(start, end - start);
    sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start);
#else
#if defined(__clang__) && !defined(_M_IX86) && !defined(_M_X64)
    __clear_cache(start, end);
#else
#if !defined(_M_IX86) && !defined(_M_X64)
    __builtin___clear_cache(start, end);
#endif
#endif
#endif
}

If that doesn't work, which it may not, we can try this one instead:
Code:
void ARM64XEmitter::FlushIcacheSection(u8* realStart, u8* realEnd)
{
    for (u8 *start = realStart; start < realEnd; start += 64)
    {
        u8 *end = start + 64;

#if defined(IOS)
    // Header file says this is equivalent to: sys_icache_invalidate(start, end - start);
    sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start);
#else
#if defined(__clang__) && !defined(_M_IX86) && !defined(_M_X64)
    __clear_cache(start, end);
#else
#if !defined(_M_IX86) && !defined(_M_X64)
    __builtin___clear_cache(start, end);
#endif
#endif
#endif
    }
}

Another thing we can try, although it's silly, it could work - flushing twice:
Code:
void ARM64XEmitter::FlushIcacheSection(u8* realStart, u8* realEnd)
{
#if defined(IOS)
    // Header file says this is equivalent to: sys_icache_invalidate(start, end - start);
    sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start);
    sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start);
#else
#if defined(__clang__) && !defined(_M_IX86) && !defined(_M_X64)
    __clear_cache(start, end);
    __clear_cache(start, end);
#else
#if !defined(_M_IX86) && !defined(_M_X64)
    __builtin___clear_cache(start, end);
    __builtin___clear_cache(start, end);
#endif
#endif
#endif
}

If all else fails, we can try flushing *everything*, to try to confirm if it really is this or not (this could be not great for performance...):
Code:
void ARM64XEmitter::FlushIcacheSection(u8* realStart, u8* realEnd)
{
#if defined(IOS)
    // Header file says this is equivalent to: sys_icache_invalidate(start, end - start);
    sys_cache_control(kCacheFunctionPrepareForExecution, m_startcode, end - m_startcode);
#else
#if defined(__clang__) && !defined(_M_IX86) && !defined(_M_X64)
    __clear_cache(m_startcode, end);
#else
#if !defined(_M_IX86) && !defined(_M_X64)
    __builtin___clear_cache(m_startcode, end);
#endif
#endif
#endif
}

After making each change, you can run "ant debug" to compile again, and the "adb install -r bin/PPSSPP-debug.apk" command again to reinstall on your device. It will be much quicker to compile the second time, since it only recompiles things you changed.

If none of those things help, it probably isn't actually icache related. But that will be very interesting, if so.

-[Unknown]
Find all posts by this user
Quote this message in a reply
03-23-2016, 01:53 AM
Post: #26
RE: Galaxy s7 edge crash
I got Ubuntu on my laptop so I might try this at some point.
Find all posts by this user
Quote this message in a reply
04-04-2016, 06:07 PM
Post: #27
RE: Galaxy s7 edge crash
Any updates? Crashing on pretty much every single game with dynarec jit enabled.. disabling this runs the games fine but with major lag... galaxy s7 user
Find all posts by this user
Quote this message in a reply
04-06-2016, 07:19 PM
Post: #28
RE: Galaxy s7 edge crash
Not sure if anyone tried the things unknown posted, so assuming there's no update Smile
Find all posts by this user
Quote this message in a reply
04-07-2016, 08:56 AM
Post: #29
RE: Galaxy s7 edge crash
Hopefully the devs will do their magic. Really want this to work. Upgraded from a s4 to an s7 edge and want to see how PPSSPP performs on this phone (when its fully optimised).

S7 edge. A powerful phone, but restricted by apps not optimised for it. (A good example is GTA San Andreas. Seems to be more buggy on the s7).
Find all posts by this user
Quote this message in a reply
04-07-2016, 01:33 PM (This post was last modified: 04-07-2016 01:33 PM by TkSilver.)
Post: #30
RE: Galaxy s7 edge crash
Unfortunately it is not always optimizations that are needed on Samsung devices.... sometimes Samsung just screws up drivers or base android with their "optimized version". So sometimes it is purely bug fixing what Samsung did differently from everyone else until they do something else odd and it starts all over again.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: