Editing Exported Code - Construct 2 - html

A friend has asked me to check out an old uni project he did using Construct 2. It was made using a uni copy of Construct so I have no way of editing the original files, and only have access to the online export. Please bare in mind that I've never used Construct before, so I have no idea how it formats it's code. I'm more of a web designer but I said I'd have a go.
So the issue is it freezes after a few seconds. If I click quickly I can get past the intro screen, but if don't click the game freezes anyway. In other words the error is not caused by user input but by something happening in the background.
The example is here - http://rosietheband.com/moeba/
Has anyone seen this issue before? I was wondering if using an older browser might do the trick, as it worked a couple of years ago when it was made, and nothing else has changed since.

It's a javascript error; I went poking around in Chrome's dev tools console and found this. The problem seems to be coming from the c2runtime.js and specifically the p.play function there, where it references A.Gain.Value (twice, near line 207). Removing all references to this seems to unbreak the game, though I don't know if it'll have any noticeable effects on the audio (since that's what the property seems to relate to.)
Look for these two references in c2runtime.js, both somewhere between lines 200-250
,this.A.gain.value=a*this.Lh
this.A.gain.value=c;
and remove them, and that appears to clear it up. (You might want to confirm that there aren't other references to 'A.gain' anywhere, in case this fix breaks them.)

Related

Intellisense autocomplete inserting text in wrong places

When writing code in cshtml files, sometimes intellisense goes haywire and starts writing text several lines above where I am actually typing. At the moment it seems to be limited to when I hit the tab key to let it finish a property name which isn't too bad because I can just not do that. However, it also seems to happen at other times like just when I type #Model and then press a period it might write the word Model in some other part of the code file.
Anyone know how to correct this?
This would probably fit better as a VS Feedback item, but since this is the only place I have found someone referencing the same issue, I thought I would add some confirmation. I do not have a solution, only more examples to add. This issue has been annoying me for months! It seems to happen most often when typing razor code inside of JavaScript, especially inside of a quoted string.
Here is an example from a test project, where I am attempting to put a reference to a model field into a JavaScript string. Notice that I click tab a couple times and it doesn't actually insert the intellisense result at the point I am typing. But when I scroll down you can see it inserted it randomly in another spot pretty far away!
I did also try to remove the hidden .vs folder, bin/, and obj/ and could still reliably reproduce the issue after restarting Visual Studio. Currently on 1 before the latest (16.9.4). I did notice that if I re-open this cshtml file, wait until the file seems to be fully loaded (all the red errors go away), I also reliably get an ArgumentException that occurs as I begin typing. Then when I scroll down I already see that Model has been randomly inserted in another spot in the code.
I'm going to try updating to latest (16.9.5), and starting in Safe Mode to skip loading all 3rd-party libraries, and see if the issue is still reproducible, in case it is caused by one of the handful of extensions I am currently using.
Edit: Well same issue with 16.9.5. Trying to use Safe Mode is a no go, it makes the intellisense and syntax coloring completely disabled for .cshtml files.

Starting off with Mozilla development/contribution to Fennec

This is the first time I am trying to contribute to Mozilla. I went through several articles and documentation/resources to get a hang of what could be the best first steps to get started. I started off from this page http://whatcanidoformozilla.org1 and chose to start off with Java.
On initial tinkering I was taken to https://wiki.mozilla.org/Mobile/Get_Involved and eventually https://wiki.mozilla.org/Mobile/Fennec/Android/Suggested_workflow resource suggested that the best way to get started with it would be to pick up some simple bug and propose a patch for it.
So then I went to http://www.joshmatthews.net/bugsahoy/?java=1&simple=1 and this specific bug drew my attention. The description of the bug mentioned this :
There are some methods that we share (or can share) across our DB
implementations, like appending PARAM_SHOW_DELETED, PARAM_LIMIT, or
PARAM_PROFILE.
These are currently spread across LocalBrowserDB, TabsAccessor,
URLMetadata, and so on. It'd be nice to clean these up.
Question 1. Now how do I get some more context on what exactly is the bug and what is required to be done ?
As of now there seems to be 2 patches already submitted from what I understood (and please correct if my understanding is wrong here). So to get some context about the bug I went ahead and opened up the first patch submitted here.
It gave me some idea as to at least where exactly is the code itself that needs to be fixed. And I found it here
Question 2. Am I on the right track on how to figure out the code that needs to be fixed ?
Question 3. Even after reaching the DBUtils.java file I could not find any documentation about what the class basically does, or where does it fit into the whole picture. Could someone please help me with this, as to how do I figure out what a class is supposed to be doing etc. or at least some documentation around it?
You're on the right path. Basically, the What Can I Do For Mozilla website is a quick and easy way to let you discover projects you might be interested in, so it's the first gateway to the coding contributions.
That said, you did good in picking a bug to start off. However, as you saw the bug was already being worked on by somebody else (marked as Assigned). Your best bet is to find some new "good first bug" to work on. This might be a complicated task, as Bug's Ahoy shows only a few not owned good first bugs.
You should try to get in touch with the Fennec team, either via email or IRC (the latter for quicker responses).
Now, to answer your questions, in a more general way
Question 1. Now how do I get some more context on what exactly is the
bug and what is required to be done ?
Usually, this should be described in the first comment in the bug, on Bugzilla. If that's not the case, feel free to drop a message there and ask for more directions. You can also flag the reporter or the mentor of the bug using the needinfo functionality, as they are usually better shown.
As you can see, somebody asked for more info in comment 1 and some new directions were given.
In general, you won't find a patch with code on the bug itself, but you might find links to files and more precise directions on what to change and how. If not, again, feel free to ping the reporter and/or mentor.
Question 2. Am I on the right track on how to figure out the code that
needs to be fixed ?
You're on the right path. In general, if there are no links to files or DXR on the bug, but some code is mentioned, you can look it up using DXR, as you did.
Question 3. Even after reaching the DBUtils.java file I could not find
any documentation about what the class basically does, or where does
it fit into the whole picture. Could someone please help me with this,
as to how do I figure out what a class is supposed to be doing etc. or
at least some documentation around it?
What I usually do when navigating the Firefox code and need some more background on a not so well documented class, is browse the change log for that file, clicking on the Log button in the top-right panel on DXR (when displaying the file). It will show you a list of bugs that affected the file. You can even trace back the original file that implemented it, to get more context.
On the other hand, if you're only interested to the history of a single line of code within a file, then the blame tool is your friend. It tells you who last touched the line, the changeset and the related bug number. That is also accessible from where you can find the Log, here.
In the case of DBUtils.java, however, it looks like the class just holds some utility functions for database access.
To see how something is being used within the Firefox codebase, you can still use DXR. Here's a sample search for the DBUtils object.

Hyperlinks (to Sharepoint) in MS-Access tables not behaving as expected

Hello StackOverflow community,
I've just started having an issue with hyperlinks stored within an MS-Access table not behaving as expected.
I have a small database which, among other things, records links to documents hosted on a company Sharepoint site. Until a few days ago, all was working fine with both the database and the hyperlinks.
For some reason, within the last few days, whenever I (or any of my users) click on these hyperlinks through an Access form (or me clicking directly from the tables), I am getting strange behavior:
Clicking the link does open a new instance of the default browser, as desired. And that browser does navigate to the company Sharepoint site. But none of the links actually open the specific document that they are intended to point to.
Instead, all links are bringing up a general file/folder menu within the Sharepoint site. It is almost as if these links point to a non-existent file within an existing folder.
The very strange part is, if I "edit" any of the hyperlinks in my database, and simply select and copy the "address" text from within the edit hyperlink window, I will always immediately pull up the correct desired document if just paste the address directly into a new browser window.
I would have thought that this type of cutting/pasting would necessarily be equivalent to simply clicking the link. But that is obviously not the case.
I feel like I can safely rule out the possibility that any changes to the Sharepoint site itself would be causing my issue with simply clicking the links (otherwise cutting/pasting the addresses would not bring up the correct documents), but I have to admit I am simply stumped as to why just clicking the hyperlinks directly used to work, but no longer does.
I don't believe there is any code or other relevant information that might be helpful that I am neglecting to include, but would be eager to provide any clarifications/etc if anyone has any idea as to what might be happening here.
Thanks in advance for any thoughts or suggestions!
~JQN
EDIT: I had deleted this question because the issue described above had simply stopped happening. I was unable to explain why, but was also unable to reproduce the issue again after a certain point within a day or two of making the original post.
Since then, the issue has returned. I've been able determine the following:
As described in my note below, when I am getting this odd link behavior, I do NOT get the standard warning from MS-Access indicating that hyperlinks may be harmful, etc.
Strangely, simply opening up a file dialog/file picker and then navigating through that dialog to any location on the (sync'ed) Sharepoint site seems to make the problem go away. I do not need to actually select or open any location on Sharepoint, simply navigating within the sync'ed folder structure seems to do the trick.
Once this happens, all links behave as intended again (ie. they open the correct linked file directly instead of landing on the root folder page). They MS-Access hyperlink warning returns as well. The file/link behavior will remain in that state for several days. Only after, I'd estimate, a week or more of inactivity since the file dialog was last run will the issue return.
FURTHER EDIT: New update...Enough time has passed so that the issue is recurring again. As suspected, links to pages outside of Sharepoint are not affected, and open as expected without issue. Once again, the standard Microsoft hyperlink warning dialog is not coming up for any links.
Obviously, now that I've found the work-around with the file dialog, it's easy enough for me to fix the issue when it arises. I'm hoping that this rings a bell with somebody, though, and perhaps one of you could point me in the right direction for a more complete fix for my users.
Thanks again for any help with this!
YET ANOTHER EDIT: Ok....based upon all the things I've learned in the last couple of weeks (as captured in this post and the comments below), I was about to delete this question and re-post it as "Why is Sharepoint redirecting my URL requests from MS-Access?" As I tried to search the forum to make sure that that question hasnt already been asked, I stumbled across some info that I think gets at the underlying issue:
It looks like this is related to the (very opaque) way that Office processes URL requests. It apparently doesn't simply open the document at the specified link, it first "pre-tests" (I suppose that's the right word) the URL by sending a "Microsoft Office Protocol Discovery" request first.
Apparently, it is possible for Sharepoint to somehow not like the particulars of that MOPD request, and if that happens, then Sharepoint redirects to the file directory page -- and that directory page ends up being opened in the browser instead of the intended link/document.
Again, this only happens sometimes and not others. When it does happen, I've found a clumsy workaround that will correct the issue for about a week or so. I can't reproduce the issue during that week, I just have to wait for the workaround to expire (I obviously don't fully understand why my clumsy workaround works).
It doesn't seem possible to manipulate the particulars of the MOPD request. If possible, I'd love to be able to dispense with MOPD entirely, since I want all the files I'm linking to via Access to be opened as read-only anyway. Unfortunately, I don't think that that is possible either.
I've found some info on this in another SO thread HERE. I still am not quite at the point where I feel I'm ready to submit an answer to this question, but I have some ideas as to what sorts of things may function as an acceptable workaround.
It would be helpful if anyone had any ideas as to how I might be able to reproduce the issue on demand, rather than simply waiting another week for whatever keys/cookies/settings/etc to expire again. I'd need to implement any possible solutions entirely on the Access side of things if possible, rather than on the Sharepoint/server side. Thanks again for any suggestions!
I'm posting this as an answer now, but will avoid accepting it until I've had a chance to verify that it actually works.
I am inserting some code that will run on DB startup. It will open a (an invisible) form that has an Access WebBrowser control included. I'll have that control navigate to a specific file on the Sharepoint site. I believe that it is actually this action that somehow causes the link problems to resolve for a week of so.
This form will run silently in the background, navigate to the sharepoint file location, and then close. This should hopefully refresh whatever characteristics of the MODP request that are present when the links work properly (and are absent while they aren't working properly).
In essence, I'm hoping this approach will have the effect of resetting my (approximately) one week window of desired link functionality to start anew each time the database is opened. In other words, I'm thinking that this will work, although I still don't fully understand why.
Wish me luck!
;)

MediaWiki pages not working properly

So recently I've discovered that my mediawiki pages are not functioning correctly. For example, when I edit MediaWiki:ipbreasons-dropdown in an attempt to add extra ban reasons to the dropdown.
The wiki recognizes the edit, even showing a link and diff in RecentChanges, but for some reason the extra dropdown item never shows.
The same is happening with MediaWiki:Grouppage-staff. Obviously this is a huge problem. Anyone know any way I can fix this without re-installing mediawiki?
Sounds like a LocalisationCache problem. There are no magic wands for such issues, you need to debug a bit e.g. issuing wfMessage( 'ipbreasons-dropdown' ) in eval.php. If the message doesn't contain what expected, go over the documentation for localisation cache again, it might be something simple like file permissions.

Chrome console keeps getting stuck in a quirky state

The console gets stuck in a state where every two page refreshes a new closed instance of my indexedDB is displayed. They are all closed except for the one on the top and everything within the application still seems to function normally, however other strange things occur when using the console.
When I click on a table within the database it shows the data, but when I try to filter or go to the next page it all disappears. I have to completely close the browser tab and then reload.
Sometimes when I enter in console commands they don't do anything, don't return anything (not even undefined), but when I refresh the page it alternative between working and not working.
Let me know if you need some more information. I haven't a clue what's causing this. I'm using the latest version of Chrome 35. Any thoughts?
Saw this once. Try a fresh install, and if that does not work, try upgrading to dev channel 37. I did both those things (for other reasons), but have not been able to reproduce the bug since. Trudging through Chromium's list of open issues or changes might also help.
Also, it looks like your question is not really about programming so it might be closed. There are other 'something.overflow' sites to post this type question.
Edit: also, regarding the disappearing issue, I actually reported this bug on Chromium. It was recently fixed!