[ABD] hanelyp fancy dice

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

Where's the post delete?
Last edited by hanelyp on Fri May 01, 2015 2:23 pm, edited 1 time in total.
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

Where's the post delete?
Last edited by hanelyp on Fri May 01, 2015 2:23 pm, edited 1 time in total.
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

Where's the post delete?
Last edited by hanelyp on Fri May 01, 2015 2:23 pm, edited 1 time in total.
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

Any of those environment factors being the cause of the all 1s bug doesn't make much sense, unless there is a bug somewhere violating code encapsulation.

The one factor I've noted in common for the boards suffering this bug is php5.4. Bug that kind of bug from php5.4 when php 5.3 and php5.5 both run the dice code correctly also doesn't make much sense.

I'm using mysql on the back end. What databases for your boards?

Just went though a few rounds of debugging on the install. I have no idea all of what was different between the install and fix bbcode records, but what I just committed to github appears to work for install.
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

New code in github, ACP will roll dice for configured specs. May give us a clue about at all 1s bug. And a useful tool for admins configuring dice.
koraldon
Registered User
Posts: 530
Joined: Sat Jun 30, 2007 12:42 pm

Re: [dev]hanelyp/fancydice

Post by koraldon »

Frontend - still get all 1's for new rolls
Backend - Get a roll which is not 1,1,1 and seems okay. it re-rolls everytime I enter the settings page

The interesting thing is that for old posts (posted under 0.7) I do get "good" rolls even when 0.8 is installed.
For this

Code: Select all

[dice seed=1771112135 secure=caa305e3]3d6[/dice]
I get 2,4,5 which is 11 - the post was created using 0.7 to rolls.

p.s. I noticed that if I roll 3d8, I get a constant results of 1,1,5.... bizzare
Last edited by koraldon on Fri May 01, 2015 7:52 pm, edited 1 time in total.
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

That's the kind of bug report detail I need. It tells me that the dice rolling code is working, but the dice seed code has a problem. The seed value for dice should change for every new roll.

From the users table on your personal record, what do user_lastpost_time and user_email_hash look like? The extension code assumes both are numbers.

I've made a minor code change that may patch the bug if current suspicions are correct.
koraldon
Registered User
Posts: 530
Joined: Sat Jun 30, 2007 12:42 pm

Re: [dev]hanelyp/fancydice

Post by koraldon »

email has - 23104426733 (changed a couple of digits)
user_lastpost_time - 1430507566

No change due to the change to event listener (do I need to refresh the cache or anything?)
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

Refreshing cache shouldn't be needed.

To be certain I'm looking at the right area, the front end is producing the same seed each time?
Shepskii
Registered User
Posts: 27
Joined: Mon Feb 23, 2015 10:51 pm

Re: [dev]hanelyp/fancydice

Post by Shepskii »

Updated the extension on my test board and got the following:

Image

Image

ACP shows rolls for 3d6 are working (ignore the partially setup definitions heh).

Image

Interestingly, I get the same result as Koraldon for 3d8:

Image

Image
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

To summarize current status:
- dice rolling library works.
- seed generation works.
- apparently seeds are getting corrupted on both test servers running php5.4

I just installed phpbb3.1.3 and this extension on a computer running php5.3. Works correctly there.

Another test:
in event/main_listener.php find

Code: Select all

$valid = $validate==$secure?'':$this->user->lang('FANCYDICE_FIDDLED');
and change to

Code: Select all

$valid = $validate==$secure?$seed:$this->user->lang('FANCYDICE_FIDDLED');
Then tell me what it produces.
Shepskii
Registered User
Posts: 27
Joined: Mon Feb 23, 2015 10:51 pm

Re: [dev]hanelyp/fancydice

Post by Shepskii »

Forgot to mention, DB is running on MySQL here as well.

Result of changing the code as advised:

Image
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

Pasting that first seed into my copy of the board I get 4,6,5 => 15. In any case that's one more suspect eliminated.

I was about to ask if your servers were 16 or 32 bit, but I have properly working copies of this extension on one of each. Running some flavor of linux on both. What operating system there? Shouldn't make a difference but I'm out of rational explanations.
Shepskii
Registered User
Posts: 27
Joined: Mon Feb 23, 2015 10:51 pm

Re: [dev]hanelyp/fancydice

Post by Shepskii »

The OS on my server is linux but I have no idea what flavour it might be - will need to submit a query to the host for that.

I might also ask if there is any chance of getting php upgraded to 5.5, I can only imagine the frustration from your point of view :|
koraldon
Registered User
Posts: 530
Joined: Sat Jun 30, 2007 12:42 pm

Re: [dev]hanelyp/fancydice

Post by koraldon »

Well, as I have said earlier the code broke for me when updated to 0.8 - and if I revert to 0.7 all is working again.
The cause is in that code change.
Can shepski run 0.7 and see if the works for him?

Return to “Abandoned Extensions”