Giter VIP home page Giter VIP logo

Comments (13)

the0ne avatar the0ne commented on May 30, 2024 1

I confirm that manually updating as mentioned above fixed the bug - Thanks!

from regex.

phikal avatar phikal commented on May 30, 2024

As you mentioned, I haven't experienced (or heard of) anything like that yet, but I would of course like to fix it if possible.

As seen here, ReGeX wurde angehalten is not defined as a string, so it's obviously a system bug, but it would still be useful to know stuff like

  • level
  • score
  • round
  • an example of a failing task
  • whether just "deleting app data" could fix it too
  • general system information

And if possible, a log of how it failed would be nice, but not necessary.

from regex.

jneutze avatar jneutze commented on May 30, 2024

Hi again,

yep it is definetely a System-Error-Message.
Sorry I didn't clear that up.

My Android is not rooted. So logCat is out of the question for the time being.

(I guess the following values should be right, but can't prove it. I will try to observe the next Halt more rigorously)
Level: 10+
Score: idk, since I get more efficient everytime. I guess should have been always above 5000.
Round: 1st time was probably above 300. Probably the others were always above 100.

Example of a failing task: N/A, because the program doesn't seem to show it to me. It seems to hang directly after generating a new task, after I solved the last one.
Impact of Deleting App Data: Not tested. I will report on this the next time it happens

General System Information:
Android: 6.0.1
Kernel-Version: 3.10.49-8935060
Buildnumber: MMB29M.J500FNXXU1BPI1
Device: Samsung Galaxy J5

from regex.

jneutze avatar jneutze commented on May 30, 2024

Deleting App Data works and makes it run again. But ofc, I am back at lvl 1 and 0 Points.

Another thing: It could be, that it only happens when I already have some input typed in. Because this time (at least Lvl 11, at least 8500 Points, at least 100 rounds), I started the solving, typed something in, and had to press Back two times to do something different. After that, the Game was paused by the System it seems.

from regex.

jneutze avatar jneutze commented on May 30, 2024

Lol, sry, but thats it.
it doesn't depend on the level. It is just that the alter levels were difficult enough, so I didn't input the full solution, but something, and then switched to another program.
So it is reproducible it seems.
If I start to type input, tab out then, the program gets halted by the System.

from regex.

jneutze avatar jneutze commented on May 30, 2024

It seems using the Back-Key two times to tab out is more reliable in reproducing this problem than tabbing out with the Home-Key.
tabbing out with the Home-key seems to need a few tries till it breaks the game.
Using the Back-Key two times seems to reproduce it direclty.

from regex.

phikal avatar phikal commented on May 30, 2024

Have you tried the same thing with previous versions/other game modes? I'll manually change my score, and then try what you described.

I still have no concrete idea what is causing the crash.

from regex.

the0ne avatar the0ne commented on May 30, 2024
11-22 10:10:07.922 I/ActivityManager(881): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.phikal.regex/.Activities.GameActivity bnds=[111,1440][309,1656] (has extras)} from uid 10303 on display 0
11-22 10:10:07.972 I/ActivityManager(881): Start proc 839:com.phikal.regex/u0a181 for activity com.phikal.regex/.Activities.GameActivity
11-22 10:10:08.072 W/System  (839): ClassLoader referenced unknown path: /data/app/com.phikal.regex-1/lib/arm
11-22 10:10:08.145 E/AndroidRuntime(839): Process: com.phikal.regex, PID: 839
11-22 10:10:08.145 E/AndroidRuntime(839): java.lang.RuntimeException: Unable to resume activity {com.phikal.regex/com.phikal.regex.Activities.GameActivity}: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
11-22 10:10:08.145 E/AndroidRuntime(839):         at com.phikal.regex.Activities.GameActivity.getName(Unknown Source)
11-22 10:10:08.145 E/AndroidRuntime(839):         at com.phikal.regex.Activities.GameActivity.onResume(Unknown Source)
11-22 10:10:08.146 W/ActivityManager(881):   Force finishing activity com.phikal.regex/.Activities.GameActivity
11-22 10:10:08.741 W/ActivityManager(881): Activity pause timeout for ActivityRecord{9f98210 u0 com.phikal.regex/.Activities.GameActivity t424077 f}
11-22 10:10:09.605 I/ActivityManager(881): Process com.phikal.regex (pid 839) has died
11

from regex.

phikal avatar phikal commented on May 30, 2024

Looking into the git history, the code and with the help of @the0ne's log (which for some reason had no line numbers? But whatever, more fun for me ^^) I realized that there has this is probably a settings error:

java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String

I must have changed some Integer preference to a String preference, between v1.2 and v1.3, causing the crash. This would also explain why clearing app data is working. If someone could send me a preferences file (requires root), I could see if this is the true error source.

Now, ironically, this also means that this bug cannot be fixed, because fixing it would create a new bug for all those which have updated. So, all in all, I guess we have to accept that updating from 1.2 to 1.3 has a problem, and a apologize for not realizing this bug in time.

Same (probably) applies to #27. Thanks again to @the0ne.

I'll close this bug and #27, as soon as I can prove it.

from regex.

the0ne avatar the0ne commented on May 30, 2024

not sure i got the right file: /data/data/com.phikal.regex/shared_prefs/com.phikal.regex_preferences.xml

com.phikal.regex_preferences.xml.txt

from regex.

phikal avatar phikal commented on May 30, 2024

@the0ne Thanks that's the right file. I'll do the same of version 1.2 tomorrow, and then I'll know for sure if that caused the bug.

from regex.

phikal avatar phikal commented on May 30, 2024

I finally got around to download v1.2 and compare the files, and this is what I got:

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
    <int name="diff_Random Game" value="5" />
    <string name="task_Random Game">nullx1D14x1Dx1Fssjxx1Fx1Ex1Fdhxx1Fx1Ex1Fkbux1Fxx1Dx1Fnsmx1Fx1Ex1Fahx1Fx1Ex1Frjbox1Fx</string>
    <int name="position_s_Random Game" value="0" />
    <int name="game_Random Game" value="3" />
    <int name="position_e_Random Game" value="0" />
    <int name="score_Random Game" value="64" />
    <boolean name="regenerate" value="false" />
    <string name="vers">1.2</string>
    <string name="input_Random Game"></string>
</map>

For v1.3:

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
    <int name="score_matchmode-random" value="47" />
    <int name="position_s_matchmode-random" value="0" />
    <int name="position_e_matchmode-random" value="0" />
    <int name="game_matchmode-random" value="4" />
    <string name="input_matchmode-random"></string>
    <int name="diff_matchmode-random" value="4" />
    <string name="vers">1.3</string>
    <boolean name="regen" value="false" />
    <string name="cache_matchmode-random">x1F3Y4x1Fx1Dx1Fdnx1Fx1Ex1Fqx1Fx1Ex1FYIxx1Fx</string>
</map>

So, it seems like I changed the preference names and related stuff in af236e6 and 324c42c, probably leading to some bug, causing this crash. When directly updating from v1.2 to v1.3 I also got the same log as @the0ne, but without any line numbers.

The only way to "solve" this, would be to revert to the old preference names, but then everyone who had updated to v1.3, would have to reset again. I'd say, without any obvious way out, I'm going to close this issue for now, since it's not the code itself that is broken, but rather the transition.

To sum up, in case anyone has the same problem: Just clear app data, or if you're up to it, manually edit /data/data/com.phikal.regex/shared_prefs/com.phikal.regex_preferences.xml as seen above.

from regex.

phikal avatar phikal commented on May 30, 2024

Upon some more testing, I found the source of the bug:

Under v1.2 the game mode is defined as:

    <int name="gamemode" value="0" />

, while v1.3 uses strings:

    <string name="gamemode">matchmode-redb</string>

This explains the ClassCastException bug. But all in all, the same situation persists - changing this back to an integer, would just break compatibility. Instead, I'm going to patch this, forcing ReGeX to update to <string name="gamemode" .... This means that v1.2 -> v1.3 won't work, but v1.2 -> v1.3.1 and v1.3 -> v1.3.1 will.

from regex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.