Summary: | mahjongg crashs when trying to use custom layout | ||
---|---|---|---|
Product: | [Applications] kmahjongg | Reporter: | Michael Skiba <opensource> |
Component: | general | Assignee: | Mauricio Piacentini <piacentini> |
Status: | RESOLVED WORKSFORME | ||
Severity: | crash | CC: | antonis.tsiapaliokas, CerebrosuS, cpigat242, kde-games-bugs, oleg.kuh, schwarzer |
Priority: | NOR | ||
Version: | 0.8 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
My custom made layout
bounds checking in GameData::onlyFreeInLine() don't draw the board if game could not be generated |
Description
Michael Skiba
2009-03-29 18:51:41 UTC
Created attachment 32461 [details]
My custom made layout
Feel free to include it, if you like (increases the useable for girlfriend factor ;) )
Hello I am using opensuse 11.3 and the trunk version 4.5.73. I have tried out your layout but the kmahjongg have not seen it. Also you have only submit the .layout file without the .desktop one... I have tried the easy.layout from the kde-games-devel mailing list (http://lists.kde.org/?l=kde-games-devel&m=128785037713199&w=2) which it has been created by Mauricio Piacentini, so we can test the game without losing a lot of time, winning the game. And this layout works fine.. The kmahjongg recognize it and it is using it without any problem... So i think that there is no bug in the program but your layout is buggy... "So i think that there is no bug in the program but your layout is buggy..." Even if the layout file is wrong, it should never make KMahjongg crashing. KMahjongg have to take care of handling wrong defined layout files. But i also can't find any problem nor create a crash with a wrong layout. Greez Could this be anything to do with the version change in layouts between KDE 3 and 4? Maybe the KMahjongg code to handle the old layout format is broken. Don't know that there was a layout file change. But i don't know about KMahjongg before KDE4. I don't really think this bug still exist. Maybe some little changes made it or the rewrite with KDE4. Greez Yes, there definitely was a change in layout formats and there should be a version number at the start of the .layout file. I remember this because many layout files were converted to the new format manually and a few ended up with an odd number of tiles and could not be solved ... Maybe KMahjongg is assuming the wrong version in the layout-loader or maybe it no longer handles the old version correctly ... But maybe this is a red herring. Created attachment 76120 [details]
bounds checking in GameData::onlyFreeInLine()
I think this is being caused by an out-of-bounds error, triggered by the fact that it's so difficult to generate a solvable board for the layout.
Created attachment 76121 [details]
don't draw the board if game could not be generated
After the previous patch, the board would sometimes be drawn in an incomplete state when the program was started or the settings were changed and the board could not be generated.
I went a bit mad with it and decided to try to fix that too...
Generating a solvable board Layout is a very complicated mission as seen in kmahjongg. I don't like the code about generating a solveable game. I made a more simple algorithm for generating a solveable game in JMahjongg. It simply builds a game backwards. The problem here is a specific game number. For my opinion... the whole "generate solvable game"-code is bad. I also noticed problem with the 64 tries in the past. Maybe we can optimize or replace the whole generating code with a better one, that fits our needs. Greez *** Bug 327337 has been marked as a duplicate of this bug. *** In current master this layout does not crash anymore but it's still not usable since it only shows up every other try. Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone! Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |